:root {
  --green-950: #063c39;
  --green-900: #075a56;
  --green-800: #08736d;
  --green-700: #0a8a82;
  --green-100: #dff4f1;
  --green-50: #effaf8;
  --cream: #f7f4ed;
  --gold: #e3b746;
  --ink: #173230;
  --muted: #69807d;
  --line: #dde7e4;
  --white: #fff;
  --orange: #e59037;
  --orange-bg: #fff4e6;
  --blue: #3977b8;
  --blue-bg: #edf5ff;
  --grey-bg: #f2f4f3;
  --shadow: 0 16px 40px rgba(8, 59, 56, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell { min-height: 100vh; }
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 16%, rgba(255,255,255,.12) 0 4%, transparent 4.3%),
    radial-gradient(circle at 78% 83%, rgba(227,183,70,.18) 0 14%, transparent 14.3%),
    linear-gradient(125deg, var(--green-950), var(--green-800));
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -130px;
  top: -210px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(255,255,255,.035), 0 0 0 128px rgba(255,255,255,.025);
}
.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--green-950);
  background: var(--gold);
  font: 800 23px/1 Georgia, serif;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .17em; }
.live-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 13px;
  font-weight: 650;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #65e8b3; box-shadow: 0 0 0 5px rgba(101,232,179,.12); }
