/* Shared visual refinement layer. Loaded after app.css; behavior and feature-specific styles stay intact. */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef2f5;
  --border: #e2e7ec;
  --border-strong: #cbd4dd;
  --input-hover: #aebbc7;
  --text: #17212b;
  --text-2: #3d4b59;
  --muted: #6b7886;
  --row-hover: #f5f8f9;
  --side: #14202b;
  --side-2: #1c2a36;
  --side-3: #263643;
  --accent: #137b70;
  --accent-hover: #0f685f;
  --accent-2: #30a99a;
  --accent-soft: #e5f3f0;
  --accent-border: #c4e4dd;
  --link: #137b70;
  --link-hover: #0f685f;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 9px;
  --shadow-1: 0 1px 2px rgba(20, 32, 43, .045), 0 3px 10px rgba(20, 32, 43, .025);
  --shadow-2: 0 18px 48px -22px rgba(15, 28, 40, .34), 0 4px 12px rgba(15, 28, 40, .08);
}
:root[data-theme="dark"] {
  --bg: #10171e;
  --surface: #171f28;
  --surface-2: #1b2530;
  --surface-3: #232f3b;
  --border: #293541;
  --border-strong: #3a4856;
  --input-hover: #516170;
  --text: #e7edf2;
  --text-2: #c4ced8;
  --muted: #95a2af;
  --row-hover: #1c2833;
  --side: #0c1319;
  --side-2: #141e27;
  --side-3: #202d38;
  --accent: #24a092;
  --accent-hover: #31b3a4;
  --accent-2: #46c5b5;
  --accent-soft: #16322f;
  --accent-border: #28534d;
  --link: #58cabb;
  --link-hover: #83dfd3;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-2: 0 20px 48px -22px rgba(0, 0, 0, .75), 0 4px 12px rgba(0, 0, 0, .28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10171e;
    --surface: #171f28;
    --surface-2: #1b2530;
    --surface-3: #232f3b;
    --border: #293541;
    --border-strong: #3a4856;
    --input-hover: #516170;
    --text: #e7edf2;
    --text-2: #c4ced8;
    --muted: #95a2af;
    --row-hover: #1c2833;
    --side: #0c1319;
    --side-2: #141e27;
    --side-3: #202d38;
    --accent: #24a092;
    --accent-hover: #31b3a4;
    --accent-2: #46c5b5;
    --accent-soft: #16322f;
    --accent-border: #28534d;
    --link: #58cabb;
    --link-hover: #83dfd3;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .28);
    --shadow-2: 0 20px 48px -22px rgba(0, 0, 0, .75), 0 4px 12px rgba(0, 0, 0, .28);
  }
}
body { letter-spacing: .002em; }
.main { padding-top: 24px; }
.topbar { margin-top: -24px; margin-bottom: 24px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(23px, 2vw, 28px); letter-spacing: -.035em; }
.page-head .sub { line-height: 1.55; }
.sidebar { padding-top: 20px; }
.brand { padding-bottom: 20px; }
.brand-mark { border-radius: 10px; box-shadow: 0 5px 14px -6px var(--accent); }
.nav-title { padding-top: 18px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav a { min-height: 36px; font-size: 13.25px; }
.project-switch select { min-height: 40px; }
.card { border-color: color-mix(in srgb, var(--border) 88%, transparent); box-shadow: var(--shadow-1); }
.card:hover { border-color: var(--border-strong); box-shadow: 0 5px 18px rgba(20, 32, 43, .055); }
.card-head { padding: 15px 20px; }
.card-head h2 { font-size: 14.5px; letter-spacing: -.01em; }
.card-body { padding: 22px; }
.card-body.tight { padding: 0; }
.grid { gap: 18px; }
.stat { padding: 20px 22px; }
.stat .label { font-size: 12.5px; font-weight: 550; }
.stat .value { font-size: clamp(27px, 2.2vw, 34px); font-weight: 650; }
.table th, .table td { padding: 12px 15px; }
.table th { font-size: 11.5px; font-weight: 650; letter-spacing: .025em; }
.table tbody tr:hover td { background: var(--row-hover); }
.btn { min-height: 37px; border-radius: 9px; font-weight: 550; }
.btn-sm { min-height: 30px; }
.btn-primary { box-shadow: 0 4px 12px -7px var(--accent); }
.input, select.input, textarea.input { min-height: 39px; border-radius: 9px; }
textarea.input { min-height: 90px; }
.input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.modal, .pm-palette-box { border-radius: 18px; }
.help-panel { border-radius: var(--r-lg); }
:focus-visible { outline-offset: 3px; }
@media (max-width: 1100px) {
  .main { padding-left: 24px; padding-right: 24px; }
  .topbar { margin-left: -24px; margin-right: -24px; padding-right: 24px; }
}
@media (max-width: 820px) {
  .main { padding: 18px 16px 40px; }
  .topbar { margin: -18px -16px 20px; padding: 0 16px; }
  .page-head { gap: 12px; margin-bottom: 18px; }
  .grid { gap: 12px; }
  .card-head { padding: 13px 15px; }
  .card-body { padding: 16px; }
  .stat { padding: 16px; }
  .table th, .table td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .nav a, .btn, .input { transition: none !important; }
}


/* Центр решений */
.dc-head { align-items: center; }
.dc-eyebrow { margin-bottom: 5px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.dc-personal { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 12px; }
.dc-personal .ico { width: 16px; height: 16px; color: var(--accent); }
.dc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.dc-stat { position: relative; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto auto; align-items: center; gap: 1px 11px; min-height: 112px; padding: 17px 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.dc-stat::after { position: absolute; right: -22px; bottom: -38px; width: 105px; height: 105px; border: 1px solid color-mix(in srgb, var(--dc-color, var(--accent)) 10%, transparent); border-radius: 50%; content: ""; }
.dc-stat-icon { grid-row: 1 / span 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--dc-color, var(--accent)); background: color-mix(in srgb, var(--dc-color, var(--accent)) 12%, transparent); }
.dc-stat-icon .ico { width: 18px; height: 18px; }
.dc-stat-label { color: var(--text-2); font-size: 12px; font-weight: 600; }
.dc-stat b { color: var(--text); font-size: 27px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dc-stat small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.dc-stat-risk { --dc-color: var(--red); }
.dc-stat-market { --dc-color: var(--blue); }
.dc-stat-quality { --dc-color: var(--amber); }
.dc-stat-active { --dc-color: var(--accent); }
.dc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dc-tabs { display: flex; align-items: center; gap: 4px; max-width: 100%; overflow-x: auto; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.dc-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.dc-tabs a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.dc-tabs a.is-active { color: var(--accent); background: var(--accent-soft); }
.dc-tabs a span { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.dc-tabs a.is-active span { background: var(--accent-border); color: var(--accent); }
.dc-note { color: var(--muted); font-size: 11.5px; }
.dc-list { display: grid; gap: 10px; }
.dc-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 17px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.dc-item:hover { border-color: var(--border-strong); box-shadow: 0 5px 18px rgba(20, 32, 43, .05); }
.dc-item.is-critical { border-left: 3px solid var(--red); padding-left: 16px; }
.dc-item-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--dc-color, var(--accent)); background: color-mix(in srgb, var(--dc-color, var(--accent)) 11%, transparent); }
.dc-item-icon .ico { width: 19px; height: 19px; }
.dc-type-loss { --dc-color: var(--red); }
.dc-type-market { --dc-color: var(--blue); }
.dc-type-missing, .dc-type-parser { --dc-color: var(--amber); }
.dc-item-main { min-width: 0; }
.dc-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 7px; }
.dc-kind, .dc-state, .dc-resolved { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 10.5px; font-weight: 650; }
.dc-kind-loss { background: var(--red-soft); color: var(--red-text); }
.dc-kind-market { background: var(--blue-soft); color: var(--blue-text); }
.dc-kind-missing, .dc-kind-parser { background: var(--amber-soft); color: var(--amber); }
.dc-state-progress { background: var(--blue-soft); color: var(--blue-text); }
.dc-state-snoozed { background: var(--amber-soft); color: var(--amber); }
.dc-state-done, .dc-resolved { background: var(--green-soft); color: var(--green-text); }
.dc-item h2 { margin: 0 0 4px; font-size: 14px; line-height: 1.4; }
.dc-item h2 a { color: var(--text); }
.dc-item h2 a:hover { color: var(--link); }
.dc-item p { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.dc-sku { margin-top: 6px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.dc-impact { display: flex; flex-direction: column; align-items: flex-end; padding: 2px 4px 0 8px; white-space: nowrap; }
.dc-impact b { color: var(--dc-color, var(--text)); font-size: 16px; font-variant-numeric: tabular-nums; }
.dc-impact span { color: var(--muted); font-size: 10.5px; }
.dc-actions { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 3px; }
.dc-action-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-snooze { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.dc-snooze .input { width: auto; min-height: 30px; padding: 4px 7px; font-size: 11.5px; }
.dc-actions .btn { min-height: 30px; }
.dc-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; text-align: center; }
.dc-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 3px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.dc-empty-icon .ico { width: 24px; height: 24px; }
.dc-empty h2 { font-size: 16px; }
.dc-empty p { max-width: 50ch; margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) { .dc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .dc-head { align-items: flex-start; }
  .dc-personal { width: 100%; }
  .dc-stats { gap: 9px; margin-bottom: 16px; }
  .dc-stat { min-height: 100px; padding: 13px; grid-template-columns: 30px 1fr; gap: 1px 8px; }
  .dc-stat-icon { width: 30px; height: 30px; border-radius: 9px; }
  .dc-stat b { font-size: 23px; }
  .dc-toolbar { align-items: flex-start; }
  .dc-tabs { width: 100%; }
  .dc-item { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .dc-item.is-critical { padding-left: 12px; }
  .dc-item-icon { width: 32px; height: 32px; border-radius: 10px; }
  .dc-impact { grid-column: 2; align-items: flex-start; padding: 0; }
  .dc-actions { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .dc-stats { grid-template-columns: 1fr 1fr; }
  .dc-stat small { font-size: 10px; }
  .dc-action-form { width: 100%; }
  .dc-actions > .btn { width: 100%; }
  .dc-snooze { flex: 1 1 auto; }
  .dc-snooze .input { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .dc-item { transition: none; } }


/* Матрица покрытия конкурентами */
.cv-head { align-items: center; }
.cv-eyebrow { margin-bottom: 5px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.cv-freshness { padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11.5px; white-space: nowrap; }
.cv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.cv-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 105px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.cv-stat-label { color: var(--text-2); font-size: 12px; font-weight: 600; }
.cv-stat b { color: var(--cv-color, var(--text)); font-size: 27px; font-weight: 700; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.cv-stat small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.cv-stat-coverage { --cv-color: var(--accent); }
.cv-stat-missing { --cv-color: var(--blue); }
.cv-stat-error { --cv-color: var(--red); }
.cv-stat-stale { --cv-color: var(--amber); }
.cv-filter-card { margin-bottom: 14px; }
.cv-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 14px 16px; }
.cv-filters label { display: flex; flex-direction: column; gap: 5px; min-width: 145px; flex: 1 1 145px; color: var(--muted); font-size: 11px; font-weight: 600; }
.cv-filter-pick { display: flex; flex: 1 1 145px; flex-direction: column; gap: 5px; min-width: 145px; color: var(--muted); font-size: 11px; font-weight: 600; }
.cv-filter-pick .cmp-brands { width: 100%; }
.cv-filter-pick .cmp-brands-pop { z-index: 55; }
.cv-filters label.cv-search { flex: 1.5 1 190px; }
.cv-filters .input { min-height: 36px; padding: 6px 9px; font-size: 12px; }
.cv-filters > .btn { min-height: 36px; }
.cv-table-card { overflow: hidden; }
.cv-table-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; color: var(--text-2); font-size: 12px; }
.cv-table-head span { color: var(--muted); font-size: 11px; }
.cv-table-head #cv-columns-slot { margin-left: auto; }
.cv-table-head #cv-columns-slot .pc-cols { position: relative; }
.cv-table-wrap { max-height: calc(100vh - 390px); min-height: 240px; }
.cv-table { min-width: 940px; }
.cv-table .cv-product-h { position: sticky; left: 0; z-index: 4; min-width: 380px; background: var(--surface-2); }
.cv-table .cv-summary-h { min-width: 100px; }
.cv-table .cv-comp-h { min-width: 130px; max-width: 190px; white-space: normal; line-height: 1.3; }
.cv-table .cv-comp-h .dot { width: 7px; height: 7px; margin-right: 5px; }
.cv-table .cv-comp-h.is-selected { box-shadow: inset 0 3px 0 var(--accent); }
.cv-table .cv-product-cell { position: sticky; left: 0; z-index: 2; min-width: 380px; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.cv-table tbody tr:hover .cv-product-cell { background: var(--row-hover); }
.cv-product-cell .cell-title { display: inline; max-width: none; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.cv-product-cell .cell-sub { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.cv-summary-cell { min-width: 100px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv-summary-cell b { font-size: 12px; }
.cv-summary-cell small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.cv-summary-error { color: var(--red); }
.cv-status-cell { min-width: 130px; max-width: 190px; text-align: center !important; }
.cv-status-cell.is-selected { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.cv-table tbody tr:hover .cv-status-cell { background: var(--row-hover); }
.cv-table tbody tr:hover .cv-status-cell.is-selected { background: color-mix(in srgb, var(--accent) 8%, var(--row-hover)); }
.cv-link-missing { display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-size: 11px; font-weight: 600; }
.cv-link-missing .ico { width: 13px; height: 13px; }
.cv-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.cv-state-error .cv-pill { background: var(--red-soft); color: var(--red-text); }
.cv-state-not-found .cv-pill { background: var(--amber-soft); color: var(--amber); }
.cv-state-new .cv-pill, .cv-state-stale .cv-pill { background: var(--blue-soft); color: var(--blue-text); }
.cv-state-paused .cv-pill { background: var(--surface-3); color: var(--muted); }
.cv-price { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text); font-size: 11px; text-decoration: none; }
.cv-price:hover { color: var(--link); text-decoration: none; }
.cv-price b { font-size: 12px; font-variant-numeric: tabular-nums; }
.cv-price small { color: var(--muted); font-size: 9.5px; }
.cv-price small.is-out { color: var(--red); }
.cv-price .cv-age { opacity: .8; }
.cv-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; text-align: center; }
.cv-empty-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); }
.cv-empty-icon .ico { width: 23px; height: 23px; }
.cv-empty h2 { font-size: 16px; }
.cv-empty p { max-width: 52ch; margin: 0 0 8px; color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .cv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cv-table-wrap { max-height: calc(100vh - 440px); } }
@media (max-width: 820px) {
  .cv-head { align-items: flex-start; }
  .cv-freshness { white-space: normal; }
  .cv-stats { gap: 9px; }
  .cv-stat { min-height: 94px; padding: 13px; }
  .cv-stat b { font-size: 23px; }
  .cv-filters { align-items: stretch; }
  .cv-filters label, .cv-filters label.cv-search, .cv-filter-pick { flex: 1 1 42%; }
  .cv-filters > .btn { flex: 1 1 100px; }
  .cv-table-wrap { max-height: calc(100vh - 470px); }
}
@media (max-width: 520px) {
  .cv-stats { grid-template-columns: 1fr 1fr; }
  .cv-stat small { font-size: 10px; }
  .cv-filters label, .cv-filters label.cv-search, .cv-filter-pick { flex-basis: 100%; }
  .cv-table-head { align-items: flex-start; flex-direction: column; }
  .cv-table-wrap { max-height: none; }
}

/* Общая динамичная система интерфейса */
:root {
  --accent: #087f75;
  --accent-hover: #066b63;
  --accent-2: #38b7a5;
  --accent-soft: #e4f5f1;
  --accent-border: #bce6dc;
  --link: #087f75;
  --link-hover: #065f59;
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}
:root[data-theme="dark"] {
  --accent: #31b6a4;
  --accent-hover: #50c9b8;
  --accent-2: #57d1bf;
  --accent-soft: #163a35;
  --accent-border: #28594f;
  --link: #64d2c2;
  --link-hover: #90e3d8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #31b6a4;
    --accent-hover: #50c9b8;
    --accent-2: #57d1bf;
    --accent-soft: #163a35;
    --accent-border: #28594f;
    --link: #64d2c2;
    --link-hover: #90e3d8;
  }
}
body {
  background-image: radial-gradient(ellipse at 88% 0%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 34rem);
  background-attachment: fixed;
}
.sidebar {
  background-image: radial-gradient(ellipse at 5% 0%, rgba(38, 173, 153, .14), transparent 22rem), linear-gradient(160deg, var(--side), var(--side-2) 72%, var(--side));
}
.brand-mark {
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(145deg, #56d9c1 0%, #12a58f 45%, #087468 100%);
  box-shadow: 0 8px 20px -8px rgba(17, 165, 143, .8), inset 0 1px 0 rgba(255,255,255,.42);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-7deg) scale(1.06); box-shadow: 0 10px 24px -7px rgba(17, 165, 143, .75); }
.brand-mark .ico { filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.brand { min-width: 0; }
.brand-logo { display: block; width: 204px; max-width: 100%; height: auto; }
.brand-symbol { display: none; width: 36px; height: 36px; }
html.side-mini .brand-logo { display: none; }
html.side-mini .brand-symbol { display: block; }
.auth-logo { display: block; width: min(220px, 100%); height: auto; }
.auth-mark-sm .auth-logo { width: min(190px, 100%); }
.nav a { transition: color .18s, background .18s, transform .18s var(--ease); }
.nav a:hover { transform: translateX(2px); }
.nav-ico { border: 1px solid rgba(255,255,255,.055); transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s; }
.nav a:hover .nav-ico { transform: translateY(-1px); }
.nav a.active .nav-ico { border-color: color-mix(in srgb, var(--sec) 65%, white); background: linear-gradient(145deg, color-mix(in srgb, var(--sec) 82%, white), var(--sec)); }
.nav-ico .ico, .sec-ico .ico, .dc-item-icon .ico, .dc-stat-icon .ico, .cv-empty-icon .ico { transition: transform .22s var(--ease); }
.nav a:hover .nav-ico .ico, .card-head:hover .sec-ico .ico { transform: scale(1.08) rotate(-3deg); }
.main { animation: pm-view-in .38s var(--ease) backwards;   /* не both: остаточный transform ломал position:fixed внутри .main */ }
.page-head { position: relative; }
.page-head h1 { line-height: 1.16; }
.page-head h1.with-ico { position: relative; padding-bottom: 8px; }
.page-head h1.with-ico::after { position: absolute; bottom: 0; left: 0; }
.page-head h1::after { display: block; width: 34px; height: 3px; margin-top: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); content: ""; opacity: .9; }
.card, .stat, .project-card, .dc-item, .dc-stat, .cv-stat {
  position: relative;
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s;
}
.card:hover, .project-card:hover, .dc-item:hover { transform: translateY(-2px); }
.stat:hover, .dc-stat:hover, .cv-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.card::before {
  position: absolute; z-index: 1; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
  content: ""; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.card:hover::before { opacity: 1; }
.card-head { background-image: linear-gradient(110deg, color-mix(in srgb, var(--accent) 3%, var(--surface)), var(--surface) 45%); }
.stat { overflow: hidden; }
.stat-products { --stat-color: var(--accent); }
.stat-competitors { --stat-color: var(--blue); }
.stat-errors { --stat-color: var(--red); }
.stat-queue { --stat-color: var(--amber); }
.stat-icon { position: absolute; z-index: 2; top: 17px; right: 18px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid color-mix(in srgb, var(--stat-color, var(--accent)) 24%, transparent); border-radius: 13px; color: var(--stat-color, var(--accent)); background: color-mix(in srgb, var(--stat-color, var(--accent)) 11%, var(--surface)); transition: transform .22s var(--ease), box-shadow .22s; }
.stat-icon .ico { width: 20px; height: 20px; }
.stat:hover .stat-icon { transform: translateY(-2px) rotate(-4deg); box-shadow: 0 5px 12px -7px var(--stat-color, var(--accent)); }
.stat .label, .stat .value, .stat .hint { position: relative; z-index: 1; }
.stat .label, .stat .value { padding-right: 44px; }
.bar { display: flex; gap: 3px; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 1px 2px rgba(20,32,43,.08); }
.bar span { display: block; min-width: 0; border-radius: 999px; transform-origin: left center; animation: pm-bar-in .72s var(--ease) both; }
.bar span:nth-child(2) { animation-delay: .08s; }
.bar span:nth-child(3) { animation-delay: .16s; }
.bar span:nth-child(4) { animation-delay: .24s; }
.legend a { padding: 6px 8px; border-radius: 8px; transition: background .16s, transform .16s var(--ease); }
.legend a:hover { background: var(--surface-2); transform: translateX(2px); text-decoration: none; }
.stat::after, .dc-stat::after {
  position: absolute; right: -28px; top: -40px; width: 112px; height: 112px;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 50%;
  content: ""; pointer-events: none;
}
.btn { transition: transform .16s var(--ease), box-shadow .18s, background .18s, border-color .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background-image: linear-gradient(115deg, var(--accent), color-mix(in srgb, var(--accent) 75%, #38c4ad)); }
.btn-primary:hover { box-shadow: 0 8px 18px -9px var(--accent); }
.icon-btn { transition: transform .16s var(--ease), color .16s, background .16s; }
.icon-btn:hover { transform: translateY(-1px) scale(1.05); }
.input, select.input, textarea.input { transition: border-color .16s, box-shadow .16s, background .16s; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { box-shadow: inset 0 1px color-mix(in srgb, var(--accent) 6%, transparent), inset 0 -1px color-mix(in srgb, var(--accent) 6%, transparent); }
.badge, .pill, .status, .dc-kind, .dc-state, .cv-pill { letter-spacing: .01em; }
.sec-ico, .dc-item-icon, .dc-stat-icon, .cv-empty-icon {
  background-image: linear-gradient(145deg, color-mix(in srgb, currentColor 8%, var(--surface)), color-mix(in srgb, currentColor 15%, var(--surface)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 8px -6px currentColor;
}
.sec-ico .ico, .dc-item-icon .ico, .dc-stat-icon .ico { filter: drop-shadow(0 1px 1px color-mix(in srgb, currentColor 18%, transparent)); }
.auth-body { background-image: radial-gradient(ellipse at 15% 10%, rgba(50,190,167,.16), transparent 32rem), radial-gradient(ellipse at 90% 90%, rgba(73,127,220,.09), transparent 28rem); }
.auth-box { border: 1px solid color-mix(in srgb, var(--border) 80%, transparent); box-shadow: 0 24px 70px -35px rgba(13, 32, 43, .45); }
.feat-ico { filter: drop-shadow(0 8px 12px rgba(13, 130, 112, .12)); }
.pm-progress { background: linear-gradient(90deg, #27ad99, #75e0c9, #27ad99); background-size: 200% 100%; animation: pm-progress-flow 1.4s linear infinite; }
@keyframes pm-view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pm-progress-flow { to { background-position: -200% 0; } }
@keyframes pm-bar-in { from { transform: scaleX(.05); opacity: .45; } to { transform: scaleX(1); opacity: 1; } }
@media (max-width: 820px) {
  body { background-attachment: scroll; }
  .card:hover, .project-card:hover, .dc-item:hover, .stat:hover, .dc-stat:hover, .cv-stat:hover { transform: none; }
  .nav a:hover { transform: none; }
  .legend a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .main { animation: none; }
}
.catalog-progress {
  position: sticky;
  top: var(--topbar-h);
  z-index: 39;
  margin: -22px -36px 18px;
  padding: 9px 36px 11px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.catalog-progress[hidden] { display: none; }
.catalog-progress-head { display: flex; align-items: center; gap: 9px; min-height: 20px; font-size: 12px; }
.catalog-progress-head strong { flex: none; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-progress-live { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: catalog-pulse 1.4s ease-in-out infinite; }
.catalog-progress-detail { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.catalog-progress-percent { margin-left: auto; color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.catalog-progress-track { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.catalog-progress-track > span { position: relative; display: block; width: 0; height: 100%; overflow: hidden; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 42%, transparent); transition: width .45s ease; }
.catalog-progress.is-active .catalog-progress-track > span::after { content: ""; position: absolute; inset: 0 auto 0 -40%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: catalog-shimmer 1.35s ease-in-out infinite; }
.catalog-progress.is-active .catalog-progress-live { animation-duration: .85s; }
.catalog-progress.is-indeterminate .catalog-progress-track > span { animation: catalog-scan 1.6s ease-in-out infinite; }
@keyframes catalog-pulse { 50% { opacity: .45; transform: scale(.8); } }
@keyframes catalog-scan { from { transform: translateX(-110%); } to { transform: translateX(270%); } }
@keyframes catalog-shimmer { from { left: -40%; } to { left: 110%; } }
@media (max-width: 760px) {
  .catalog-progress { margin: -16px -16px 14px; padding: 8px 16px 10px; }
  .catalog-progress-head { gap: 7px; font-size: 11px; }
  .catalog-progress-head strong { max-width: 44%; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-progress-live, .catalog-progress.is-indeterminate .catalog-progress-track > span,
  .catalog-progress-track > span::after { animation: none !important; }
  .catalog-progress-track > span { transition: none; }
}
.bld-diagnostic { margin-top: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; line-height: 1.5; }
.bld-diagnostic > div { margin-top: 3px; color: var(--muted); }
.bld-diagnostic ul { margin: 6px 0 0; padding-left: 19px; color: var(--muted); }
.bld-diagnostic li + li { margin-top: 2px; }
.bld-diagnostic.is-ok { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.bld-diagnostic.is-warning { border-color: color-mix(in srgb, #d98b16 35%, var(--border)); background: color-mix(in srgb, #f5ad32 9%, var(--surface)); }
.bld-diagnostic.is-error { border-color: color-mix(in srgb, #d84949 35%, var(--border)); background: color-mix(in srgb, #e95050 8%, var(--surface)); }
