  [x-cloak] { display: none !important; }

  .topbar {
    height: auto;
    min-height: var(--header-h);
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: center;
  }

  .dashboard-shell {
    display: grid;
    gap: 22px;
  }
  .status-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--c-green);
    box-shadow: 0 0 0 4px rgba(34,197,94,.12);
    flex-shrink: 0;
    margin-top: 2px;
  }
  .topbar-dashboard-controls {
    flex: 1 1 auto;
    margin-left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
  }
  .service-segment {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .service-segment--sync {
    gap: 8px;
    min-width: 0;
    flex: 0 0 184px;
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
    border-radius: 12px;
    min-height: 42px;
    overflow: hidden;
    transition: background .16s ease;
  }
  .service-segment--sync:hover {
    background: rgba(37, 99, 235, .04);
  }
  .service-sync-copy {
    min-width: 0;
    width: 100%;
    display: grid;
    gap: 3px;
    align-content: center;
    max-width: 100%;
    overflow: hidden;
  }
  .service-sync-title {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .service-sync-sub {
    color: var(--c-muted-soft);
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
    transition: .16s ease;
    white-space: nowrap;
  }
  button,
  [role="button"],
  [x-on\:click],
  [\@click],
  [\@click\.prevent],
  [\@click\.self],
  [\@click\.escape\.window] {
    cursor: pointer;
  }
  button:disabled,
  [aria-disabled="true"] {
    cursor: not-allowed;
  }
  .dashboard-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
  }
  .dashboard-btn.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
  }
  .dashboard-btn.primary:hover {
    background: var(--blue-d);
    border-color: var(--blue-d);
    color: #fff;
  }
  .dashboard-btn.ghost {
    background: #fff;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  .topbar-fbo-chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    cursor: pointer;
    color: var(--ink, #0f172a);
    transition: background 120ms;
    line-height: 1.2;
  }
  .topbar-fbo-chip:hover {
    background: #e2e8f0;
  }
  .topbar-fbo-chip b {
    font-weight: 700;
  }
  .hero-card {
    position: relative;
    overflow: visible;
    padding: 14px 14px 12px;
    min-height: 148px;
    border: 1px solid rgba(214, 225, 239, .92);
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .hero-card > * {
    position: relative;
    z-index: 1;
  }
  .hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
  }
  .hero-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
  }
  .hero-label {
    color: var(--c-muted-soft);
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 0;
  }
  .hero-icon-shell {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(37, 99, 235, .06);
    border: 1px solid rgba(191, 219, 254, .7);
    flex-shrink: 0;
  }
  .hero-icon-shell.green {
    background: rgba(22, 163, 74, .07);
    border-color: rgba(187, 247, 208, .8);
  }
  .hero-icon-shell.violet {
    background: rgba(147, 51, 234, .07);
    border-color: rgba(221, 214, 254, .9);
  }
  .hero-icon-shell.orange {
    background: rgba(249, 115, 22, .07);
    border-color: rgba(254, 215, 170, .85);
  }
  .hero-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: var(--fs-lg);
    background: rgba(0,91,255,.08);
    color: var(--blue);
    flex-shrink: 0;
  }
  .hero-icon.green { background: rgba(34,197,94,.12); color: var(--c-green); }
  .hero-icon.violet { background: rgba(168,85,247,.12); color: var(--c-violet-hover); }
  .hero-icon.orange { background: rgba(249,115,22,.12); color: var(--c-orange-hover); }
  .hero-value {
    margin-top: 2px;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0;
  }
  .hero-delta-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background: rgba(var(--c-muted-soft-rgb), .10);
    color: var(--c-muted-soft);
  }
  .hero-delta-pill.positive { color: var(--c-green-hover); background: rgba(22,163,74,.12); }
  .hero-delta-pill.negative { color: var(--red); background: rgba(239,68,68,.10); }
  .hero-delta-pill.neutral { color: var(--c-muted-soft); background: rgba(148,163,184,.10); }
  .hero-trend-caption {
    color: var(--c-muted-soft);
    font-size: 11px;
    line-height: 1.2;
    margin-top: 2px;
    letter-spacing: 0;
  }
  .hero-trend {
    display: grid;
    gap: 5px;
    padding-top: 0;
    border-top: 0;
    background: transparent;
    border-radius: 0;
  }
  .hero-trend-track {
    width: 100%;
    height: 42px;
    position: relative;
    border-bottom: 1px solid rgba(226, 232, 240, .95);
  }
  .hero-sparkline {
    position: absolute;
    inset: 2px 0 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    color: var(--c-blue);
  }
  .hero-trend-track.green .hero-sparkline { color: var(--c-green); }
  .hero-trend-track.violet .hero-sparkline { color: var(--c-violet-hover); }
  .hero-trend-track.orange .hero-sparkline { color: var(--c-orange-hover); }
  .hero-sparkline-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
  }
  .hero-trend-hit {
    position: absolute;
    z-index: 2;
    left: var(--dot-left, 0%);
    top: var(--dot-top, 50%);
    width: 24px;
    height: 24px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    transition: filter .16s ease, transform .16s ease;
    cursor: pointer;
  }
  .hero-trend-hit::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .16);
    transform: translate(-50%, -50%);
  }
  .hero-trend-track.green .hero-trend-hit { color: var(--c-green); }
  .hero-trend-track.violet .hero-trend-hit { color: var(--c-violet-hover); }
  .hero-trend-track.orange .hero-trend-hit { color: var(--c-orange-hover); }
  .hero-trend-track.blue .hero-trend-hit,
  .hero-trend-hit { color: var(--c-blue); }
  .hero-trend-hit:hover {
    transform: translate(-50%, -50%) scale(1.18);
  }
  /* CSS-тултип со значением среза — поверх нативного title. */
  .hero-trend-hit::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .14s ease, transform .14s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .25);
  }
  .hero-trend-hit:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .hero-trend-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--c-muted-soft);
    font-size: 11px;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
  }
  .dashboard-title-row h2,
  .dashboard-main-title-block h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: 0;
  }
  .dashboard-title-sub {
    color: var(--c-muted-soft);
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.4;
  }
  .dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    gap: 22px;
    align-items: start;
  }
  .dashboard-main-card {
    border: 1px solid rgba(214, 225, 239, .92);
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 16px 34px rgba(148, 163, 184, .08);
    overflow: hidden;
  }
  .dashboard-main-card-body {
    padding: 36px 24px 22px;
  }
  .dashboard-main-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-top: 2px;
  }
  .dashboard-main-title-block {
    display: grid;
    gap: 0;
    align-items: start;
    min-width: 0;
  }
  .dashboard-main-head--periods {
    align-items: center;
  }
  .dashboard-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .dashboard-card {
    border: 1px solid rgba(214, 225, 239, .92);
    border-radius: 20px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 12px 28px rgba(var(--c-muted-soft-rgb), .08);
    overflow: hidden;
  }
  .dashboard-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--overlay-line);
  }
  .dashboard-card-head h3 {
    margin: 0;
    font-size: 17px;
  }
  .dashboard-card-head .hint {
    font-size: var(--fs-sm);
    color: var(--muted);
  }
  .dashboard-card-body {
    padding: 0 18px 18px;
  }
  .dashboard-card .dashboard-main-card-body {
    padding: 38px 24px 22px;
  }
  .status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .status-tile {
    padding: 15px 14px;
    border-radius: 18px;
    border: 1px solid var(--overlay-line);
    background: linear-gradient(180deg, var(--overlay-light), var(--overlay-panel));
  }
  .status-tile.info { background: var(--overlay-blue); border-color: rgba(59,130,246,.16); }
  .status-tile.warning { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.18); }
  .status-tile.danger { background: var(--overlay-red); border-color: rgba(239,68,68,.18); }
  .status-tile.success { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.18); }
  .status-label {
    color: var(--c-muted-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
  }
  .status-value {
    margin-top: 10px;
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--ink);
  }
  .status-sub {
    margin-top: 8px;
    font-size: var(--fs-sm);
    color: var(--muted);
    line-height: 1.45;
  }
  .period-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(214, 225, 239, .92);
    border-radius: 999px;
    background: rgba(248, 250, 252, .96);
  }
  .period-tabs button {
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--c-muted-soft);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .period-tabs button.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
  }
  .period-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .period-grid--main {
    align-items: stretch;
    max-height: 610px;
    overflow: auto;
    padding: 4px 8px 8px 4px;
    margin: -4px -8px -8px -4px;
  }
  .period-card {
    position: relative;
    width: 100%;
    border: 1px solid var(--c-line);
    border-radius: 16px;
    background: var(--c-panel);
    padding: 12px 13px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0;
    text-align: left;
    color: inherit;
    cursor: pointer;
    appearance: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
  }
  .period-card:hover,
  .period-card:focus-visible {
    border-color: var(--c-blue);
    box-shadow: var(--shadow-md);
    outline: none;
  }
  .period-card:active {
    transform: translateY(1px);
  }
  .period-card.is-current {
    border-color: var(--c-blue);
    box-shadow: var(--shadow-md);
  }
  .period-card.is-selected {
    border-color: var(--c-blue);
    background: var(--c-blue-bg);
    box-shadow: var(--shadow-md);
  }
  .period-main {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, .48fr);
    gap: 12px;
    align-items: stretch;
  }
  .period-info {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 6px;
  }
  .period-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .period-kicker {
    color: var(--c-muted-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .period-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    color: var(--c-blue);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .period-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
  }
  .period-range {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.35;
  }
  .period-profit-label {
    color: var(--c-muted-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .period-profit {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: 0;
  }
  .period-profit.negative { color: var(--red); }
  .period-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 0;
  }
  .period-stat {
    min-width: 0;
    padding: 6px 8px;
    border-radius: 9px;
    background: var(--c-panel-2);
    border: 1px solid var(--c-line);
  }
  .period-stat-label {
    color: var(--c-muted-soft);
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .period-stat-value {
    margin-top: 2px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .priority-grid, .insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .priority-card, .insight-card {
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 8px 20px rgba(var(--c-muted-soft-rgb), .06);
  }
  .priority-card, .insight-card {
    display: grid;
    align-content: start;
  }
  .priority-card.warning { background: rgba(245,158,11,.06); }
  .priority-card.danger { background: rgba(239,68,68,.06); }
  .priority-card.info { background: rgba(59,130,246,.06); }
  .priority-card.success { background: rgba(16,185,129,.06); }
  .priority-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .priority-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--blue);
    background: var(--overlay-blue);
  }
  .priority-count.danger {
    color: var(--c-red-hover);
    background: rgba(239, 68, 68, .10);
  }
  .priority-count.warning {
    color: var(--c-orange-hover);
    background: rgba(245, 158, 11, .14);
  }
  .priority-count.info {
    color: var(--c-blue);
    background: rgba(59, 130, 246, .10);
  }
  .priority-count.success {
    color: var(--c-green-hover);
    background: rgba(16, 185, 129, .12);
  }
  .priority-tone {
    color: var(--c-muted-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .priority-title, .insight-label {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
  }
  .priority-desc, .insight-meta {
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
  }
  .insight-kicker {
    color: var(--c-muted-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .insight-value {
    margin-top: 10px;
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
  }
  .insight-action-btn {
    margin-top: 14px;
    align-self: flex-start;
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }
  .rich-text {
    color: inherit;
    line-height: 1.5;
  }
  .rich-text > :first-child {
    margin-top: 0;
  }
  .rich-text > :last-child {
    margin-bottom: 0;
  }
  .rich-text p,
  .rich-text ul,
  .rich-text ol,
  .rich-text blockquote,
  .rich-text pre,
  .rich-text table {
    margin: 0 0 8px;
  }
  .rich-text h1,
  .rich-text h2,
  .rich-text h3,
  .rich-text h4,
  .rich-text h5,
  .rich-text h6 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
  }
  .rich-text ul,
  .rich-text ol {
    padding-left: 18px;
  }
  .rich-text code {
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(15, 23, 42, .06);
    font-size: .92em;
  }
  .rich-text pre {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .05);
    overflow: auto;
  }
  .rich-text table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    line-height: 1.45;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--overlay-line);
  }
  .rich-text th,
  .rich-text td {
    padding: 8px 9px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--overlay-line);
  }
  .rich-text th {
    color: var(--c-muted-soft);
    font-weight: 700;
    background: var(--overlay-panel);
  }
  .rich-text tr:last-child td {
    border-bottom: none;
  }
  .rich-text a {
    color: var(--blue);
    text-decoration: underline;
  }
  .rich-text-md {
    font-size: var(--fs-base);
  }
  .settings-field input,
  .settings-field textarea {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0 12px;
    color: var(--ink);
    outline: none;
  }
  .settings-field textarea {
    min-height: 110px;
    padding: 10px 12px;
    resize: vertical;
  }
  .settings-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.44);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 18px;
  }
  .settings-modal-backdrop.open { display: flex; }
  .settings-modal-backdrop.open {
    cursor: pointer;
  }
  .settings-modal {
    width: min(100%, 560px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
    overflow: hidden;
    cursor: default;
  }
  .settings-modal-head,
  .settings-modal-body,
  .settings-modal-foot {
    padding: 18px 20px;
  }
  .settings-modal-head,
  .settings-modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .settings-modal-head { border-bottom: 1px solid var(--line-soft); }
  .settings-modal-foot { border-top: 1px solid var(--line-soft); }
  .settings-grid { display: grid; gap: 14px; }
  .settings-field { display: grid; gap: 6px; }
  .settings-field label {
    color: var(--muted);
    font-size: var(--fs-sm);
  }
  .settings-help {
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
  }
  .settings-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .settings-meta-card {
    border: 1px solid var(--overlay-line);
    border-radius: 14px;
    background: var(--overlay-panel);
    padding: 12px 14px;
  }
  .settings-meta-label {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 4px;
  }
  .settings-meta-value {
    color: var(--ink);
    font-size: var(--fs-base);
    font-weight: 600;
  }
  .sync-progress-compact {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--overlay-panel);
  }
  .sync-progress-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }
  .sync-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
  }
  .sync-progress-badge.running { color: var(--c-blue); background: rgba(59,130,246,.12); }
  .sync-progress-badge.done { color: var(--c-green-hover); background: rgba(16,185,129,.12); }
  .sync-progress-badge.error { color: var(--c-red-hover); background: rgba(239,68,68,.12); }
  .sync-progress-badge.idle { color: var(--muted); background: rgba(148,163,184,.12); }
  .sync-progress-message { color: var(--ink); font-size: 13px; line-height: 1.45; }
  .sync-progress-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sync-progress-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-size: var(--fs-sm);
    color: var(--muted);
    background: #fff;
  }
  .sync-progress-step-copy {
    display: grid;
    gap: 1px;
    line-height: 1.15;
  }
  .sync-progress-step-copy small {
    color: inherit;
    opacity: .72;
    font-size: 11px;
    font-weight: 600;
  }
  .sync-progress-step.running {
    color: var(--c-blue);
    border-color: rgba(59,130,246,.25);
    background: var(--overlay-blue);
  }
  .sync-progress-step.done {
    color: var(--c-green-hover);
    border-color: rgba(16,185,129,.2);
    background: var(--overlay-green);
  }
  .sync-progress-step.error {
    color: var(--c-red-hover);
    border-color: rgba(239,68,68,.2);
    background: var(--overlay-red);
  }
  .sync-progress-step-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: .85;
  }
  .skeleton-card {
    min-height: 156px;
    border-radius: 22px;
    border: 1px solid var(--overlay-line);
    background: linear-gradient(180deg, var(--overlay-light), var(--overlay-panel));
    padding: 18px;
    display: grid;
    gap: 12px;
  }
  .skeleton {
    display: inline-block;
    background: linear-gradient(90deg, var(--c-bg-raised) 0%, var(--c-bg-raised) 50%, var(--c-bg-raised) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.25s linear infinite;
    border-radius: 999px;
  }
  .skeleton.line { height: 12px; width: 100%; }
  .skeleton.line.lg { height: 32px; }
  .skeleton.line.sm { width: 56%; }
  .skeleton.circle { border-radius: 50%; }
  .no-data {
    padding: 18px;
    border: 1px dashed var(--overlay-line);
    border-radius: 18px;
    background: var(--c-bg-raised);
    color: var(--muted);
    text-align: center;
  }
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 9998;
  }
  .drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
  }
  .drawer {
    position: fixed;
    top: 0;
    right: 0;
    cursor: default;
    width: min(100%, 560px);
    height: 100vh;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 40px rgba(15, 23, 42, .14);
    transform: translateX(104%);
    transition: transform .2s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
  }
  .drawer.open {
    transform: translateX(0);
  }
  .drawer-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .drawer-body {
    padding: 20px;
    overflow-y: auto;
  }
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  /* ============================================================
     Table improvements: sticky header, zebra, tooltip
     ============================================================ */
  table.data thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--panel, #fff);
    box-shadow: inset 0 -1px 0 var(--line-soft);
  }
  table.data tbody tr:nth-child(even) {
    background: var(--overlay-panel);
  }
  table.data tbody tr:hover {
    background: var(--c-bg-raised);
  }
  table.data tbody tr:active {
    background: var(--c-blue-bg-s);
  }
  /* ============================================================
     Animations & transitions
     ============================================================ */
  @keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .dashboard-card {
    animation: fadeSlideIn .3s ease both;
  }
  .dashboard-card:nth-child(2) { animation-delay: .04s; }
  .dashboard-card:nth-child(3) { animation-delay: .08s; }
  .dashboard-card:nth-child(4) { animation-delay: .12s; }
  .hero-card {
    animation: fadeSlideIn .28s ease both;
  }
  .hero-card:nth-child(2) { animation-delay: .05s; }
  .hero-card:nth-child(3) { animation-delay: .10s; }
  .hero-card:nth-child(4) { animation-delay: .15s; }

  /* Card hover — subtle lift */
  .hero-card,
  .priority-card,
  .insight-card,
  .period-card {
    transition: box-shadow .18s ease, transform .18s ease;
  }
  .hero-card:hover,
  .priority-card:hover,
  .insight-card:hover,
  .period-card:hover {
    box-shadow: 0 12px 28px rgba(138, 153, 174, .14);
    transform: translateY(-1px);
  }

  .pill {
    transition: filter .15s ease;
  }
  .pill:hover {
    filter: brightness(.92);
  }
  .dashboard-btn {
    transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
  }
  .dashboard-btn:active {
    transform: scale(.97);
  }
  @keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
  }
  .sync-progress-badge.running .sync-progress-step-dot,
  .sync-progress-step.running .sync-progress-step-dot {
    animation: pulse-dot 1.2s ease-in-out infinite;
  }
  .section-anchor {
    scroll-margin-top: 88px;
    scroll-behavior: smooth;
  }

  /* Reduced motion: disable transforms and animations */
  @media (prefers-reduced-motion: reduce) {
    .hero-card,
    .priority-card,
    .insight-card,
    .period-card,
    .dashboard-card {
      animation: none !important;
      transition: none !important;
    }
    .dashboard-btn:active { transform: none; }
  }

  /* Drawer transitions */
  .drawer {
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  }
  .drawer-backdrop {
    transition: opacity .2s ease;
  }

  /* ============================================================
     Responsive: 1101-1380px — keep 4-col hero, stacked main grid not applied
     ============================================================ */
  @media (min-width: 1101px) and (max-width: 1380px) {
    .hero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }

  /* ============================================================
     Responsive: 1100px — tablets landscape
     ============================================================ */
  @media (max-width: 1100px) {
    .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-main-grid { grid-template-columns: 1fr; }
    .status-grid, .period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar-dashboard-controls {
      flex-basis: 100%;
      margin-left: 0;
      grid-template-columns: 1fr auto;
    }
    .service-strip-card {
      flex-wrap: wrap;
    }
    .service-segment--store {
      min-width: 280px;
    }
    .period-grid--main {
      max-height: none;
      overflow: visible;
      padding-right: 0;
    }
  }

  /* ============================================================
     Responsive: 1180px — small laptops
     ============================================================ */
  @media (max-width: 1180px) {
    .dashboard-columns { grid-template-columns: 1fr; }
    .period-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .period-stat:last-child { grid-column: 1 / -1; }
    .topbar-dashboard-controls {
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .service-strip-card {
      flex-wrap: wrap;
      row-gap: 10px;
    }
  }

  /* ============================================================
     Responsive: 900px — tablets portrait
     ============================================================ */
  @media (max-width: 900px) {
    .hero-grid, .status-grid, .period-grid, .priority-grid, .insight-grid, .settings-meta {
      grid-template-columns: 1fr;
    }
    .dashboard-title-row {
      flex-direction: column;
      align-items: flex-start;
    }
    .dashboard-btn { flex: 1 1 180px; }
    .hero-card { min-height: auto; }
    .dashboard-main-grid { grid-template-columns: 1fr; }
    .period-stat-grid { grid-template-columns: 1fr; }
    .period-stat:last-child { grid-column: auto; }
    .ai-rec-head { flex-direction: column; }
    .ai-rec-date { white-space: normal; }
    .topbar-dashboard-controls {
      width: 100%;
      flex-basis: 100%;
      grid-template-columns: 1fr;
    }
    .service-strip-card {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding: 14px;
    }
    .service-divider {
      display: none;
    }
    .service-segment,
    .service-segment--sync {
      width: 100%;
    }
    .service-segment--meta {
      justify-content: flex-start;
    }
  }

  /* ============================================================
     Responsive: 640px — phones
     ============================================================ */
  @media (max-width: 640px) {
    .dashboard-shell { gap: 10px; }
    .dashboard-card,
    .dashboard-main-card { border-radius: 16px; }
    .dashboard-card-head { padding: 14px 14px 10px; }
    .dashboard-card-body { padding: 0 14px 14px; }
    .dashboard-card .dashboard-main-card-body { padding: 24px 16px 16px; }
    .hero-card { padding: 14px; border-radius: 16px; }
    .hero-value { font-size: 26px; }
    .hero-label { font-size: 12px; }
    .hero-icon { width: 36px; height: 36px; font-size: 16px; }
    .dashboard-btn { min-height: 44px; padding: 0 14px; font-size: 13px; border-radius: 12px; flex: 1 1 auto; }
    .dashboard-title-row h2 { font-size: 26px; }
    .period-tabs { flex-wrap: wrap; border-radius: 12px; }
    .period-tabs button { padding: 6px 10px; font-size: 12px; }
    .dashboard-main-head,
    .dashboard-main-head--periods {
      flex-direction: column;
      align-items: flex-start;
    }
    .topbar-dashboard-controls {
      gap: 8px;
    }
    .service-strip-card {
      padding: 12px;
      border-radius: 16px;
    }
    .service-store-select,
    .service-sync-title,
    .service-meta-value {
      font-size: 14px;
    }
    /* Table: horizontal scroll with sticky product column */
    .table-wrap { margin: 0 -14px; padding: 0 14px; }
    table.data { min-width: 700px; }
    table.data th, table.data td { padding: 8px 10px; font-size: 13px; }

    /* Drawer full-width on mobile */
    .drawer { width: 100%; }
    .drawer-head { padding: 14px 16px; }
    .drawer-body { padding: 16px; }

    /* Settings modal */
    .settings-modal { border-radius: 12px; }
    .settings-modal-head, .settings-modal-body, .settings-modal-foot { padding: 14px 16px; }

  }

  /* ============================================================
     AI recommendations
     ============================================================ */
  .ai-rec-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--overlay-light), var(--overlay-panel));
    border: 1px solid var(--overlay-line);
    border-left: 3px solid var(--border);
    transition: background .15s ease, box-shadow .15s ease;
    display: grid;
    gap: 10px;
  }
  .ai-rec-item:hover {
    background: rgba(248, 250, 252, .95);
    box-shadow: 0 10px 24px rgba(148, 163, 184, .09);
  }
  .ai-rec-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .ai-rec-kicker {
    color: var(--c-muted-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .ai-rec-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }
  .ai-rec-date {
    color: var(--c-muted-soft);
    font-size: var(--fs-sm);
    line-height: 1.3;
    white-space: nowrap;
  }
  .ai-rec-foot {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  .ai-rec-sku {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--overlay-panel);
    color: var(--c-muted-soft);
    font-size: var(--fs-sm);
    font-weight: 600;
  }
  .ai-rec-item.urgency-high { border-left-color: var(--red); }
  .ai-rec-item.urgency-medium { border-left-color: var(--orange); }
  .ai-rec-item.urgency-low { border-left-color: var(--teal); }
  .ai-rec-item .pill.restock { background: var(--c-blue-bg-s); color: var(--c-blue); }
  .ai-rec-item .pill.retire { background: var(--c-violet-bg); color: var(--c-violet-hover); }
  .ai-rec-item .pill.promo { background: var(--c-green-bg-s); color: var(--c-green-hover); }
  .ai-rec-item .pill.high { background: var(--c-red-bg-s); color: var(--c-red-hover); }
  .ai-rec-item .pill.medium { background: var(--c-orange-bg-s); color: var(--c-orange-hover); }
  .ai-rec-item .pill.low { background: var(--c-green-bg-s); color: var(--c-green-hover); }

  /* Chart metric toggle active state */
  .trend-card {
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    border-color: rgba(214, 225, 239, .92);
    box-shadow: 0 18px 40px rgba(148, 163, 184, .10);
  }
  .trend-card-body {
    padding: 24px 24px 20px;
  }
  .trend-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }
  .trend-title-zone {
    display: grid;
    gap: 10px;
    min-width: 280px;
  }
  .trend-title-zone h2 {
    margin: 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.08;
    letter-spacing: -.02em;
  }
  .trend-metric-chips,
  .trend-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .trend-controls {
    justify-content: flex-end;
  }
  .trend-metric-chip {
    --metric-color: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(214, 225, 239, .95);
    background: #fff;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, opacity .14s ease;
  }
  .trend-metric-chip.finance-gross { --metric-color: #2563eb; }
  .trend-metric-chip.finance { --metric-color: #0ea5e9; }
  .trend-metric-chip.net-profit { --metric-color: #16a34a; }
  .trend-metric-chip.units { --metric-color: #9333ea; }
  .trend-metric-chip.ozon-charges { --metric-color: #f97316; }
  .trend-metric-chip.active {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--metric-color) 32%, #dbe6f3);
    background: color-mix(in srgb, var(--metric-color) 10%, #fff);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--metric-color) 13%, transparent);
  }
  .trend-metric-chip.muted {
    opacity: .48;
  }
  .trend-metric-chip:hover {
    transform: translateY(-1px);
  }
  .trend-metric-dot,
  .trend-kpi-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--metric-color, var(--blue));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--metric-color, var(--blue)) 14%, transparent);
  }
  .trend-range-tabs,
  .trend-view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(214, 225, 239, .95);
    background: rgba(248, 250, 252, .92);
  }
  .trend-range-tabs button,
  .trend-view-tabs button {
    min-height: 32px;
    padding: 0 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--c-muted-soft);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }
  .trend-range-tabs button.active,
  .trend-view-tabs button.active {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
  }
  .trend-subtitle {
    margin-top: 12px;
    color: var(--c-muted-soft);
    font-size: 13px;
    line-height: 1.4;
  }
  .trend-combo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 14px;
    align-items: start;
  }
  .trend-combo-layout.with-numbers {
    grid-template-columns: minmax(0, 1.55fr) minmax(420px, .95fr);
  }
  .trend-combo-main {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: grid;
    gap: 12px;
  }
  .trend-chart-canvas--combo {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 350px;
    height: 350px;
    padding: 4px 0 0;
    overflow: hidden;
  }
  .trend-chart-canvas--combo .recharts-wrapper,
  .trend-chart-canvas--combo .recharts-surface {
    max-width: 100%;
    overflow: hidden;
  }
  .trend-chart-canvas--combo .recharts-cartesian-axis-tick-value {
    fill: var(--c-muted-soft);
    font-weight: 700;
  }
  .trend-chart-canvas--combo .recharts-cartesian-axis-line,
  .trend-chart-canvas--combo .recharts-cartesian-axis-tick-line {
    stroke: rgba(214, 225, 239, .88);
  }
  .trend-chart-canvas--combo .recharts-rectangle {
    transition: opacity .14s ease;
  }
  .trend-chart-canvas--combo .recharts-rectangle:hover {
    opacity: .78;
  }
  .recharts-dashboard-tooltip {
    min-width: 220px;
    padding: 12px 13px;
    border: 1px solid rgba(214, 225, 239, .96);
    border-radius: 14px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
    color: var(--ink);
  }
  .recharts-dashboard-tooltip-title {
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
  }
  .recharts-dashboard-tooltip-range {
    margin-top: 2px;
    color: var(--c-muted-soft);
    font-size: 11px;
    font-weight: 700;
  }
  .recharts-dashboard-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
    font-size: 12px;
  }
  .recharts-dashboard-tooltip-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--c-muted);
    font-weight: 700;
  }
  .recharts-dashboard-tooltip-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, .14);
  }
  .recharts-dashboard-tooltip strong {
    white-space: nowrap;
    color: var(--ink);
    font-weight: 900;
  }
  .trend-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(128px, 1fr));
    gap: 10px;
  }
  .trend-kpi-chip {
    --metric-color: var(--blue);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 5px 8px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid rgba(214, 225, 239, .9);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, rgba(248, 250, 252, .86));
  }
  .trend-kpi-chip.finance-gross { --metric-color: #2563eb; }
  .trend-kpi-chip.finance { --metric-color: #0ea5e9; }
  .trend-kpi-chip.net-profit { --metric-color: #16a34a; }
  .trend-kpi-chip.units { --metric-color: #9333ea; }
  .trend-kpi-chip.ozon-charges { --metric-color: #f97316; }
  .trend-kpi-name {
    color: var(--c-muted-soft);
    font-size: 12px;
    font-weight: 800;
  }
  .trend-kpi-chip strong {
    grid-column: 1 / -1;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.1;
  }
  .trend-kpi-delta {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 800;
  }
  .trend-kpi-delta.positive,
  .trend-table small.positive { color: var(--c-green-hover); }
  .trend-kpi-delta.negative,
  .trend-table small.negative { color: var(--red); }
  .trend-kpi-delta.neutral,
  .trend-table small.neutral { color: var(--c-muted-soft); }
  .trend-footnote,
  .trend-table-note {
    color: var(--c-muted-soft);
    font-size: 12px;
  }
  .trend-numbers-panel {
    min-width: 0;
    max-width: 100%;
    align-self: start;
    padding: 16px;
    border: 1px solid rgba(214, 225, 239, .92);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  }
  .trend-numbers-panel h3 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.2;
  }
  .trend-table-wrap {
    max-height: 430px;
    overflow: auto;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 14px;
    background: #fff;
  }
  .trend-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .trend-table tfoot th,
  .trend-table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 1;
  }
  .trend-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 12px;
  }
  .trend-table th,
  .trend-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(226, 232, 240, .86);
    border-right: 1px solid rgba(226, 232, 240, .64);
    text-align: left;
    vertical-align: top;
  }
  .trend-table th:last-child,
  .trend-table td:last-child { border-right: 0; }
  .trend-table thead th {
    color: var(--c-muted-soft);
    background: rgba(248, 250, 252, .96);
    font-weight: 800;
  }
  .trend-table tbody th {
    color: var(--ink-soft);
    font-weight: 800;
    white-space: nowrap;
  }
  .trend-table td strong,
  .trend-table tfoot strong {
    display: block;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
  }
  .trend-table td small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 800;
  }
  .trend-table tfoot th,
  .trend-table tfoot td {
    border-bottom: 0;
    background: rgba(248, 250, 252, .86);
  }
  .trend-table-note {
    margin-top: 10px;
  }

  @media (max-width: 1280px) {
    .trend-combo-layout.with-numbers { grid-template-columns: 1fr; }
    .trend-table-wrap { max-height: 360px; }
  }
  @media (max-width: 900px) {
    .trend-card-body { padding: 18px 16px; }
    .trend-controls { justify-content: flex-start; }
    .trend-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trend-chart-canvas--combo { min-height: 300px; height: 300px; }
  }

  .dashboard-btn.ghost.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .2);
  }
  .trend-chart-canvas {
    width: 100%;
    height: 100%;
  }
  .trend-chart-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    height: 100%;
  }
  .trend-chart-panel--multi {
    min-height: 340px;
  }
  .trend-chart-meta {
    color: var(--c-muted-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .trend-chart-svg {
    width: 100%;
    height: 180px;
    display: block;
    overflow: visible;
  }
  .trend-chart-svg--multi {
    height: 286px;
    overflow: visible;
  }
  .trend-hover-band {
    fill: transparent;
    pointer-events: all;
  }
  .trend-hover-band:hover {
    fill: rgba(37, 99, 235, .045);
  }
  .trend-grid-line {
    stroke: rgba(var(--c-muted-soft-rgb), .18);
    stroke-width: 1;
  }
  .trend-x-guide {
    stroke: rgba(var(--c-muted-soft-rgb), .10);
    stroke-width: 1;
  }
  .trend-zero-line {
    stroke: rgba(var(--c-muted-soft-rgb), .24);
    stroke-width: 1.2;
  }
  .trend-area {
    opacity: 1;
  }
  .trend-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .trend-line-multi {
    stroke-width: 2.4;
    opacity: .92;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .08));
  }
  .trend-dot {
    stroke: #fff;
    stroke-width: 2;
  }
  .trend-dot-multi {
    fill: var(--dot-color);
    stroke: #fff;
    stroke-width: 2.1;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .16));
  }
  .trend-x-label {
    fill: var(--c-muted-soft);
    font-size: 12px;
    font-weight: 700;
  }
  .trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .trend-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, .96);
    background: rgba(248, 250, 252, .92);
    color: var(--ink-soft);
    font-size: 12px;
  }
  .trend-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--legend-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--legend-color) 14%, transparent);
  }
  .trend-legend-name {
    color: var(--c-muted-soft);
    font-weight: 700;
  }
  .trend-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px;
  }
  .trend-footer-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--overlay-light), var(--overlay-panel));
    border: 1px solid var(--overlay-line);
    box-shadow: inset 0 1px 0 rgba(var(--c-panel-rgb), .9);
  }
  .trend-footer-label {
    color: var(--c-muted-soft);
    font-size: 11px;
    line-height: 1.3;
  }
  .trend-footer-value {
    margin-top: 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
  }
  .chart-empty {
    display: grid;
    place-items: center;
    height: 100%;
    border-radius: 18px;
    border: 1px dashed var(--overlay-line);
    color: var(--c-muted-soft);
    font-size: 13px;
    background: var(--overlay-panel);
  }

  /* ============================================================
     Focus styles for accessibility
     ============================================================ */
  .dashboard-btn:focus-visible,
  .period-tabs button:focus-visible,
  .settings-field input:focus-visible,
  .settings-field textarea:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }
  table.data tbody tr:focus-within {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
  }
  .drawer:focus { outline: none; }
  .drawer-close:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 8px;
  }

  /* ============================================================
     Utility classes
     ============================================================ */

  /* Padding utilities */
  .pt-5 { padding-top: var(--sp-5) !important; }
  .pt-4 { padding-top: var(--sp-4) !important; }

  /* Margin utilities */
  .mt-3 { margin-top: var(--sp-3) !important; }

  /* Height utilities */
  .h-8-5 { height: 34px; }

  /* Width utilities */
  .w-full { width: 100% !important; }
  .w-3/4 { width: 74% !important; }
  .w-1/2 { width: 48% !important; }

  /* Grid utilities */
  .col-full { grid-column: 1 / -1 !important; }

  /* Flex utilities */
  .flex.flex-col { flex-direction: column !important; }

  /* Gap utilities */
  .gap-2 { gap: var(--sp-2) !important; }
  .gap-4 { gap: var(--sp-4) !important; }

  /* Text margin reset */
  .m-0 { margin: 0 !important; }

  /* Max-width utilities */
  .max-w-md { max-width: 500px !important; }

  /* Text color utility */
  .text-orange { color: var(--c-orange) !important; }