.hero-copy { position: relative; z-index: 1; max-width: 820px; padding: 70px 0 88px; }
.eyebrow { margin: 0 0 18px; color: #99ddd6; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; }
h1 { margin: 0; max-width: 820px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6vw, 72px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
h1 span { color: var(--gold); }
.hero-description { max-width: 730px; margin: 26px 0 0; color: rgba(255,255,255,.76); font-size: 17px; line-height: 1.65; }

.content { width: min(1240px, calc(100% - 48px)); margin: -38px auto 0; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: 1.45fr repeat(4, 1fr); gap: 12px; }
.stat-card {
  min-height: 112px;
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid rgba(8,115,109,.09);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.stat-label { display: block; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.stat-card strong { display: block; margin-top: 8px; color: var(--ink); font-size: 27px; line-height: 1; }
.stat-progress strong { font-size: 16px; line-height: 1.25; }
.stat-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 21px; font-weight: 800; }
.ready-icon { color: var(--green-800); background: var(--green-100); }
.work-icon { color: #ad661b; background: var(--orange-bg); }
.source-icon { color: var(--blue); background: var(--blue-bg); }
.missing-icon { color: #7d8d8a; background: var(--grey-bg); }
.progress-ring {
  --progress: 0deg;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green-700) var(--progress), #e7efed 0);
  position: relative;
}
.progress-ring::before { content: ""; position: absolute; inset: 7px; border-radius: inherit; background: white; }
.progress-ring span { position: relative; font-size: 14px; font-weight: 850; }

.toolbar { margin: 34px 0 14px; padding: 18px; border-radius: 20px; background: rgba(255,255,255,.72); border: 1px solid rgba(8,115,109,.10); }
.search-box { display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: .2s; }
.search-box:focus-within { border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(10,138,130,.10); }
.search-box svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-box input { width: 100%; height: 50px; padding: 0; outline: 0; border: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #94a4a1; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.filter-button { cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; color: var(--muted); background: white; font-size: 13px; font-weight: 750; transition: .18s; }
.filter-button:hover { color: var(--green-800); border-color: #a8d3ce; }
.filter-button.active { color: white; border-color: var(--green-800); background: var(--green-800); }
.legend { display: flex; gap: 24px; flex-wrap: wrap; padding: 7px 3px 23px; color: var(--muted); font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 6px; font-style: normal; font-size: 12px; font-weight: 900; }
.legend-check { color: white; background: var(--green-700); }
.legend-empty { border: 1.5px solid #b9c5c3; background: transparent; }

.dashboard { display: grid; gap: 18px; padding-bottom: 48px; }
.block { overflow: hidden; border: 1px solid rgba(8,115,109,.11); border-radius: 22px; background: white; box-shadow: 0 8px 28px rgba(8,59,56,.055); }
.block-header { width: 100%; border: 0; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 15px; padding: 21px 24px; color: inherit; background: white; text-align: left; }
.block-header:hover { background: #fbfdfc; }
.block-number { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: white; background: var(--green-800); font-size: 13px; font-weight: 850; }
.block-title h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.block-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.block-count { padding: 7px 11px; color: var(--green-800); background: var(--green-50); border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.chevron { width: 11px; height: 11px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin: -5px 4px 0 8px; }
.block.collapsed .chevron { transform: rotate(-45deg); margin-top: 1px; }
.block.collapsed .task-list { display: none; }
.task-list { border-top: 1px solid var(--line); }
.task-card { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr) 185px 142px 30px; gap: 14px; align-items: center; min-height: 80px; padding: 14px 24px; border-bottom: 1px solid #edf2f0; color: inherit; text-decoration: none; transition: .16s; }
.task-card:last-child { border-bottom: 0; }
a.task-card:hover { background: var(--green-50); }
a.task-card:focus-visible { outline: 3px solid rgba(10,138,130,.28); outline-offset: -3px; }
.availability { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; font-size: 13px; font-weight: 900; }
.has-file .availability { color: white; background: var(--green-700); }
.no-file .availability { border: 1.5px solid #bdc9c7; }
.task-main { min-width: 0; }
.task-name { display: block; font-size: 14px; font-weight: 760; line-height: 1.35; }
.task-note { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.owner { min-width: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.owner::before { content: "Отв.: "; color: #99a7a5; }
.status { justify-self: start; padding: 7px 10px; border-radius: 999px; font-size: 10.5px; line-height: 1; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
.status-ready { color: #087168; background: var(--green-100); }
.status-working { color: #a95f12; background: var(--orange-bg); }
.status-source { color: #2c6ea9; background: var(--blue-bg); }
.status-missing { color: #73827f; background: var(--grey-bg); }
.download-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; }
.has-file .download-icon { color: var(--green-800); background: var(--green-100); }
.download-icon svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.no-file { cursor: default; background: #fdfefd; }
.no-file .task-name, .no-file .owner { color: #798a87; }
.no-file .task-note { color: #a0aeac; }
.no-file .download-icon { color: #b5c0be; }
.empty-state { margin: 20px 0 70px; padding: 65px 20px; text-align: center; border: 1px dashed #b8cbc8; border-radius: 22px; color: var(--muted); background: rgba(255,255,255,.55); }
.empty-state span { font-size: 35px; }
.empty-state h2 { margin: 14px 0 5px; color: var(--ink); font-size: 19px; }
.empty-state p { margin: 0; }
footer { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 40px; border-top: 1px solid rgba(8,115,109,.14); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
footer div { display: flex; gap: 12px; align-items: center; }
footer strong { color: var(--green-800); letter-spacing: .14em; }
footer p { margin: 0; }

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-progress { grid-column: span 4; }
  .task-card { grid-template-columns: 28px minmax(0,1fr) 150px 126px 30px; }
}
@media (max-width: 760px) {
  .hero { padding-inline: 20px; }
  .topbar { min-height: 72px; }
  .live-pill { font-size: 0; padding: 11px; }
  .hero-copy { padding: 51px 0 68px; }
  h1 { font-size: clamp(37px, 11vw, 54px); }
  .hero-description { font-size: 15px; }
  .content { width: calc(100% - 28px); margin-top: -30px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-progress { grid-column: span 2; }
  .stat-card { min-height: 98px; padding: 17px; }
  .stat-card strong { font-size: 24px; }
  .toolbar { padding: 12px; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-button { flex: 0 0 auto; }
  .legend { display: grid; gap: 8px; }
  .block-header { grid-template-columns: auto 1fr auto; padding: 17px; }
  .block-count { display: none; }
  .task-card { grid-template-columns: 26px 1fr 28px; gap: 10px; padding: 15px 17px; }
  .owner, .status { grid-column: 2; }
  .owner { margin-top: -4px; }
  .status { margin-top: -6px; }
  .download-icon { grid-column: 3; grid-row: 1 / 4; align-self: center; }
  footer { width: calc(100% - 28px); display: grid; }
  footer div { display: grid; gap: 5px; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 17px; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 92px; padding: 14px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-label { font-size: 10px; }
}
@media print {
  body { background: white; }
  .hero { color: var(--ink); background: white; padding: 0; }
  .topbar { border-color: var(--line); }
  .brand-mark { color: white; background: var(--green-800); }
  .live-pill, .toolbar, .legend, .download-icon { display: none; }
  .hero-copy { padding: 32px 0; }
  h1, h1 span { color: var(--ink); }
  .hero-description { color: var(--muted); }
  .content { width: 100%; margin: 0; }
  .stats-grid { box-shadow: none; }
  .stat-card, .block { box-shadow: none; break-inside: avoid; }
  .task-card { grid-template-columns: 28px 1fr 170px 120px; }
  footer { width: 100%; }
}
