/* ============================================================
   Яндекс.Метрика — отчёты. Дизайн-система интерфейса.
   ============================================================ */

:root {
  /* поверхности */
  --bg: #f5f6f8;
  --bg-2: #eef0f4;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f4f6f9;

  /* линии */
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --line-strong: #d3d8e0;

  /* текст */
  --ink: #0d1424;
  --ink-2: #344054;
  --muted: #6b7688;
  --faint: #98a2b3;

  /* акцент */
  --brand: #00a92d;
  --brand-600: #00a92d;
  --brand-700: #00a92d;
  --brand-tint: #e7f7f1;
  --brand-ring: rgba(14, 159, 110, .16);

  /* статусы */
  --ok: #00a92d;
  --ok-tint: #e7f7f1;
  --info: #2f6feb;
  --info-tint: #eaf1fe;
  --warn: #b54708;
  --warn-tint: #fdf2e3;
  --err: #d92d20;
  --err-tint: #fdeceb;

  /* геометрия */
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* тени */
  --sh-xs: 0 1px 2px rgba(13, 20, 36, .05);
  --sh-sm: 0 1px 3px rgba(13, 20, 36, .07), 0 1px 2px rgba(13, 20, 36, .04);
  --sh-md: 0 4px 12px rgba(13, 20, 36, .07), 0 2px 4px rgba(13, 20, 36, .04);
  --sh-lg: 0 12px 32px rgba(13, 20, 36, .10), 0 4px 8px rgba(13, 20, 36, .04);
  --sh-brand: 0 1px 2px rgba(4, 108, 78, .28);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --t: 140ms var(--ease);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font: 400 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.center {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 50% -10%, #eaf6f1 0%, rgba(234, 246, 241, 0) 60%),
    var(--bg);
}

::selection { background: var(--brand-ring); color: var(--ink); }

a { color: var(--info); text-decoration: none; transition: color var(--t); }
a:hover { color: #1d4ed8; text-decoration: underline; }

.mono { font-family: "Cascadia Mono", Consolas, "SF Mono", ui-monospace, monospace; font-size: .92em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.strong { font-weight: 600; color: var(--ink); }
.pad { padding: 22px; text-align: center; }
.right { text-align: right; }
.section {
  display: flex; align-items: center; gap: 8px;
  margin: 26px 0 14px; font-size: 15px; font-weight: 650; letter-spacing: -.01em;
}
.section svg, .section i[data-lucide] { width: 17px; height: 17px; color: var(--brand-600); }
.inline { display: inline; }
.nowrap { white-space: nowrap; }

.wrap { max-width: 1180px; margin: 0 auto 20px; padding: 0 24px; }

/* ——————————————————————————— шапка ——————————————————————————— */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 650; font-size: 15px; color: var(--ink); letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 30px; height: 30px; flex: none;
  object-fit: contain; border-radius: 8px;
}
.login-mark .brand-logo {
  width: 46px; height: 46px; border-radius: 12px;
  margin-bottom: 6px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #10b981, var(--brand-600));
  color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 1px 2px rgba(4, 108, 78, .3), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a {
  color: var(--muted); font-weight: 550; font-size: 14px;
  padding: 7px 12px; border-radius: var(--r-sm);
  transition: background var(--t), color var(--t);
}
.topbar nav a svg, .topbar nav a i[data-lucide] {
  width: 15px; height: 15px; margin-right: 5px; vertical-align: -2.5px;
}
.topbar .btn-ghost svg, .topbar .btn-ghost i[data-lucide] {
  width: 15px; height: 15px; margin-right: 5px; vertical-align: -2.5px;
}
.topbar nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.topbar nav a.on { background: var(--brand-tint); color: var(--brand-700); font-weight: 600; }
.who {
  color: var(--muted); font-size: 13px; max-width: 180px; margin-left: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar nav form { display: flex; }

/* ——————————————————————————— кнопки ——————————————————————————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 14px; font-weight: 550; white-space: nowrap;
  cursor: pointer; box-shadow: var(--sh-xs);
  transition: background var(--t), border-color var(--t), color var(--t),
              box-shadow var(--t), transform var(--t);
}
.btn:hover { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg, .btn i[data-lucide] { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(180deg, #1ccc4b, var(--brand-600));
  border-color: var(--brand-600); color: #fff; box-shadow: var(--sh-brand);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #00a92d, var(--brand-700));
  border-color: var(--brand-700); color: #fff;
}
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--ink); }
.btn-danger { color: var(--err); border-color: #f6cfcc; background: #fff; }
.btn-danger:hover { background: var(--err-tint); border-color: #f0b3ae; color: #b42318; }
.btn-ok { color: var(--ok); border-color: #bfe8d7; }
.btn-ok:hover { background: var(--ok-tint); }
.btn-warn { color: var(--warn); border-color: #f6dcb4; }
.btn-warn:hover { background: var(--warn-tint); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.btn-block { width: 100%; height: 40px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* кнопки-иконки (lucide) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--muted); cursor: pointer;
  box-shadow: var(--sh-xs);
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}
.icon-btn:hover {
  background: var(--surface-3); border-color: var(--line-strong);
  color: var(--ink); text-decoration: none;
}
.icon-btn:active { transform: translateY(.5px); }
.icon-btn.danger:hover { background: var(--err-tint); border-color: #f0b3ae; color: var(--err); }
.icon-btn svg, .icon-btn i[data-lucide] { width: 16px; height: 16px; }
.actions-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

/* ——————————————————————————— карточки и формы ——————————————————————————— */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }

label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 550; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 10px; }
label.check input { width: auto; }
.form-check { margin-bottom: 16px; }
.check-end { align-self: end; margin-bottom: 14px; }
.direct-box { transition: opacity var(--t); }
.direct-box.off { opacity: .45; }
.logo-preview { margin-top: 6px; }
.logo-preview .hint { margin: 0; }

input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 0 12px;
  min-height: 38px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px;
  box-shadow: var(--sh-xs);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
textarea { padding: 10px 12px; min-height: 84px; line-height: 1.5; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7688' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-3); color: var(--faint); cursor: not-allowed;
}
input[type="date"] { min-width: 0; }

fieldset {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px 6px; margin: 0 0 18px;
  background: var(--surface); box-shadow: var(--sh-sm);
}
legend {
  padding: 0 8px; font-weight: 650; font-size: 13px; color: var(--ink-2);
  letter-spacing: .01em;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .wide { grid-column: 1 / -1; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.add-acc { margin-top: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin: -2px 0 14px; line-height: 1.5; }
.hint.center { text-align: center; margin: 12px 0 0; }
.actions { display: flex; gap: 10px; }

/* ——————————————————————————— таблицы ——————————————————————————— */
.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.table th, .table td {
  padding: 13px 16px; text-align: left;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.table thead th {
  position: relative; top: 0px; z-index: 5;
  font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody tr { transition: background var(--t); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table tr.off td { opacity: .55; }
.table tr.off:hover td { opacity: .7; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ——————————————————————————— логотип клиента (2:1) ——————————————————————————— */
.clogo {
  aspect-ratio: 2 / 1;
  object-fit: contain;
  width: 84px; max-height: 42px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 3px;
  display: block;
  box-shadow: var(--sh-xs);
}
.clogo-fallback {
  aspect-ratio: 2 / 1; width: 84px;
  display: grid; place-items: center;
  background: var(--surface-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--faint); font-size: 11px; font-weight: 550;
}
.clogo-cell { width: 96px; }
.client-cell { display: flex; align-items: center; gap: 12px; }
.client-title { display: flex; align-items: center; gap: 14px; }
.client-title .clogo, .client-title .clogo-fallback { width: 104px; }
.head-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.chip {
  display: inline-block; max-width: 100%;
  padding: 1px 8px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--line-2);
  color: var(--muted); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}

/* ——————————————————————————— тумблер ——————————————————————————— */
.switch {
  position: relative; display: inline-block; flex: none;
  width: 40px; height: 23px; margin: 0; cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: #cbd2dd; box-shadow: inset 0 1px 2px rgba(13, 20, 36, .1);
  transition: background 160ms var(--ease);
}
.switch .slider::before {
  content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(13, 20, 36, .28);
  transition: transform 160ms var(--ease);
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(17px); }
.switch input:hover + .slider { background: #b9c1ce; }
.switch input:checked:hover + .slider { background: var(--brand-600); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--brand-ring); }

/* ——————————————————————————— табы (сегменты) ——————————————————————————— */
.tabs {
  display: flex; gap: 3px; padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: fit-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs.years { margin-bottom: 12px; }
.tabs.months { margin-bottom: 20px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 550; white-space: nowrap;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.tab:hover { background: rgba(255, 255, 255, .7); color: var(--ink); text-decoration: none; }
.tab.on {
  background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: var(--sh-xs), 0 0 0 1px rgba(13, 20, 36, .04);
}
.tab.has { color: var(--ink-2); }

.scope-form { width: 270px; margin: 0; }
.scope-form label { margin: 0; }
.scope-form select { margin-top: 0; }

/* ——————————————————————————— сетка отчётов (6 в ряд, квадрат) ——————————————————————————— */
.tilegrid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--line-strong);
}
.tile-s-done::before    { background: var(--ok); }
.tile-s-running::before { background: var(--info); }
.tile-s-queued::before  { background: #f0a132; }
.tile-s-error::before   { background: var(--err); }
.tile-s-cancelled::before { background: var(--line-strong); }
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--line-strong);
}
.tile-off { opacity: .62; }
.tile-logo {
  width: 100%; height: 40px; display: grid; place-items: center;
  padding: 4px 6px; border-radius: var(--r-sm);
  background: var(--surface-2);
}
.tile-logo .clogo {
  width: auto; max-width: 76px; max-height: 32px;
  border: 0; box-shadow: none; padding: 0; background: transparent;
}
.tile-title {
  font-size: 14px; font-weight: 650; line-height: 1.25; color: var(--ink);
  letter-spacing: -.01em;
}
.tile-dates { font-size: 11px; color: var(--muted); line-height: 1.3; }
.tile-actions { margin-top: auto; display: flex; align-items: center; gap: 6px; }
.tile-status { font-size: 11px; }
.tile .progress { width: 100%; margin: 6px 0 0; }
.tile-step {
  font-size: 10.5px; color: var(--muted); line-height: 1.3;
  max-height: 26px; overflow: hidden;
}
.empty-month {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 32px; text-align: center;
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.empty-month p { margin: 0 0 8px; }
.empty-month p:last-child { margin-bottom: 0; }
.empty-month-icon {
  width: 44px; height: 44px; margin: 0 auto 12px;
  border-radius: 12px; display: grid; place-items: center;
  background: var(--bg-2); color: var(--faint);
}
.empty-month-icon svg, .empty-month-icon i[data-lucide] { width: 20px; height: 20px; }

.empty-row { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px; text-align: center; }
.empty-row .notice-icon { width: 44px; height: 44px; margin: 0 0 4px; }

/* ——————————————————————————— прогресс и логи ——————————————————————————— */
.progress { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.progress .bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #10b981, var(--brand-600));
  transition: width .45s var(--ease);
}

.logs {
  list-style: none; margin: 14px 0 0; padding: 12px 14px;
  background: #0d1424; color: #cbd5e1; border-radius: var(--r);
  font: 12px/1.7 "Cascadia Mono", Consolas, ui-monospace, monospace;
  max-height: 280px; overflow: auto;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}
.logs li { white-space: pre-wrap; word-break: break-word; }
.logs .warn { color: #fbbf24; }
.logs .error { color: #f87171; }
.logs::-webkit-scrollbar { width: 10px; height: 10px; }
.logs::-webkit-scrollbar-thumb { background: #334155; border-radius: 999px; border: 3px solid #0d1424; }

/* ——————————————————————————— карточка отчёта (страница отчёта) ——————————————————————————— */
.rlist { display: grid; gap: 12px; }
.rcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 16px 18px;
}
.rcard-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rcard-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.rcard-actions form { display: inline; }

.goals { margin: 0; padding-left: 20px; font-size: 14px; }
.goals li { margin-bottom: 6px; }
.goals li:last-child { margin-bottom: 0; }

.acc {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap;
}
.acc:last-of-type { border-bottom: 0; }
.acc .pass-form { display: flex; align-items: center; gap: 6px; }
.acc .pass-form input { width: 140px; margin-top: 0; }

/* ——————————————————————————— повторяемые цели ——————————————————————————— */
.goal-row {
  display: grid; grid-template-columns: 180px 14px 1fr 34px;
  align-items: center; gap: 10px; margin-bottom: 10px;
}
.goal-row input { margin-top: 0; }
.goal-row .dash { text-align: center; color: var(--faint); font-weight: 600; }
.goal-add { margin-top: 4px; }

/* ——————————————————————————— статусы ——————————————————————————— */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px 2px 7px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.ok   { background: var(--ok-tint); color: var(--brand-700); }
.pill.run  { background: var(--info-tint); color: #1d4ed8; }
.pill.wait { background: var(--warn-tint); color: var(--warn); }
.pill.err  { background: var(--err-tint); color: #b42318; }
.pill.off  { background: var(--bg-2); color: var(--muted); }

/* ——————————————————————————— заголовки страниц и состояния ——————————————————————————— */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin: 28px 0 20px; flex-wrap: wrap;
}
.page-head h1 {
  margin: 0; font-size: 24px; font-weight: 680; letter-spacing: -.02em; line-height: 1.25;
}
.page-head .muted { margin-top: 3px; font-size: 13.5px; }
.page-head h1 + .muted { margin-top: 4px; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero h2 { margin: 8px 0 2px; }

.alert {
  background: var(--err-tint); border: 1px solid #f6cfcc; color: #b42318;
  padding: 11px 14px; border-radius: var(--r); margin-bottom: 18px; font-size: 14px;
}
.alert.small { font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 15px 17px;
}
.stat b { display: block; font-size: 26px; line-height: 1.15; font-weight: 680; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.busy b { color: var(--warn); }

/* ——————————————————————————— запуск отчёта / вход ——————————————————————————— */
.run-bar { display: flex; align-items: flex-end; gap: 16px; }
.run-bar label { flex: 1; margin-bottom: 0; }
.run-bar .btn { height: 38px; }

/* ——————————————————————————— служебные страницы ——————————————————————————— */
.notice { text-align: center; padding: 40px 24px; }
.notice h2 { font-size: 19px; margin-bottom: 8px; }
.notice p { max-width: 420px; margin: 0 auto 20px; }
.notice .btn, .notice form { margin: 0 auto; }
.notice-code {
  font-size: 46px; font-weight: 700; letter-spacing: -.03em;
  color: var(--line-strong); line-height: 1; margin-bottom: 12px;
}
.notice-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-600);
}
.notice-icon svg, .notice-icon i[data-lucide] { width: 24px; height: 24px; }

.login { width: 400px; max-width: 100%; padding: 28px; }
.login-mark { display: flex; justify-content: center; margin-bottom: 16px; }
.login h1 { font-size: 20px; font-weight: 680; letter-spacing: -.02em; margin: 0; text-align: center; }
.login-sub { margin: 6px 0 22px; text-align: center; }
.login .btn-primary { margin-top: 4px; }
.login label { font-size: 12.5px; }

/* ——————————————————————————— модальное окно генерации PDF ——————————————————————————— */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 20px;
}
.modal {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--sh-lg), 0 24px 64px rgba(15, 23, 42, .18);
  padding: 24px 26px 26px;
  position: relative;
  animation: modal-in .18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border: none; border-radius: 8px;
  display: grid; place-items: center;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background var(--t), color var(--t);
}
.modal-close:hover { background: var(--surface-3); color: var(--ink); }
.modal-close svg, .modal-close i[data-lucide] { width: 16px; height: 16px; }
.modal-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 680; letter-spacing: -.02em; margin: 0 0 8px;
}
.modal-title svg, .modal-title i[data-lucide] { width: 18px; height: 18px; color: var(--brand); }
.modal .progress { margin-top: 18px; }
.modal #pdf-step { margin-top: 8px; }
.modal #pdf-error { margin-top: 12px; }
.modal #pdf-retry { margin-top: 14px; }
.modal #pdf-retry .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ——————————————————————————— публичная ссылка на отчёт ——————————————————————————— */
.share-modal { width: min(520px, 100%); }
.share-note { margin: 0 0 14px; }
.share-link {
  width: 100%; box-sizing: border-box;
  font: 13px/1.4 var(--mono, ui-monospace, monospace);
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--ink);
  cursor: text;
}
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.share-msg { margin-top: 10px; min-height: 18px; font-size: 12.5px; color: var(--muted); }
.center-note {
  min-height: 60vh; display: grid; place-content: center; justify-items: center;
  text-align: center; gap: 8px;
}

@media (max-width: 1200px) { .tilegrid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) {
  .form-grid, .cols, .stats { grid-template-columns: 1fr; }
  .run-bar { flex-direction: column; align-items: stretch; }
  .goal-row { grid-template-columns: 110px 12px 1fr 34px; }
  .scope-form { width: 100%; }
  .wrap { padding: 0 16px; }
  .page-head h1 { font-size: 21px; }
}
@media (max-width: 800px) {
  .tilegrid { grid-template-columns: repeat(2, 1fr); }
  .topbar .wrap { height: 56px; }
  .table thead th { top: 56px; }
  .who { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.brand-logo {
  max-width: 40px;
}