/* ============================================================
   Финансовая сводка (главная) — структурированный список
   с иконкой, label, подписью и значением. Реактивен по
   selectedCalendarPeriod через summary().
   ============================================================ */
.fs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.fs-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line-soft, #eef0f3);
  border-radius: 12px;
  background: var(--panel, #fff);
  transition: background-color 0.15s ease;
}
.fs-row:hover { background: var(--panel-hover, #f9fafb); }
.fs-row--highlight {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.25);
}
.fs-row--highlight:hover { background: rgba(34, 197, 94, 0.10); }

.fs-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted, #6b7280);
  flex-shrink: 0;
}
.fs-icon--neutral { background: rgba(107, 114, 128, 0.08); color: var(--muted, #6b7280); }
.fs-icon--warn    { background: rgba(245, 158, 11, 0.10); color: #b45309; }
.fs-icon--info    { background: rgba(59, 130, 246, 0.10); color: #1d4ed8; }
.fs-icon--success { background: rgba(34, 197, 94, 0.12); color: #15803d; }

.fs-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fs-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #111827);
}
.fs-sub {
  font-size: 12px;
  color: var(--muted, #6b7280);
}
.fs-subrows {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fs-subrow {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted, #6b7280);
  gap: 12px;
}
.fs-subrow > span:last-child { color: var(--text, #111827); font-variant-numeric: tabular-nums; }

.fs-value {
  font-weight: 700;
  font-size: 16px;
  color: var(--text, #111827);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  align-self: center;
}
.fs-value--bad { color: var(--c-red, #dc2626); }

@media (max-width: 640px) {
  .fs-row { grid-template-columns: 32px 1fr auto; gap: 10px; padding: 10px; }
  .fs-icon { width: 32px; height: 32px; border-radius: 8px; }
  .fs-value { font-size: 14px; }
}

/* ============================================================
   Top-10 SKU (вместо невнятного списка-простыни)
   ============================================================ */
.top-skus-grid { display: grid; gap: 8px; }
.top-sku-row {
  display: grid;
  grid-template-columns: 28px 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--c-panel-2, #fbfcfe);
  border: 1px solid var(--c-line, #e6ebf2);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}
.top-sku-row:hover {
  border-color: var(--c-blue, #005bff);
  background: var(--c-panel, #fff);
  transform: translateY(-1px);
}
.top-sku-rank {
  font: 700 14px/1 var(--ff-mono, ui-monospace, monospace);
  color: var(--c-muted, #5f6b80);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.top-sku-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--c-line-soft, #f1f4f9); }
.top-sku-thumb--placeholder { display: grid; place-items: center; color: var(--c-muted, #5f6b80); }
.top-sku-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.top-sku-name {
  font: 600 13px/1.3 var(--ff-body, system-ui, sans-serif);
  color: var(--c-ink, #0e1422);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-sku-sub {
  font: 500 11px/1 var(--ff-mono, ui-monospace, monospace);
  color: var(--c-muted, #5f6b80);
  display: flex; gap: 6px; align-items: center;
}
.top-sku-sub b { color: var(--c-ink-soft, #36425a); font-weight: 600; }
.top-sku-money { text-align: right; }
.top-sku-revenue {
  font: 600 14px/1.2 var(--ff-mono, ui-monospace, monospace);
  color: var(--c-ink, #0e1422);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.top-sku-margin {
  font: 500 11px/1 var(--ff-mono, ui-monospace, monospace);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.top-sku-margin.is-pos  { color: var(--c-green, #237a57); }
.top-sku-margin.is-neg  { color: var(--c-red, #b43b3b); }
.top-sku-margin.is-zero { color: var(--c-muted, #5f6b80); }
@media (max-width: 640px) {
  .top-sku-row { grid-template-columns: 24px 40px 1fr; gap: 8px; padding: 8px 10px; }
  .top-sku-thumb { width: 40px; height: 40px; }
  .top-sku-money { grid-column: 1 / -1; text-align: right; }
}

/* ============================================================
   KPI page-load stagger (Phase 1 motion)
   ============================================================ */
.hero-grid > .kpi {
  opacity: 0;
  animation: kpi-reveal 200ms var(--ease-out, cubic-bezier(0,0,.4,1)) forwards;
}
.hero-grid > .kpi:nth-child(1) { animation-delay: 0ms; }
.hero-grid > .kpi:nth-child(2) { animation-delay: 60ms; }
.hero-grid > .kpi:nth-child(3) { animation-delay: 120ms; }
.hero-grid > .kpi:nth-child(4) { animation-delay: 180ms; }
@keyframes kpi-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Dashboard store card (service-strip перенесён в content) ---- */
.dashboard-store-card {
  margin-bottom: 12px;
}
.dashboard-store-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-size: 13px;
  flex-wrap: wrap;
}
.dashboard-store-meta .badge {
  background: rgba(37, 99, 235, .12);
  color: var(--blue, #2563eb);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
}
.dashboard-store-meta .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
