/* Единые токены интерфейса. Семантические цвета статусов независимы от акцента. */
:root {
    --color-bg: var(--ui-canvas);
    --color-glass: var(--ui-surface);
    --color-glass-border: var(--ui-border);
    --color-text-main: var(--ui-ink);
    --color-text-muted: var(--ui-muted);
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-primary: var(--ui-primary);
    --shadow-soft: 0 8px 32px rgba(24,43,35,.06);
    --shadow-card: var(--ui-shadow-card);
    --radius-lg: var(--ui-radius-md);
    --radius-xl: var(--ui-radius-lg);
    --ui-surface: #ffffff;
    --ui-surface-muted: #f0f4f6;
    --ui-canvas: #f6f8f9;
    --ui-border: #dce3e7;
    --ui-border-strong: #b6c6cf;
    --ui-ink: #202d37;
    --ui-muted: #61717e;
    --ui-subtle: #637381;
    --ui-primary: #286b82;
    --ui-primary-soft: #eaf2f6;
    --ui-radius-sm: 8px;
    --ui-radius-md: 12px;
    --ui-radius-lg: 16px;
    --ui-shadow-card: 0 1px 2px rgba(32,45,55,.035);
    --ui-shadow-float: 0 24px 65px rgba(15,23,42,.2);
    --ui-primary-hover: #20596d;
    --ui-accent: #8aafbe;
    --ui-accent-soft: #deebf1;
    --signal-good: #176b4e;
    --signal-good-bg: #e2efe8;
    --signal-good-border: #b7d4c6;
    --signal-warning: #986718;
    --signal-warning-bg: #f8f0dc;
    --signal-warning-border: #dcc896;
    --signal-risk: #b44747;
    --signal-risk-bg: #f8e9e9;
    --signal-risk-border: #dfb9b9;
    --signal-neutral: #61717e;
    --signal-neutral-bg: #eef2f5;
    --signal-neutral-border: #cfd9df;
}

@keyframes assistant-target-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
    18%, 72% { box-shadow: 0 0 0 5px rgba(99, 102, 241, .2), 0 18px 45px rgba(79, 70, 229, .16); }
}

.assistant-target-highlight {
    position: relative;
    z-index: 2;
    border-radius: 16px;
    animation: assistant-target-pulse 1.05s ease-in-out 3;
}

body.assistant-modal-open {
    overflow: hidden;
}

.assistant-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.assistant-modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(920px, 100%);
    height: min(820px, calc(100vh - 40px));
    padding-top: 34px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(238, 242, 255, 0.98));
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.3);
    transition: width 220ms ease, height 220ms ease, border-radius 220ms ease, box-shadow 220ms ease;
}

.assistant-modal-controls {
    position: absolute;
    top: 7px;
    right: 12px;
    z-index: 2;
    display: flex;
    gap: 4px;
}

.assistant-modal-control {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.assistant-modal-control:hover {
    color: #312e81;
    background: rgba(99, 102, 241, 0.12);
    transform: scale(1.04);
}

.assistant-modal-backdrop.is-minimized {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 22px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}

.assistant-modal-panel.is-minimized {
    width: min(330px, calc(100vw - 44px));
    height: 82px;
    padding: 0;
    border-radius: 22px;
    border-color: rgba(129, 140, 248, 0.34);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 55px rgba(49, 46, 129, 0.24);
    pointer-events: auto;
}

.assistant-modal-panel.is-minimized .assistant-modal-controls {
    top: 7px;
    right: 8px;
}

.assistant-mini-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 12px 48px 12px 14px;
    text-align: left;
}

.assistant-mini-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: white;
    font-size: 21px;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}

.assistant-mini-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: #1e293b;
}

.assistant-mini-copy strong { font-size: 14px; }
.assistant-mini-copy small { color: #64748b; font-size: 12px; }

.assistant-mini-expand {
    margin-left: auto;
    color: #6366f1;
    font-size: 18px;
}

.assistant-chat-shell {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

@media (max-width: 640px) {
    .assistant-modal-backdrop { padding: 0; }
    .assistant-modal-panel {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        border: 0;
    }
    .assistant-modal-backdrop.is-minimized {
        padding: 12px;
    }
    .assistant-modal-panel.is-minimized {
        width: calc(100vw - 24px);
        height: 76px;
        border: 1px solid rgba(129, 140, 248, 0.34);
        border-radius: 20px;
    }
}

/* Glassmorphism Utility */
.glass-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Transitions */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-enter-from {
    opacity: 0;
    transform: translateY(15px);
}

.fade-leave-to {
    opacity: 0;
    transform: translateY(-15px);
}

/* Utility Helpers */
.text-balance {
    text-wrap: balance;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ── Единые кнопки (btn-primary — главное действие, btn-secondary — обновить/служебные) ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    border: none;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn-secondary:hover { color: #4f46e5; border-color: #a5b4fc; }
.btn-secondary:active { transform: scale(0.97); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── KPI card top-accent (reveals on hover) ── */
.kpi-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kpi-accent:hover::before {
    transform: scaleX(1);
}

/* ── Connection pulse (while connecting) ── */
.conn-dot-pulse {
    position: relative;
}

.conn-dot-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    background: inherit;
    opacity: 0.5;
    animation: conn-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes conn-ping {
    0%   { transform: scale(1);   opacity: 0.5; }
    80%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ── Skeleton shimmer (for loading states) ── */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.14);
    border-radius: 10px;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.55),
        transparent);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
    .conn-dot-pulse::after,
    .skeleton::after { animation: none; }
}

/* ── Toast Notifications ── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-width: 340px;
    backdrop-filter: blur(12px);
}

.toast.toast-success {
    background: rgba(16, 185, 129, 0.92);
}

.toast.toast-error {
    background: rgba(239, 68, 68, 0.92);
}

.toast.toast-info {
    background: rgba(79, 70, 229, 0.92);
}

.toast.toast-warning {
    background: rgba(245, 158, 11, 0.92);
}

.toast-hide {
    animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

/* ── Scroll To Top ── */
#scroll-to-top {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 65;
    background: var(--ui-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--ui-shadow-card);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
}

#scroll-to-top.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background: var(--ui-primary-hover);
}
@media (max-width: 767px) { #scroll-to-top { bottom: 92px; } }

/* ── Mobile Bottom Nav ── */
@media (max-width: 767px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
        display: flex;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav-hidden {
        display: none;
    }

    body {
        padding-bottom: 68px;
    }
}

/* ── AI Assistant: Markdown content ── */
.chat-markdown {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    word-break: break-word;
}

.chat-markdown > *:first-child {
    margin-top: 0;
}

.chat-markdown > *:last-child {
    margin-bottom: 0;
}

.chat-markdown p {
    margin: 0 0 10px;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
    margin: 16px 0 8px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.chat-markdown h1 { font-size: 18px; }
.chat-markdown h2 { font-size: 16px; }
.chat-markdown h3 { font-size: 15px; }

.chat-markdown ul,
.chat-markdown ol {
    margin: 0 0 10px;
    padding-left: 22px;
}

.chat-markdown li {
    margin: 3px 0;
}

.chat-markdown li::marker {
    color: #6366f1;
}

.chat-markdown a {
    color: #4f46e5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-markdown strong {
    font-weight: 700;
    color: #1e293b;
}

.chat-markdown code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    padding: 1px 5px;
    border-radius: 6px;
}

.chat-markdown pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 12px 14px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 0 0 10px;
    font-size: 12.5px;
    line-height: 1.5;
}

.chat-markdown pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.chat-markdown blockquote {
    margin: 0 0 10px;
    padding: 4px 14px;
    border-left: 3px solid rgba(99, 102, 241, 0.4);
    color: #64748b;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 0 8px 8px 0;
}

.chat-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 10px;
    font-size: 13px;
    overflow: hidden;
    border-radius: 10px;
}

.chat-markdown th,
.chat-markdown td {
    border: 1px solid #e2e8f0;
    padding: 7px 10px;
    text-align: left;
}

.chat-markdown th {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
}

.chat-markdown tr:nth-child(even) td {
    background: #f8fafc;
}

.chat-markdown hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 14px 0;
}

/* Blinking caret while streaming */
.chat-caret::after {
    content: '▋';
    color: #6366f1;
    margin-left: 1px;
    animation: chat-blink 1s step-end infinite;
}

@keyframes chat-blink {
    50% { opacity: 0; }
}

/* ── Table Scroll Container & Sticky Headers ── */
.table-scroll-container {
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    position: relative;
}

.table-scroll-container thead {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9);
}

.table-scroll-container thead tr,
.table-scroll-container thead th {
    background-color: #ffffff !important;
}

/* ── Product navigation ── */
.app-shell-header {
    padding: 0 22px; background: rgba(255,255,255,.98);
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
.app-header-shell { width: min(100%,1760px); margin: 0 auto; }
.app-header-main {
    min-height: 60px; display: grid; grid-template-columns: minmax(170px,auto) minmax(0,1fr) auto;
    align-items: center; gap: 22px;
}
.app-brand {
    min-width: 0; display: inline-flex; align-items: center; gap: 10px; padding: 0; text-align: left;
    color: inherit; background: transparent; border: 0; cursor: pointer;
}
.app-brand-mark {
    width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; color: #fff;
    border-radius: 13px; background: linear-gradient(145deg,#6366f1,#7c3aed);
    box-shadow: 0 8px 18px rgba(99,102,241,.25);
}
.app-brand-mark svg { width: 21px; height: 21px; }
.app-brand-copy strong,.app-brand-copy small { display: block; white-space: nowrap; }
.app-brand-copy strong { color: #172033; font-size: 16px; line-height: 1.05; letter-spacing: -.025em; }
.app-brand-copy small { margin-top: 4px; color: #4f46e5; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.app-header-navigation { min-width: 0; }
.app-header-account { display: flex; align-items: center; justify-content: flex-end; gap: 9px; white-space: nowrap; }
.app-connection,.app-user { display: flex; align-items: center; gap: 7px; color: #475569; font-size: 12px; font-weight: 700; }
.app-connection { padding: 7px 9px; border-radius: 999px; background: #f8fafc; }
.app-connection-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.app-user > span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
.app-user button,.app-login {
    min-height: 32px; padding: 0 11px; color: #64748b; border: 1px solid #e2e8f0;
    border-radius: 10px; background: rgba(255,255,255,.72); font-size: 12px; font-weight: 700; cursor: pointer;
}
.app-user button:hover { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.app-login { color: #4f46e5; }
.notification-center { position: relative; flex: 0 0 auto; }
.notification-trigger { position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: #526074; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; transition: color .18s ease,border-color .18s ease,background .18s ease,transform .18s ease; }
.notification-trigger:hover,.notification-trigger.is-open { color: #4338ca; border-color: #c7d2fe; background: #f5f3ff; }.notification-trigger:active { transform: scale(.96); }.notification-trigger:focus-visible { outline: 3px solid rgba(99,102,241,.24); outline-offset: 2px; }
.notification-trigger svg { width: 20px; height: 20px; }.notification-trigger > span { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; color: #fff; border: 2px solid #fff; border-radius: 999px; background: #6366f1; font-size: 12px; font-weight: 700; line-height: 1; }.notification-trigger > span.has-critical { background: #e11d48; }
.notification-backdrop { position: fixed; inset: 0; z-index: 63; background: transparent; }
.notification-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 64; width: min(390px,calc(100vw - 28px)); overflow: hidden; border: 1px solid #dce2eb; border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 24px 60px rgba(15,23,42,.2); white-space: normal; }
.notification-popover > header { min-height: 68px; display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid #eef1f5; }.notification-popover > header small,.notification-popover > header strong { display: block; }.notification-popover > header small { color: #6366f1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }.notification-popover > header strong { margin-top: 2px; color: #172033; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }.notification-popover > header > span { min-width: 25px; height: 25px; display: grid; place-items: center; padding: 0 7px; color: #4338ca; border-radius: 999px; background: #eef2ff; font-size: 12px; font-weight: 700; }.notification-popover > header > button { width: 44px; height: 44px; color: #64748b; border: 0; border-radius: 10px; background: #f8fafc; font-size: 22px; cursor: pointer; }
.notification-list { max-height: min(520px,65vh); overflow-y: auto; padding: 6px; }.notification-list > button { width: 100%; min-height: 78px; display: grid; grid-template-columns: 9px minmax(0,1fr) 20px; align-items: center; gap: 11px; padding: 12px 10px; color: inherit; text-align: left; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }.notification-list > button:hover,.notification-list > button:focus-visible { background: #f8fafc; outline: none; }.notification-list > button + button { border-top: 1px solid #f0f2f6; border-radius: 0; }.notification-list > button > span small,.notification-list > button > span strong,.notification-list > button > span em { display: block; }.notification-list > button > span small { color: #64748b; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }.notification-list > button > span strong { margin-top: 3px; color: #172033; font-size: 13px; font-weight: 700; line-height: 1.35; }.notification-list > button > span em { margin-top: 3px; color: #64748b; font-size: 12px; font-style: normal; line-height: 1.4; }.notification-list > button > b { color: #6366f1; font-size: 15px; }
.notification-empty { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #64748b; text-align: center; }.notification-empty > span { width: 42px; height: 42px; display: grid; place-items: center; color: #047857; border-radius: 14px; background: #ecfdf5; font-size: 20px; }.notification-empty strong { margin-top: 12px; color: #263247; font-size: 14px; }.notification-empty small { margin-top: 3px; font-size: 12px; }.notification-loader { width: 30px; height: 30px; border: 3px solid #e0e7ff; border-top-color: #6366f1; border-radius: 50%; animation: notification-spin .8s linear infinite; }@keyframes notification-spin { to { transform: rotate(360deg); } }.notification-popover > footer { padding: 9px 14px; color: #8a95a5; border-top: 1px solid #eef1f5; background: #fbfcfe; font-size: 12px; text-align: center; }
.app-header-context {
    min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 22px;
    padding: 6px 0; border-top: 1px solid #eef1f5;
}
.header-secondary-nav,.header-period,.header-period-presets,.header-date,.header-context-label { display: flex; align-items: center; }
.header-secondary-nav { min-width: 0; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.header-secondary-nav::-webkit-scrollbar { display: none; }
.header-secondary-nav button {
    min-height: 34px; padding: 0 12px; color: #475569; white-space: nowrap; border: 0;
    border-radius: 9px; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer;
}
.header-secondary-nav button:hover { color: #334155; background: #f8fafc; }
.header-secondary-nav button.is-active { color: #4338ca; background: #eef2ff; }
.header-context-label { gap: 7px; color: #475569; font-size: 12px; font-weight: 700; white-space: nowrap; }
.header-context-label span { display: grid; place-items: center; width: 24px; height: 24px; color: #4f46e5; border-radius: 8px; background: #eef2ff; }
.header-period { flex: 0 0 auto; justify-content: flex-end; gap: 7px; margin-left: auto; }
.header-period-presets { gap: 3px; }
.header-period-presets button,.header-period-clear {
    min-height: 30px; padding: 0 9px; color: #64748b; border: 1px solid #e2e8f0;
    border-radius: 9px; background: rgba(255,255,255,.7); font-size: 12px; font-weight: 700; cursor: pointer;
}
.header-period-presets button.is-active { color: #fff; border-color: #4f46e5; background: #4f46e5; }
.header-date { gap: 5px; color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.header-date input {
    min-height: 30px; width: 125px; padding: 0 8px; color: #475569; border: 1px solid #e2e8f0;
    border-radius: 9px; outline: none; background: rgba(255,255,255,.72); font-size: 12px; font-weight: 650;
}
.header-date input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 2px rgba(165,180,252,.28); }
.header-period-clear { color: #7c8798; }

.primary-navigation { position: relative; }
.primary-nav-desktop { display: flex; align-items: center; justify-content: center; gap: 3px; }
.primary-nav-desktop button {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
    color: #475569; background: transparent; border: 0; border-radius: 10px; font-size: 13px;
    font-weight: 700; white-space: nowrap; cursor: pointer; transition: color .18s ease, background .18s ease;
}
.primary-nav-desktop button:hover { color: #1e293b; background: #f1f5f9; }
.primary-nav-desktop button.is-active { color: #312e81; background: #eef2ff; }
.primary-nav-desktop .nav-assistant { margin-left: 3px; color: #6d28d9; background: #f5f3ff; }
.nav-symbol { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; background: rgba(99,102,241,.08); font-weight: 700; }
.secondary-nav {
    position: absolute; top: calc(100% + 9px); left: 50%; z-index: 52; display: flex; align-items: center; gap: 3px;
    padding: 5px; transform: translateX(-50%); background: rgba(255,255,255,.96); border: 1px solid #e2e8f0;
    border-radius: 12px; box-shadow: 0 10px 25px rgba(15,23,42,.09); white-space: nowrap;
}
.secondary-nav button { min-height: 30px; padding: 0 10px; color: #64748b; background: transparent; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.secondary-nav button:hover { color: #334155; background: #f8fafc; }.secondary-nav button.is-active { color: #4338ca; background: #eef2ff; }
.primary-nav-mobile, .mobile-nav-backdrop, .mobile-nav-sheet { display: none; }

/* ── New overview ── */
.overview-page { --overview-ink: #152033; --overview-muted: #526074; padding-top: 24px; }
.overview-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 16px 0 22px; }
.overview-kicker { margin: 0 0 7px; color: #4f46e5; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.overview-hero h2 { margin: 0; color: var(--overview-ink); font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.overview-hero-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.overview-ghost-button { min-height: 46px; padding: 0 16px; border: 1px solid #dce2eb; border-radius: 13px; color: #334155; background: rgba(255,255,255,.82); font-size: 13px; font-weight: 700; cursor: pointer; }
.overview-ai-button { min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 7px 16px; border: 0; border-radius: 15px; color: #fff; background: #182135; box-shadow: 0 12px 28px rgba(15,23,42,.18); cursor: pointer; text-align: left; }
.overview-ai-button > span:first-child { color: #c4b5fd; font-size: 20px; }.overview-ai-button strong, .overview-ai-button small { display: block; }.overview-ai-button strong { font-size: 13px; }.overview-ai-button small { margin-top: 2px; color: #d5dae3; font-size: 12px; }
.overview-pulse { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.pulse-card { min-width: 0; min-height: 174px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid #dce2eb; border-radius: 19px; background: rgba(255,255,255,.9); box-shadow: 0 8px 25px rgba(15,23,42,.045); }
.pulse-primary { color: #fff; border-color: transparent; background: linear-gradient(145deg,#4f46e5,#6657e8); box-shadow: 0 14px 30px rgba(79,70,229,.2); }
.pulse-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.pulse-label span { color: #475569; font-size: 13px; font-weight: 700; }.pulse-label b { padding: 4px 8px; color: #475569; background: #f1f5f9; border-radius: 7px; font-size: 12px; font-weight: 700; }
.pulse-card > strong { overflow: hidden; color: var(--overview-ink); font-size: clamp(34px,3.2vw,48px); font-weight: 700; letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }.pulse-card > small { font-size: 12px; font-weight: 700; }.pulse-primary .pulse-label span,.pulse-primary > small { color: rgba(255,255,255,.86); }.pulse-primary .pulse-label b { color: #fff; background: rgba(255,255,255,.14); }.pulse-primary > strong { color: #fff; }
.mini-sparkline { height: 34px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; color: #6366f1; }.mini-sparkline svg { width: 100%; height: 30px; overflow: visible; }.mini-sparkline-line { fill: none; stroke: currentColor; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }.mini-sparkline-area { fill: currentColor; opacity: .09; }.mini-sparkline > span { padding-bottom: 3px; color: #94a3b8; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }.sparkline-light { color: rgba(255,255,255,.92); }.sparkline-light .mini-sparkline-area { opacity: .13; }.sparkline-light > span { color: rgba(255,255,255,.62); }
.sparkline-indigo { color: #6366f1; }.sparkline-emerald { color: #10b981; }.sparkline-amber { color: #f59e0b; }.sparkline-rose { color: #f43f5e; }
.period-comparison { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #64748b; font-size: 12px; font-weight: 700; }
.period-comparison > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.period-comparison > b { flex: 0 0 auto; color: #818cf8; font-size: 14px; }
.period-comparison-light { color: rgba(255,255,255,.78); }
.period-comparison-light > b { color: #fff; }
.confidence-low { color: #9a3412 !important; background: #ffedd5 !important; }.confidence-medium { color: #166534 !important; background: #dcfce7 !important; }
.is-positive { color: #059669; }.is-negative { color: #e11d48; }.is-neutral { color: #8a95a5; }
.overview-skeleton { width: 70%; height: 32px; border-radius: 9px; background: linear-gradient(90deg,#eef2f7,#f8fafc,#eef2f7); background-size: 200% 100%; animation: overview-shimmer 1.4s infinite; }
@keyframes overview-shimmer { to { background-position: -200% 0; } }
.overview-grid-main { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; margin-top: 13px; }

/* ── Menu workspace ── */
.menu-primary-action { min-height: 46px; display: inline-flex; align-items: center; gap: 9px; padding: 0 16px; color: #fff; border: 0; border-radius: 14px; background: #172033; box-shadow: 0 11px 24px rgba(15,23,42,.16); font-size: 13px; cursor: pointer; }
.menu-primary-action span { color: #f9a8d4; font-size: 17px; }
.menu-overview-grid,.menu-lower-grid { display: grid; gap: 12px; margin-top: 13px; }
.menu-overview-grid { grid-template-columns: minmax(0,1.35fr) minmax(350px,.65fr); }
.menu-overview-grid-compact { grid-template-columns: minmax(0,1fr); }
.menu-lower-grid { grid-template-columns: minmax(330px,.7fr) minmax(0,1.3fr); }
.menu-focus-panel,.menu-leaders-panel,.menu-matrix-panel,.menu-actions-panel { padding: 20px; border: 1px solid #e2e7ef; border-radius: 20px; background: rgba(255,255,255,.84); box-shadow: 0 8px 25px rgba(15,23,42,.04); }
.menu-leaders-panel .overview-section-title button,.menu-matrix-panel .overview-section-title button { padding: 0; color: #4338ca; border: 0; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.menu-issue-list { display: grid; gap: 7px; margin-top: 15px; }
.menu-issue { min-height: 82px; width: 100%; display: grid; grid-template-columns: 10px 1fr 24px; align-items: center; gap: 12px; padding: 14px; text-align: left; border: 1px solid #e2e7ef; border-radius: 14px; background: #fbfcfe; cursor: pointer; transition: transform .18s,border-color .18s; }
.menu-issue:hover { transform: translateX(2px); border-color: #c7d2fe; }
.menu-issue > span:nth-child(2) strong,.menu-issue > span:nth-child(2) small { display: block; }
.menu-issue > span:nth-child(2) strong { color: #172033; font-size: 15px; font-weight: 700; }
.menu-issue > span:nth-child(2) small { margin-top: 4px; color: #526074; font-size: 12px; line-height: 1.4; }
.menu-issue > b { color: #6366f1; font-size: 15px; }
.menu-data-note { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 12px; color: #9aa3b1; font-size: 12px; }
.menu-data-note span::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: #a5b4fc; }
.menu-leader-list { display: grid; gap: 4px; margin-top: 13px; }
.menu-leader-list button { min-height: 58px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 9px; text-align: left; border: 0; border-bottom: 1px solid #eef1f5; background: transparent; cursor: pointer; }
.menu-leader-list button:hover { border-radius: 10px; background: #f8fafc; }
.menu-leader-list button > span { display: grid; place-items: center; width: 28px; height: 28px; color: #4f46e5; border-radius: 8px; background: #eef2ff; font-size: 12px; font-weight: 700; }
.menu-leader-list strong { min-width: 0; overflow: hidden; color: #263247; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.menu-leader-list small { color: #64748b; font-size: 12px; white-space: nowrap; }
.menu-leader-list b { color: #334155; font-size: 12px; white-space: nowrap; }
.menu-empty { display: grid; min-height: 180px; place-items: center; color: #64748b; font-size: 13px; }
.menu-matrix-period { margin: 7px 0 -5px; color: #64748b; font-size: 12px; line-height: 1.4; }
.menu-matrix { display: grid; gap: 5px; margin-top: 15px; }
.menu-matrix-head,.menu-matrix-row { display: grid; grid-template-columns: 28px repeat(3,1fr); gap: 5px; text-align: center; }
.menu-matrix-head b { color: #475569; font-size: 12px; }
.menu-matrix-row > b { align-self: center; color: #475569; font-size: 12px; }
.menu-matrix-row > span { display: grid; min-height: 42px; place-items: center; color: #475569; border-radius: 10px; background: #f1f5f9; font-size: 14px; font-weight: 700; }
.menu-matrix-row > span.is-best { color: #047857; background: #d1fae5; }
.menu-matrix-row > span.is-risk { color: #be123c; background: #ffe4e6; }
.menu-matrix-panel > p:last-child { margin: 13px 0 0; color: #526074; font-size: 12px; line-height: 1.5; }
.menu-matrix-panel > p:last-child strong:first-child { color: #047857; }.menu-matrix-panel > p:last-child strong:last-child { color: #be123c; }
.menu-actions-panel > h3 { margin: 0; color: var(--overview-ink); font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.menu-action-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.menu-action-grid button { min-height: 124px; display: flex; flex-direction: column; align-items: flex-start; padding: 14px; text-align: left; border: 1px solid #e2e7ef; border-radius: 14px; background: #fbfcfe; cursor: pointer; transition: transform .18s,border-color .18s; }
.menu-action-grid button:hover { transform: translateY(-2px); border-color: #c7d2fe; }
.menu-action-grid span { display: grid; min-width: 28px; height: 28px; padding: 0 6px; place-items: center; color: #4f46e5; border-radius: 8px; background: #eef2ff; font-size: 12px; font-weight: 700; }
.menu-action-grid strong { margin-top: 13px; color: #263247; font-size: 13px; }
.menu-action-grid small { margin-top: 4px; color: #526074; font-size: 12px; line-height: 1.35; }
.menu-history-note { margin: 12px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }

/* ── Money workspace ── */
.money-workspace { --money-ink:#172033; --money-muted:#778397; color: var(--money-ink); padding-top: 20px; padding-bottom: 28px; }
.money-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 12px 2px 8px; }
.money-hero h1 { margin: 0; color: var(--money-ink); font-size: clamp(31px,4vw,48px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.money-hero > div:first-child > p:last-child { max-width: 760px; margin: 11px 0 0; color: var(--money-muted); font-size: 13px; line-height: 1.6; }
.money-hero-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.money-health { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #fde68a; border-radius: 14px; background: #fffbeb; }
.money-health > i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.money-health strong,.money-health small { display: block; }.money-health strong { color: #92400e; font-size: 12px; }.money-health small { margin-top: 2px; color: #b45309; font-size: 12px; }
.money-health.is-ready { border-color: #bbf7d0; background: #f0fdf4; }.money-health.is-ready > i { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.12); }.money-health.is-ready strong { color: #166534; }.money-health.is-ready small { color: #15803d; }
.money-hero-actions > button { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; color: #465267; border: 1px solid #dfe4ec; border-radius: 14px; background: rgba(255,255,255,.84); font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 7px 18px rgba(15,23,42,.04); }
.money-hero-actions > button span { color: #6366f1; font-size: 16px; }.money-hero-actions > button:hover { border-color: #c7d2fe; }.money-hero-actions > button:disabled { opacity: .5; cursor: default; }
.money-control-bar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 13px; border: 1px solid #e2e7ef; border-radius: 18px; background: rgba(255,255,255,.84); box-shadow: 0 8px 25px rgba(15,23,42,.04); }
.money-channel-control { min-width: 0; display: flex; align-items: center; gap: 12px; }.money-channel-control > span { color: #8a95a5; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.money-weekday-toggle { min-width: 238px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-left: 1px solid #e8ecf2; cursor: pointer; user-select: none; }
.money-weekday-toggle > span:last-child strong,.money-weekday-toggle > span:last-child small { display: block; }.money-weekday-toggle > span:last-child strong { color: #526075; font-size: 12px; }.money-weekday-toggle > span:last-child small { margin-top: 2px; color: #9aa3b1; font-size: 12px; }
.money-weekday-toggle.is-active > span:last-child strong { color: #4338ca; }.money-toggle-track { position: relative; width: 34px; height: 19px; flex: 0 0 auto; border-radius: 999px; background: #dfe4ec; transition: background .18s; }.money-toggle-track i { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15,23,42,.18); transition: transform .18s; }.money-weekday-toggle.is-active .money-toggle-track { background: #6366f1; }.money-weekday-toggle.is-active .money-toggle-track i { transform: translateX(15px); }
.money-section-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 7px; border: 1px solid #e2e7ef; border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: 0 7px 22px rgba(15,23,42,.035); }
.money-section-tab { position: relative; min-width: 0; min-height: 64px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; text-align: left; color: #64748b; border: 1px solid transparent; border-radius: 13px; background: transparent; cursor: pointer; transition: color .18s,background .18s,border-color .18s,box-shadow .18s; }
.money-section-tab:hover { color: #334155; background: #f8fafc; }.money-section-tab.is-active { color: #312e81; border-color: #dbe2ff; background: #eef2ff; box-shadow: 0 6px 14px rgba(79,70,229,.08); }
.money-section-symbol { display: grid; place-items: center; width: 32px; height: 32px; color: #64748b; border-radius: 10px; background: #f1f5f9; font-size: 12px; font-weight: 700; }.money-section-tab.is-active .money-section-symbol { color: #fff; background: #6366f1; }
.money-section-tab strong,.money-section-tab small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.money-section-tab strong { font-size: 12px; font-weight: 700; }.money-section-tab small { margin-top: 3px; color: #9aa3b1; font-size: 12px; }.money-section-tab.is-active small { color: #7379a8; }.money-section-tab > b { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; color: #be123c; border-radius: 999px; background: #ffe4e6; font-size: 12px; }
.money-pulse { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.money-pulse article { min-width: 0; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px; border: 1px solid #e2e7ef; border-radius: 18px; background: rgba(255,255,255,.88); box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.money-pulse article > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.money-pulse article > div span { color: #7b8798; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.money-pulse article > div b { padding: 4px 7px; color: #64748b; border-radius: 7px; background: #f1f5f9; font-size: 12px; white-space: nowrap; }
.money-pulse article > strong { overflow: hidden; color: var(--money-ink); font-size: clamp(22px,2.4vw,31px); font-weight: 700; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }.money-pulse article > small { color: #8b95a5; font-size: 12px; line-height: 1.45; }
.money-pulse .money-pulse-primary { color: #fff; border-color: transparent; background: linear-gradient(145deg,#4338ca,#6658e7); box-shadow: 0 14px 30px rgba(79,70,229,.2); }.money-pulse .money-pulse-primary > div span,.money-pulse .money-pulse-primary > small { color: rgba(255,255,255,.72); }.money-pulse .money-pulse-primary > div b { color: #fff; background: rgba(255,255,255,.14); }.money-pulse .money-pulse-primary > strong { color: #fff; }
.money-next-panel { padding: 20px; border: 1px solid #e2e7ef; border-radius: 20px; background: rgba(255,255,255,.84); box-shadow: 0 8px 25px rgba(15,23,42,.04); }
.money-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }.money-section-heading p { margin: 0 0 4px; color: #6366f1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }.money-section-heading h2 { margin: 0; color: var(--money-ink); font-size: 20px; font-weight: 700; letter-spacing: -.025em; }.money-section-heading > span { max-width: 420px; color: #929cab; font-size: 12px; text-align: right; line-height: 1.45; }
.money-next-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }.money-next-grid button { min-height: 155px; display: grid; grid-template-columns: 36px minmax(0,1fr); grid-template-rows: auto auto auto 1fr auto; gap: 3px 11px; padding: 14px; text-align: left; border: 1px solid #e7eaf0; border-radius: 15px; background: #fbfcfe; cursor: pointer; transition: transform .18s,border-color .18s,box-shadow .18s; }.money-next-grid button:hover { transform: translateY(-2px); border-color: #c7d2fe; box-shadow: 0 10px 20px rgba(15,23,42,.06); }
.money-next-grid button > span { grid-row: 1/4; display: grid; width: 34px; height: 34px; place-items: center; color: #4f46e5; border-radius: 10px; background: #eef2ff; font-size: 13px; font-weight: 700; }.money-next-grid small { color: #8b95a5; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.money-next-grid strong { color: #303b51; font-size: 12px; }.money-next-grid em { grid-column: 2; color: #8490a2; font-size: 12px; font-style: normal; line-height: 1.45; }.money-next-grid b { grid-column: 2; align-self: end; color: #4f46e5; font-size: 12px; }
.money-section-panel { padding-top: 4px; }.money-dynamics-panel { border-radius: 20px; }

/* ── Sales workspace ── */
.sales-workspace { color: #172033; }
.sales-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 18px 0 22px; }
.sales-hero h2 { margin: 0; color: #172033; font-size: clamp(30px,4vw,46px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.sales-hero > div > p:last-child { max-width: 720px; margin: 10px 0 0; color: #7b8798; font-size: 13px; line-height: 1.55; }
.sales-hero > button { min-height: 44px; padding: 0 15px; color: #166534; border: 1px solid #bbf7d0; border-radius: 13px; background: #f0fdf4; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.sales-hero > button:disabled { opacity: .45; cursor: default; }
.sales-kpi-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.sales-kpi-grid article { min-width: 0; min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px; border: 1px solid #e2e7ef; border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 0 7px 22px rgba(15,23,42,.04); }
.sales-kpi-grid article > span { color: #7b8798; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sales-kpi-grid article > strong { color: #172033; font-size: clamp(22px,2.4vw,31px); font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.sales-kpi-grid article > small { color: #8b95a5; font-size: 12px; line-height: 1.4; }
.sales-attention { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.55fr); gap: 12px; margin-bottom: 12px; padding: 17px 18px; border: 1px solid #e2e7ef; border-radius: 18px; background: rgba(255,255,255,.82); }
.sales-attention > div > strong,.sales-attention > div > small { display: block; }
.sales-attention > div > strong { color: #2b364a; font-size: 13px; }
.sales-attention > div > small { margin-top: 4px; color: #8994a5; font-size: 12px; }
.sales-attention > button { display: grid; gap: 2px; padding: 11px 13px; text-align: left; border: 1px solid #e0e7ff; border-radius: 13px; background: #f5f7ff; cursor: pointer; }
.sales-attention > button span { color: #6366f1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sales-attention > button strong { color: #303b52; font-size: 12px; }
.sales-attention > button small { color: #7c87a0; font-size: 12px; }
.sales-toolbar { margin-bottom: 8px; padding: 13px; border: 1px solid #e2e7ef; border-radius: 17px; background: rgba(255,255,255,.86); }
.sales-primary-filters { display: grid; grid-template-columns: auto minmax(150px,190px) minmax(180px,1fr) auto auto; align-items: end; gap: 10px; }
.sales-primary-filters > div > span { display: block; margin-bottom: 6px; color: #7b8798; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sales-primary-filters > input,.sales-primary-filters > button,.sales-preset-tools select,.sales-preset-tools input,.sales-preset-tools > button,.sales-table-actions button { min-height: 38px; border: 1px solid #dfe4ec; border-radius: 11px; background: #fff; }
.sales-primary-filters > input { width: 100%; padding: 0 12px; color: #334155; font-size: 12px; outline: none; }
.sales-primary-filters > input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.sales-primary-filters > button { padding: 0 13px; color: #556175; font-size: 12px; font-weight: 700; cursor: pointer; }
.sales-advanced-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf0f5; }
.sales-preset-tools,.sales-table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.sales-preset-tools > span { color: #8b95a5; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.sales-preset-tools select,.sales-preset-tools input { padding: 0 10px; color: #556175; font-size: 12px; }
.sales-preset-tools > button,.sales-table-actions button { padding: 0 11px; color: #4f46e5; font-size: 12px; font-weight: 700; cursor: pointer; }
.sales-preset-item { display: flex; align-items: center; gap: 4px; color: #7b8798; font-size: 12px; }
.sales-preset-item > button { padding: 3px; color: #94a3b8; border: 0; background: transparent; cursor: pointer; }
.sales-category-filter { position: relative; min-width: 180px; }
.sales-category-filter > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; min-height: 38px; padding: 0 11px; border: 1px solid #dfe4ec; border-radius: 11px; background: #fff; color: #556175; font-size: 12px; cursor: pointer; list-style: none; }
.sales-category-filter > summary::-webkit-details-marker { display: none; }
.sales-category-filter > summary span { font-weight: 700; }
.sales-category-filter > summary strong { color: #4f46e5; font-size: 12px; }
.sales-category-filter[open] > summary b { transform: rotate(180deg); }
.sales-category-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(330px,80vw); max-height: 340px; overflow-y: auto; padding: 10px; border: 1px solid #dfe4ec; border-radius: 14px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.14); }
.sales-category-panel > label { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 5px 7px; border-radius: 8px; color: #475569; font-size: 12px; cursor: pointer; }
.sales-category-panel > label:hover { background: #eef2ff; }
.sales-category-panel input { width: 16px; height: 16px; accent-color: #4f46e5; }
.sales-category-actions { display: flex; gap: 6px; margin-bottom: 7px; padding-bottom: 8px; border-bottom: 1px solid #edf0f5; }
.sales-category-actions button { min-height: 30px; padding: 0 9px; border-radius: 8px; background: #eef2ff; color: #4f46e5; font-size: 12px; font-weight: 700; }
.sales-favorite-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; padding: 10px 13px; border: 1px solid #e7eaf0; border-radius: 14px; background: rgba(255,255,255,.78); }
.sales-favorite-actions button { min-height: 34px; padding: 0 11px; border: 1px solid #dfe4ec; border-radius: 10px; background: #fff; color: #596579; font-size: 12px; font-weight: 700; }
.sales-favorite-actions button:first-child { color: #a16207; }
.sales-favorite-actions button.is-active { border-color: #facc15; background: #fef9c3; color: #854d0e; }
.sales-favorite-actions button:disabled { opacity: .42; cursor: not-allowed; }
.sales-favorite-actions button b { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #fef3c7; }
.sales-favorite-actions .menu-info-icon { margin-left: auto; }
.sales-toolbar .sales-favorite-actions { margin: 10px -13px -13px; padding: 10px 13px; border: 0; border-top: 1px solid #e7eaf0; border-radius: 0 0 17px 17px; background: transparent; }
.sales-table-wrap { position: relative; overflow: hidden; }
.sales-table-compact { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.sales-col-name { width: 31%; }.sales-col-trend { width: 10%; }.sales-col-units { width: 8%; }.sales-col-revenue { width: 13%; }.sales-col-share { width: 14%; }.sales-col-economics { width: 24%; }
.sales-table-compact th,.sales-table-compact td { min-width: 0; overflow-wrap: anywhere; }
.sales-table-compact td > small,.sales-cell-main { display: block; }
.sales-table-compact td > small { margin-top: 2px; color: #7b8798; font-size: 12px; line-height: 1.25; }
.sales-cell-main { color: #475569; font-weight: 700; }
.sales-item-name-wrap { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: start; gap: 5px; }
.sales-favorite-button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; color: #94a3b8; font-size: 18px; line-height: 1; }
.sales-favorite-button:hover { background: #fef9c3; color: #ca8a04; }
.sales-favorite-button.is-favorite { color: #eab308; }
.sales-favorite-spacer { display: block; width: 26px; }
.sales-item-link { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; width: 100%; gap: 4px 8px; }
.sales-item-link > span { min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.sales-item-link > span i { margin-right: 6px; color: #8b5cf6; font-style: normal; }
.sales-item-link > small { grid-column: 1 / -1; color: #8b5cf6; font-size: 12px; }
.sales-modifier-row { background: rgba(245,243,255,.48); }
.sales-mobile-list { display: none; }
.sales-table .sales-sticky-cell { position: sticky; left: 0; z-index: 2; min-width: 255px; max-width: 320px; background: #fff; box-shadow: 1px 0 0 #e8ecf2; }
.sales-table thead .sales-sticky-cell { z-index: 12; background: #fff; }
.sales-table tr.bg-slate-50 .sales-sticky-cell { background: #f8fafc; }
.sales-item-link { width: 100%; display: flex; align-items: center; gap: 6px; text-decoration: none; }
.sales-item-link > span:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.sales-item-link > b { margin-left: auto; color: #a5b4fc; font-size: 13px; }
.sales-item-link:hover > span:first-child { text-decoration: underline; }
.sales-detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.sales-detail-heading p { margin: 0 0 4px; color: #6366f1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sales-detail-heading h1,.sales-detail-heading h2 { margin: 0; color: #172033; font-size: 27px; font-weight: 700; letter-spacing: -.035em; }
.sales-detail-heading > button { min-height: 38px; padding: 0 12px; color: #4f46e5; border: 1px solid #c7d2fe; border-radius: 11px; background: #fff; font-size: 12px; font-weight: 700; }

/* ── Readability: рабочие экраны ── */
.money-hero > div:first-child > p:last-child,.sales-hero > div > p:last-child { color: #526074; font-size: 14px; }
.money-health strong { font-size: 13px; }.money-health small { color: #92400e; font-size: 12px; }
.money-health.is-ready small { color: #166534; }
.money-hero-actions > button { color: #334155; font-size: 13px; }
.money-channel-control > span { color: #475569; font-size: 12px; }
.money-weekday-toggle > span:last-child strong { color: #334155; font-size: 13px; }.money-weekday-toggle > span:last-child small { color: #64748b; font-size: 12px; }
.money-section-tab strong { font-size: 13px; }.money-section-tab small { color: #64748b; font-size: 12px; }
.money-pulse article > div span { color: #475569; font-size: 12px; }.money-pulse article > div b { color: #475569; font-size: 12px; }
.money-pulse article > strong { font-size: clamp(30px,3vw,40px); }.money-pulse article > small { color: #526074; font-size: 12px; }
.money-section-heading p { font-size: 12px; }.money-section-heading h2 { font-size: 24px; }.money-section-heading > span { color: #526074; font-size: 12px; }
.money-next-grid small { color: #64748b; font-size: 12px; }.money-next-grid strong { color: #263247; font-size: 14px; }.money-next-grid em { color: #526074; font-size: 12px; }.money-next-grid b { font-size: 12px; }
.sales-kpi-grid article > span { color: #475569; font-size: 12px; }.sales-kpi-grid article > strong { font-size: clamp(30px,3vw,40px); }.sales-kpi-grid article > small { color: #526074; font-size: 12px; }
.sales-attention > div > strong { font-size: 15px; }.sales-attention > div > small { color: #526074; font-size: 12px; }
.sales-attention > button span { font-size: 12px; }.sales-attention > button strong { color: #263247; font-size: 13px; }.sales-attention > button small { color: #526074; font-size: 12px; }
.sales-primary-filters > div > span,.sales-preset-tools > span { color: #475569; font-size: 12px; }
.sales-primary-filters > input { font-size: 13px; }.sales-primary-filters > button,.sales-preset-tools select,.sales-preset-tools input,.sales-preset-tools > button,.sales-table-actions button { font-size: 12px; }
.sales-preset-item { color: #526074; font-size: 12px; }

@media (max-width: 1320px) { .app-header-main { gap: 12px; }.app-brand-copy { display: none; }.primary-nav-desktop button { padding: 0 7px; }.nav-symbol { display: none; } }
@media (max-width: 1180px) { .app-connection > span:last-child,.app-user > span { display: none; }.overview-pulse { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) { .app-shell-header { padding: 0 14px; }.app-header-main { min-height: 54px; grid-template-columns: 1fr auto; }.app-brand-copy { display: block; }.app-header-navigation { position: absolute; }.app-header-context { align-items: stretch; flex-direction: column; gap: 6px; padding: 7px 0 9px; }.header-secondary-nav,.header-context-label { display: none; }.header-period { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 1px; }.primary-nav-desktop { display: none; }.secondary-nav { position: static; max-width: calc(100vw - 32px); margin: 7px auto -1px; transform: none; overflow-x: auto; box-shadow: none; }.overview-page { padding-top: 14px; }.overview-hero { align-items: stretch; flex-direction: column; }.overview-hero-actions { justify-content: space-between; }.overview-grid-main { grid-template-columns: 1fr; }.direction-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.direction-menu,.direction-money,.direction-guests,.direction-growth,.direction-operations { grid-column: span 1; }.primary-nav-mobile { position: fixed; left: 10px; right: 10px; bottom: max(10px,env(safe-area-inset-bottom)); z-index: 70; display: grid; grid-template-columns: repeat(5,1fr); padding: 7px; border: 1px solid rgba(226,232,240,.9); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(15,23,42,.16); backdrop-filter: blur(18px); }.primary-nav-mobile button { min-height: 45px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #94a3b8; background: transparent; border: 0; border-radius: 12px; font-size: 16px; font-weight: 700; }.primary-nav-mobile button small { font-size: 12px; font-weight: 700; }.primary-nav-mobile button.is-active { color: #4f46e5; background: #eef2ff; }.mobile-nav-backdrop { position: fixed; inset: 0; z-index: 78; display: block; background: rgba(15,23,42,.38); backdrop-filter: blur(3px); }.mobile-nav-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: block; max-height: 82vh; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -20px 50px rgba(15,23,42,.18); }.mobile-sheet-head { display: flex; align-items: center; justify-content: space-between; }.mobile-sheet-head small,.mobile-sheet-head strong { display: block; }.mobile-sheet-head small { color: #8b95a5; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }.mobile-sheet-head strong { margin-top: 2px; color: #1e293b; font-size: 18px; }.mobile-sheet-head > button { width: 44px; height: 44px; border: 0; border-radius: 12px; color: #64748b; background: #f1f5f9; font-size: 22px; }.mobile-sheet-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; margin-top: 18px; }.mobile-sheet-groups > div { padding: 10px; border: 1px solid #edf0f5; border-radius: 14px; }.mobile-group-title,.mobile-leaf { width: 100%; min-height: 36px; text-align: left; border: 0; background: transparent; }.mobile-group-title { color: #293449; font-size: 12px; font-weight: 700; }.mobile-group-title span { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 7px; border-radius: 8px; color: #4f46e5; background: #eef2ff; }.mobile-leaf { padding-left: 33px; color: #778295; font-size: 12px; font-weight: 650; }.mobile-leaf.is-active { color: #4f46e5; }.mobile-assistant { grid-column: 1/-1; min-height: 48px; border: 0; border-radius: 14px; color: #6d28d9; background: #f5f3ff; font-size: 12px; font-weight: 700; }.mobile-assistant span { margin-right: 7px; }.overview-page { padding-bottom: 96px; } }
@media (max-width: 620px) { .app-header-account { gap: 5px; }.app-connection { padding: 7px; }.app-user button,.app-login { padding: 0 9px; }.header-period { flex-wrap: wrap; }.header-period-presets { width: auto; flex: 1 1 180px; order: 1; }.header-period-presets button { flex: 1; padding: 0 6px; }.header-period-clear { flex: 0 0 auto; order: 2; }.header-date { flex: 1 1 calc(50% - 4px); order: 3; }.header-date input { width: 100%; }.overview-hero h2 { font-size: 31px; }.overview-hero-actions { align-items: stretch; flex-direction: column; }.overview-ai-button,.overview-ghost-button { width: 100%; justify-content: center; }.overview-pulse { grid-template-columns: 1fr 1fr; }.pulse-card { min-height: 122px; padding: 15px; }.pulse-label { align-items: flex-start; flex-wrap: wrap; }.pulse-card > strong { font-size: 21px; }.overview-section-title { align-items: flex-start; flex-direction: column; gap: 5px; }.attention-footnote { flex-direction: column; }.direction-grid { grid-template-columns: 1fr; }.direction-card { min-height: 240px; }.mobile-sheet-groups { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .overview-pulse { grid-template-columns: 1fr; }.pulse-card { min-height: 112px; } }
@media (max-width: 1180px) { .menu-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) { .menu-overview-grid,.menu-lower-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .menu-primary-action { width: 100%; justify-content: center; }.menu-action-grid { grid-template-columns: 1fr; }.menu-leader-list button { grid-template-columns: 27px minmax(0,1fr) auto; }.menu-leader-list small { display: none; } }
@media (max-width: 1180px) { .money-pulse { grid-template-columns: repeat(2,minmax(0,1fr)); }.money-section-tab small { display: none; } }
@media (max-width: 900px) { .money-workspace { padding-top: 12px; padding-bottom: 96px; }.money-hero { align-items: stretch; flex-direction: column; gap: 16px; }.money-hero-actions { justify-content: space-between; }.money-control-bar { align-items: stretch; flex-direction: column; }.money-channel-control { align-items: flex-start; flex-direction: column; }.money-weekday-toggle { min-width: 0; border-top: 1px solid #e8ecf2; border-left: 0; }.money-section-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }.money-section-tab small { display: block; }.money-next-grid { grid-template-columns: 1fr; }.money-next-grid button { min-height: 125px; }.money-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }.money-section-heading > span { text-align: left; } }
@media (max-width: 620px) { .money-hero h1 { font-size: 31px; }.money-hero-actions { align-items: stretch; flex-direction: column; }.money-health,.money-hero-actions > button { width: 100%; }.money-hero-actions > button { justify-content: center; }.money-section-nav { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }.money-section-tab { min-width: 178px; scroll-snap-align: start; }.money-pulse { grid-template-columns: 1fr 1fr; }.money-pulse article { min-height: 120px; padding: 14px; }.money-pulse article > div { align-items: flex-start; flex-direction: column; }.money-pulse article > strong { font-size: 20px; }.money-pulse article > small { font-size: 12px; }.money-next-panel { padding: 15px; } }
@media (max-width: 380px) { .money-pulse { grid-template-columns: 1fr; }.money-pulse article { min-height: 110px; } }
@media (max-width: 900px) { .sales-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.sales-attention { grid-template-columns: 1fr; }.sales-primary-filters { grid-template-columns: 1fr; align-items: stretch; }.sales-advanced-tools { flex-direction: column; }.sales-category-panel { position: static; width: 100%; max-height: 280px; margin-top: 6px; box-shadow: none; }.sales-table-compact { display: none; }.sales-mobile-list { display: block; }.sales-mobile-list > section + section { border-top: 2px solid #e2e8f0; }.sales-mobile-group { display: grid; grid-template-columns: minmax(0,1fr) auto; width: 100%; gap: 3px 10px; padding: 13px 14px; background: #f8fafc; text-align: left; }.sales-mobile-group span { min-width: 0; color: #334155; font-size: 13px; font-weight: 700; }.sales-mobile-group strong { color: #334155; font-size: 13px; }.sales-mobile-group small { grid-column: 1 / -1; color: #7b8798; font-size: 12px; }.sales-mobile-list article { padding: 12px 14px; border-top: 1px solid #eef1f5; background: #fff; }.sales-mobile-list article.is-modifier { padding-left: 28px; background: rgba(245,243,255,.58); }.sales-mobile-item-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px; }.sales-mobile-item-head > button:first-child { display: grid; grid-template-columns: minmax(0,1fr) auto; width: 100%; gap: 3px 8px; color: #4338ca; text-align: left; }.sales-mobile-item-head > button:first-child span { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }.sales-mobile-item-head > button:first-child span i { margin-right: 5px; color: #8b5cf6; font-style: normal; }.sales-mobile-item-head > button:first-child small { grid-column: 1 / -1; color: #8b5cf6; font-size: 12px; }.sales-mobile-list dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; }.sales-mobile-list dl div { min-width: 0; padding: 7px 8px; border-radius: 9px; background: #f8fafc; }.sales-mobile-list dt { color: #94a3b8; font-size: 12px; }.sales-mobile-list dd { margin-top: 2px; color: #475569; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; } }
@media (max-width: 620px) { .sales-hero { align-items: stretch; flex-direction: column; }.sales-hero > button { width: 100%; }.sales-kpi-grid { grid-template-columns: 1fr 1fr; }.sales-kpi-grid article { min-height: 116px; padding: 14px; }.sales-kpi-grid article > strong { font-size: 20px; }.sales-detail-heading { align-items: stretch; flex-direction: column; }.sales-detail-heading > button { align-self: flex-start; }.sales-preset-tools,.sales-table-actions { width: 100%; }.sales-preset-tools select,.sales-preset-tools input { min-width: 0; flex: 1 1 140px; } }
@media (max-width: 620px) { .pulse-card { min-height: 140px; }.pulse-card > strong { font-size: 28px; }.pulse-card > small { font-size: 12px; } }
@media (max-width: 620px) { .notification-popover { position: fixed; top: 64px; left: 10px; right: 10px; width: auto; max-height: calc(100dvh - 84px); }.notification-list { max-height: calc(100dvh - 220px); }.app-connection { display: none; }.mini-sparkline > span { display: none; }.pulse-card { min-height: 150px; } }
@media (prefers-reduced-motion: reduce) { .overview-skeleton,.notification-loader { animation: none; }.direction-card,.attention-item,.notification-trigger { transition: none; } }

/* ── UX: compact period picker, clear page context and long-page shortcuts ── */
.header-current-page { display: none; min-width: 0; align-items: center; gap: 9px; }
.header-current-page > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; color: #4f46e5; border-radius: 9px; background: #eef2ff; font-weight: 700; }
.header-current-page small,.header-current-page strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-current-page small { color: #8a95a5; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.header-current-page strong { margin-top: 1px; color: #263247; font-size: 12px; }
.header-period-custom { position: relative; }
.header-period-custom > summary { min-height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 10px; list-style: none; color: #475569; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; cursor: pointer; }
.header-period-custom > summary::-webkit-details-marker { display: none; }
.header-period-custom > summary span { color: #8a95a5; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.header-period-custom > summary strong { font-size: 12px; font-weight: 700; white-space: nowrap; }
.header-period-custom > summary b { color: #94a3b8; font-size: 12px; transition: transform .18s; }
.header-period-custom[open] > summary { border-color: #a5b4fc; box-shadow: 0 0 0 2px rgba(165,180,252,.2); }
.header-period-custom[open] > summary b { transform: rotate(180deg); }
.header-period-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 65; width: 310px; display: grid; gap: 10px; padding: 14px; border: 1px solid #dce2eb; border-radius: 14px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.16); }
.header-period-popover > p { margin: 0; color: #263247; font-size: 12px; font-weight: 700; }
.header-period-popover .header-date { justify-content: space-between; }
.header-period-popover .header-date input { width: 225px; }
.header-period-popover .header-period-clear { width: 100%; min-height: 34px; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(99,102,241,.28); outline-offset: 2px; }

.section-jump-nav { display: flex; align-items: center; gap: 7px; padding: 10px 12px; overflow-x: auto; }
.section-jump-nav > span { flex: 0 0 auto; color: #8a95a5; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.section-jump-nav button { min-height: 34px; flex: 0 0 auto; padding: 0 12px; color: #475569; border: 1px solid #dce2eb; border-radius: 9px; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.section-jump-nav button:hover { color: #4338ca; border-color: #c7d2fe; background: #f5f3ff; }
[id^="retention-"] { scroll-margin-top: 128px; }

.preset-disclosure > summary { display: flex; align-items: center; gap: 8px; min-height: 34px; list-style: none; color: #475569; cursor: pointer; }
.preset-disclosure > summary::-webkit-details-marker { display: none; }
.preset-disclosure > summary strong { color: #334155; font-size: 12px; }
.preset-disclosure > summary span { min-width: 22px; padding: 2px 6px; text-align: center; color: #4338ca; border-radius: 999px; background: #eef2ff; font-size: 12px; font-weight: 700; }
.preset-disclosure > summary small { margin-left: auto; color: #8a95a5; font-size: 12px; }
.preset-disclosure > summary b { color: #94a3b8; transition: transform .18s; }
.preset-disclosure[open] > summary b { transform: rotate(180deg); }
.preset-disclosure-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid #eef1f5; }

@media (max-width: 1320px) { .header-period-custom > summary span { display: none; } }
@media (max-width: 900px) {
    .app-header-context { gap: 7px; }
    .header-current-page { display: flex; }
    .header-period { overflow: visible; }
    .header-period-custom { margin-left: auto; }
}
@media (max-width: 620px) {
    .header-period-custom { flex: 0 0 auto; margin-left: 0; order: 2; }
    .header-period-custom > summary strong { max-width: none; font-size: 12px; white-space: normal; }
    .header-period-popover { position: fixed; top: 148px; left: 14px; right: 14px; width: auto; }
    .header-period-popover .header-date { flex: none; order: initial; }
    .header-period-popover .header-date input { width: min(225px,70vw); }
    .header-period-popover .header-period-clear { order: initial; }
    .preset-disclosure > summary small { display: none; }
}

/* ── Единый спокойный интерфейс для всех рабочих экранов ── */
/* Inter хранится локально: доступность интерфейса не зависит от Google Fonts. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('../vendor/fonts/inter-300-v20.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fonts/inter-400-v20.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/inter-500-v20.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/inter-600-v20.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fonts/inter-700-v20.ttf') format('truetype'); }

#app > main:not(.overview-page):not(.money-workspace) { min-width: 0; padding-top: 18px; padding-bottom: 78px; }
#app > main { color: var(--ui-ink); }
#app > main.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 16px; }
#app > main.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 14px; }
#app > main.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; }

.glass-panel:hover { box-shadow: var(--ui-shadow-card); }
button.glass-panel:hover,[role="button"].glass-panel:hover { border-color: #c7d2fe; box-shadow: 0 11px 28px rgba(15,23,42,.075); }

#app > main > .glass-panel:first-child,
#app > main > section.glass-panel:first-child,
#app > main > div.glass-panel:first-child {
    border-color: var(--ui-border);
    background: #fff;
    box-shadow: 0 4px 16px rgba(15,23,42,.035);
}
#app > main h1,#app > main h2 { color: var(--ui-ink); letter-spacing: -.035em; text-wrap: balance; }
#app > main h3 { color: var(--ui-ink); letter-spacing: -.018em; }
#app > main p { text-wrap: pretty; }

.btn-primary,.btn-secondary { min-height: 44px; justify-content: center; padding-inline: 16px; border-radius: 12px; font-weight: 700; }
.btn-primary { background: #4f46e5; box-shadow: 0 6px 16px rgba(79,70,229,.2); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-secondary { color: #475569; background: #fff; border-color: var(--ui-border-strong); box-shadow: none; }
button:disabled { transform: none !important; }

#app > main input:not([type="checkbox"]):not([type="radio"]),
#app > main select,
#app > main textarea,
.fixed.inset-0 input:not([type="checkbox"]):not([type="radio"]),
.fixed.inset-0 select,
.fixed.inset-0 textarea {
    min-height: 42px;
    color: #334155;
    border-color: var(--ui-border-strong);
    border-radius: 11px;
    background: #fff;
}
#app > main textarea,.fixed.inset-0 textarea { line-height: 1.5; }
#app > main label > span:first-child { color: var(--ui-muted); }

#app > main .overflow-x-auto,#app > main .table-scroll-container { scrollbar-gutter: stable; }
#app > main table { width: 100%; border-collapse: separate; border-spacing: 0; }
#app > main table thead { background: var(--ui-surface-muted); }
#app > main table th { padding: 11px 13px; color: #64748b; font-size: 12px; font-weight: 700; letter-spacing: .045em; line-height: 1.3; }
#app > main table td { padding: 11px 13px; border-bottom-color: #edf0f4; line-height: 1.4; }
#app > main table tbody tr { transition: background .12s ease; }
#app > main table tbody tr:hover { background: #f8fafc; }
#app > main table tbody tr:last-child td { border-bottom: 0; }

#app > main details.glass-panel > summary,
#app > main .preset-disclosure > summary { min-height: 44px; padding-inline: 14px; }
#app > main details.glass-panel[open] > summary { border-bottom: 1px solid #eef1f5; }
.preset-disclosure { padding: 0 12px; border: 1px solid var(--ui-border); border-radius: 13px; background: rgba(255,255,255,.78); }
.preset-disclosure-body { padding: 12px 2px; }

.insight-disclosure { margin-block: 2px 12px; }
.insight-disclosure-trigger { width: 100%; min-height: 54px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 8px 12px; color: #475569; text-align: left; border: 1px solid var(--ui-border); border-radius: 13px; background: rgba(255,255,255,.76); cursor: pointer; }
.insight-disclosure-trigger:hover { border-color: #c7d2fe; background: #fff; }.insight-disclosure-trigger > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; color: #6366f1; border-radius: 9px; background: #eef2ff; }.insight-disclosure-trigger span strong,.insight-disclosure-trigger span small { display: block; }.insight-disclosure-trigger span strong { color: #334155; font-size: 12px; }.insight-disclosure-trigger span small { margin-top: 2px; color: var(--ui-subtle); font-size: 12px; }.insight-disclosure-trigger > b { color: #4f46e5; font-size: 12px; }

.fixed.inset-0.backdrop-blur-sm { background: rgba(15,23,42,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.fixed.inset-0.backdrop-blur-sm > .bg-white,
.fixed.inset-0.backdrop-blur-sm > .glass-panel,
.fixed.inset-0.backdrop-blur-sm > section.bg-white {
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--ui-shadow-float);
}
.fixed.inset-0.backdrop-blur-sm button[aria-label="Закрыть"] { min-width: 44px; min-height: 44px; border-radius: 12px; }
.fixed.inset-0.backdrop-blur-sm button { min-height: 44px; }
.fixed.inset-0.backdrop-blur-sm > .bg-white > :first-child,
.fixed.inset-0.backdrop-blur-sm > section.bg-white > :first-child { background: #fff; }

.assistant-modal-panel { border-radius: 22px; background: #fff; box-shadow: var(--ui-shadow-float); }
.assistant-modal-control { width: 44px; height: 44px; }

@media (max-width: 700px) {
    #app > main:not(.overview-page):not(.money-workspace) { padding-top: 12px; padding-bottom: 96px; }
    #app > main h1,#app > main h2 { font-size: clamp(24px,8vw,31px); }
    #app > main table th,#app > main table td { padding: 10px 11px; }
    .fixed.inset-0.backdrop-blur-sm { padding: 0; align-items: flex-end; }
    .fixed.inset-0.backdrop-blur-sm > .bg-white,
    .fixed.inset-0.backdrop-blur-sm > .glass-panel,
    .fixed.inset-0.backdrop-blur-sm > section.bg-white { width: 100%; max-width: none; max-height: calc(100dvh - 18px); margin: 18px 0 0; border-radius: 22px 22px 0 0; }
    .insight-disclosure-trigger > b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .glass-panel,#app > main table tbody tr,.insight-disclosure-trigger { transition: none; }
}

/* ── Frontend v2: task-oriented application shell ─────────────────────── */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    transform: translateY(-150%);
    padding: 10px 14px;
    color: #fff;
    border-radius: 10px;
    background: #111827;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(15,23,42,.25);
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 2px;
}

.v2-app-shell {
    min-height: 100dvh;
    padding-left: 264px;
    transition: padding-left .18s ease;
}
.v2-app-shell:has(.primary-navigation.is-collapsed) { padding-left: 82px; }
.v2-app-shell .app-shell-header {
    margin-bottom: 8px;
    padding-inline: 20px;
    border-bottom: 1px solid #e7ebf1;
    background: rgba(255,255,255,.94);
    box-shadow: 0 4px 18px rgba(15,23,42,.04);
}
.v2-app-shell .app-header-shell { max-width: none; }
.v2-app-shell .app-header-main {
    min-height: 58px;
    grid-template-columns: 1fr;
    gap: 18px;
}
.v2-app-shell .app-header-navigation {
    position: absolute;
    width: 0;
    min-width: 0;
}
.v2-app-shell .app-header-account { justify-self: end; }
.v2-app-shell .app-header-context {
    justify-content: flex-end;
    min-height: 44px;
    padding-block: 6px 8px;
    border-top: 1px solid #eef1f5;
}
.v2-app-shell .app-header-main:only-child { min-height: 54px; }

.abc-matrix { display: grid; grid-template-columns: 54px repeat(3,minmax(0,1fr)); gap: 7px; align-items: stretch; }
.abc-matrix > b { display: grid; place-items: center; min-height: 34px; color: #64748b; font-size: 12px; text-align: center; }
.abc-matrix > button { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--ui-border); border-radius: 12px; background: #f8fafc; color: #475569; }
.abc-matrix > button:hover,.abc-matrix > button.is-active { border-color: #a5b4fc; background: #eef2ff; color: #3730a3; }
.abc-matrix > button strong { font-size: 13px; }.abc-matrix > button span { font-size: 18px; font-weight: 700; }

@media (max-width: 900px) {
    .abc-matrix { grid-template-columns: 34px repeat(3,minmax(0,1fr)); gap: 4px; }
    .abc-matrix > b { font-size: 12px; }.abc-matrix > button { min-height: 58px; padding: 8px; flex-direction: column; }
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 75;
    width: 264px;
    display: grid;
    grid-template-rows: auto auto minmax(0,1fr) auto;
    gap: 14px;
    padding: 15px 12px;
    color: #dbe4f0;
    background:
        radial-gradient(circle at 20% 0%, rgba(99,102,241,.24), transparent 34%),
        linear-gradient(180deg,#121a2c 0%,#0b1220 100%);
    box-shadow: 14px 0 35px rgba(15,23,42,.12);
    transition: width .18s ease;
}
.sidebar-collapse-toggle {
    position: absolute;
    top: 20px;
    right: -15px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #475569;
    border: 1px solid #dbe2ea;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15,23,42,.16);
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
}
.sidebar-collapse-toggle:hover { color: #3730a3; border-color: #a5b4fc; }
.sidebar-collapse-toggle:focus-visible { outline: 3px solid #818cf8; outline-offset: 2px; }
.sidebar-brand {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px;
    color: #fff;
    text-align: left;
    border: 0;
    border-radius: 13px;
    background: transparent;
    cursor: pointer;
}
.sidebar-brand:hover { background: rgba(255,255,255,.06); }
.sidebar-brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 11px;
    background: linear-gradient(145deg,#818cf8,#4f46e5);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(79,70,229,.3);
}
.sidebar-brand-copy { min-width: 0; }
.sidebar-brand-copy strong,.sidebar-brand-copy small { display: block; }
.sidebar-brand-copy strong { font-size: 14px; letter-spacing: -.01em; }
.sidebar-brand-copy small { margin-top: 2px; color: #94a3b8; font-size: 12px; }
.sidebar-search {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 11px;
    background: rgba(255,255,255,.055);
}
.sidebar-search:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,.18); }
.sidebar-search b { color: #94a3b8; font-size: 16px; }
.sidebar-search input {
    min-width: 0;
    width: 100%;
    color: #f8fafc;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 12px;
}
.sidebar-search input::placeholder { color: #94a3b8; }
.sidebar-groups { min-height: 0; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.25) transparent; }
.sidebar-group + .sidebar-group { margin-top: 13px; }
.sidebar-group > p {
    margin: 0 8px 5px;
    color: #7f8da3;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.sidebar-group > button,.sidebar-footer > button {
    width: 100%;
    min-height: 39px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    color: #b9c5d5;
    text-align: left;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 690;
}
.sidebar-group > button:hover,.sidebar-footer > button:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-group > button.is-active {
    color: #fff;
    background: linear-gradient(90deg,rgba(99,102,241,.32),rgba(99,102,241,.13));
    box-shadow: inset 3px 0 #818cf8;
}
.sidebar-item-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    color: #c7d2fe;
    border-radius: 8px;
    background: rgba(129,140,248,.12);
    font-size: 12px;
    font-weight: 700;
}
.sidebar-item-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-empty { padding: 16px 8px; color: #94a3b8; font-size: 12px; }
.sidebar-footer { padding-top: 10px; border-top: 1px solid rgba(148,163,184,.14); }
.sidebar-footer .sidebar-assistant { color: #ddd6fe; }
.sidebar-footer .sidebar-assistant > span:first-child { width: 27px; text-align: center; color: #c4b5fd; }
.sidebar-footer .sidebar-assistant.is-active { color: #fff; background: rgba(124,58,237,.22); }
.primary-navigation.is-collapsed .app-sidebar { width: 82px; }
.primary-navigation.is-collapsed .app-sidebar { grid-template-rows: auto minmax(0,1fr) auto; }
.primary-navigation.is-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }
.primary-navigation.is-collapsed .sidebar-brand-copy,
.primary-navigation.is-collapsed .sidebar-item-label,
.primary-navigation.is-collapsed .sidebar-group > p { display: none; }
.primary-navigation.is-collapsed .sidebar-group > button,
.primary-navigation.is-collapsed .sidebar-footer > button { justify-content: center; padding-inline: 0; }
.primary-navigation.is-collapsed .sidebar-item-icon { width: 34px; height: 34px; flex-basis: 34px; }
.mobile-nav-search { display: block; margin-top: 14px; }
.mobile-nav-search input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid #dbe1ea; border-radius: 11px; background: #f8fafc; }
.mobile-group-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 7px; color: #334155; text-align: left; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.mobile-group-heading:hover { color: var(--ui-primary); background: var(--ui-primary-soft); }

.v2-app-shell .workspace-navigator {
    display: block;
    width: min(calc(100% - 32px),1400px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.workspace-guide-disclosure {
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 4px 16px rgba(15,23,42,.035);
}
.workspace-guide-disclosure > summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 13px;
    list-style: none;
    cursor: pointer;
}
.workspace-guide-disclosure > summary::-webkit-details-marker { display: none; }
.workspace-guide-disclosure > summary span { min-width: 0; }
.workspace-guide-disclosure > summary small,.workspace-guide-disclosure > summary strong { display: block; }
.workspace-guide-disclosure > summary small { color: #6366f1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.workspace-guide-disclosure > summary strong { margin-top: 2px; overflow: hidden; color: #273449; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-guide-disclosure > summary > b { flex: 0 0 auto; color: #475569; font-size: 12px; }
.workspace-guide-disclosure > summary > b i { margin-left: 5px; color: #818cf8; font-style: normal; }
.workspace-guide-disclosure[open] > summary { border-bottom: 1px solid #edf0f5; }
.workspace-guide-disclosure[open] > summary > b i { display: inline-block; transform: rotate(180deg); }
.workspace-guide-body { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,2fr); gap: 12px; padding: 11px 13px 13px; }
.workspace-guide-body > p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.workspace-guide-body .workspace-navigator-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
.workspace-guide-body .workspace-navigator-steps button { min-height: 58px; }

@media (max-width: 900px) {
    .v2-app-shell,.v2-app-shell:has(.primary-navigation.is-collapsed) { padding-left: 0; }
    .app-sidebar { display: none; }
    .v2-app-shell .app-shell-header { padding-inline: 14px; }
    .v2-app-shell .app-header-main { grid-template-columns: 1fr; }
    .v2-app-shell .app-header-context { align-items: flex-start; flex-direction: row; }
    .workspace-guide-body { grid-template-columns: 1fr; }
    .workspace-guide-body .workspace-navigator-steps { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .v2-app-shell .app-header-account { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *,*::before,*::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.channel-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--ui-border); border-radius: 12px; background: #f8fafc; }
.channel-tab { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; color: #64748b; border: 1px solid transparent; border-radius: 9px; background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: color .16s ease,background .16s ease,border-color .16s ease; }
.channel-tab:hover { color: #334155; background: #fff; }
.channel-tab.is-active { color: #3730a3; border-color: #c7d2fe; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.06); }
.channel-tab--own.is-active { color: #047857; border-color: #a7f3d0; }
.channel-tab--aggregator.is-active { color: #be123c; border-color: #fecdd3; }
@media (max-width: 620px) { .channel-tabs { width: 100%; overflow-x: auto; }.channel-tab { flex: 1 0 auto; min-height: 44px; } }

/* ── Поэкранная система: все рабочие пространства как продолжение главной ── */
.workspace-page {
    width: 100%;
    min-width: 0;
    padding-top: 12px;
    padding-bottom: 72px;
}
.workspace-page > :first-child { margin-top: 0; }
.workspace-page .workspace-hero {
    position: relative;
    min-height: 86px;
    padding: 18px 20px;
    overflow: visible;
    border: 1px solid var(--ui-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15,23,42,.04);
}
.workspace-page .workspace-hero::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #6366f1;
}
.workspace-page--finance .workspace-hero::before { background: #16a34a; }
.workspace-page--operations .workspace-hero::before { background: #0f766e; }
.workspace-page--admin .workspace-hero::before { background: #64748b; }
.workspace-page .workspace-hero h1,
.workspace-page .workspace-hero h2 { font-size: clamp(23px,2.1vw,30px); line-height: 1.08; }
.workspace-page .workspace-hero h1 + p,
.workspace-page .workspace-hero h2 + p { max-width: 760px; color: var(--ui-muted); font-size: 13px; line-height: 1.55; }
.workspace-page .workspace-hero > .absolute { display: none; }
.workspace-page:not(.space-y-4) > .workspace-hero { margin-bottom: 16px; }
.workspace-page:not(.space-y-4) > section + section,
.workspace-page:not(.space-y-4) > section + .glass-panel,
.workspace-page:not(.space-y-4) > .glass-panel + section { margin-top: 16px; }

.workspace-page .workspace-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 4px;
    margin-inline: 0;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: rgba(255,255,255,.8);
}
.workspace-page .workspace-tabs > button {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: none !important;
}

.workspace-page > .grid > .glass-panel,
.workspace-page > section.grid > .glass-panel,
.workspace-page > section.grid > article.glass-panel,
.workspace-page > section.grid > button.glass-panel,
.workspace-page .workspace-mode-grid > .glass-panel {
    min-height: 116px;
    padding: 17px;
    border-color: var(--ui-border);
    background: #fff;
}
.workspace-page > .grid > .glass-panel strong,
.workspace-page > section.grid > .glass-panel strong,
.workspace-page .workspace-mode-grid strong { letter-spacing: -.025em; }
.workspace-page > .grid > .glass-panel:hover,
.workspace-page > section.grid > .glass-panel:hover { transform: none; }
.workspace-page > .grid > .glass-panel > .absolute,
.workspace-page > section.grid > .glass-panel > .absolute { display: none; }

.workspace-page > .glass-panel:not(.workspace-hero),
.workspace-page > section.glass-panel:not(.workspace-hero),
.workspace-page > details.glass-panel {
    box-shadow: 0 4px 16px rgba(15,23,42,.035);
}
.workspace-page [role="tablist"] button,
.workspace-page button,
.workspace-page summary { touch-action: manipulation; }
.workspace-page [role="tablist"] button { min-height: 36px; }
.workspace-page .table-scroll-container { max-width: 100%; border-radius: inherit; }
.workspace-page table button { min-height: 32px; }
.workspace-page table tbody tr[role="button"],
.workspace-page table tbody tr.cursor-pointer { cursor: pointer; }

/* Реестры: поиск и действия читаются как единая панель, а список — как результат. */
.workspace-page--registry > .glass-panel:has(input[type="search"]),
.workspace-page--registry > .glass-panel:has(input[type="text"]) {
    border-color: #d9e0ea;
    background: #fbfcfe;
    box-shadow: none;
}
.reviews-workspace > header + .workspace-tabs { margin-bottom: 14px; }
.raw-material-table th,
.raw-material-table td { overflow-wrap: anywhere; }
@media (max-width: 520px) {
    .raw-material-table { font-size: 12px; }
    .raw-material-table th,
    .raw-material-table td { padding: 7px 4px !important; }
    .raw-material-table .w-24 { width: 3.5rem; }
    .raw-material-table .rounded-lg { font-size: 12px; padding: 4px 5px; }
}
.reviews-workspace > .glass-panel,
.reviews-workspace > template + .glass-panel { margin-bottom: 14px; }
.nomenclature-workspace > .workspace-hero { margin-bottom: 14px; }
.nomenclature-workspace > [data-assistant-target="nomenclature.summary"] { margin-bottom: 14px; }
.call-list-workspace > .glass-panel:nth-of-type(2) { background: #fbfcfe; box-shadow: none; }

/* Аналитика: метрики остаются на первом плане, справка и инструменты спокойнее. */
.workspace-page--analysis .preset-disclosure,
.workspace-page--analysis > .glass-panel:has(.preset-disclosure-body) { box-shadow: none; }
.retention-workspace #retention-cohorts .glass-panel { min-height: 130px; }
.love-workspace [data-assistant-target="love.summary"] article { min-height: 108px; }
.abc-workspace [data-assistant-target="abc.matrix"] { min-height: 100%; }
.love-toolbar-main { display: grid; grid-template-columns: minmax(220px,280px) minmax(0,1fr) auto; align-items: end; gap: 12px; }
.love-toolbar-title { min-height: 40px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.love-toolbar-title h1,.love-toolbar-title h2 { margin: 0; line-height: 1.15; }
.love-toolbar-export { align-self: end; }
.menu-heading-with-info,.menu-table-heading-with-info { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.menu-info-icon { display: inline-flex; flex: 0 0 auto; width: 18px; height: 18px; align-items: center; justify-content: center; margin: 0; border: 1px solid #cbd5e1; border-radius: 999px; background: #f8fafc; color: #64748b; font-family: Arial,sans-serif; font-size: 12px; font-weight: 700; line-height: 18px; text-transform: none; vertical-align: middle; cursor: help; }
@media (max-width: 1180px) { .love-toolbar-main { grid-template-columns: minmax(0,1fr) auto; }.love-toolbar-title { grid-column: 1 / -1; }.love-toolbar-filters { min-width: 0; } }
@media (max-width: 700px) { .love-toolbar-main { grid-template-columns: 1fr; }.love-toolbar-title,.love-toolbar-filters,.love-toolbar-export { grid-column: 1; }.love-toolbar-export { width: 100%; } }
.promo-workspace > .grid .glass-panel { min-height: 122px; }

/* Операционные экраны: режимы выглядят как навигация, не как ещё один набор KPI. */
.accounting-workspace .workspace-tabs { position: sticky; top: 112px; z-index: 24; width: 100%; }
.checks-workspace .workspace-mode-grid button { min-height: 118px; }
.recipe-workspace > section.grid .glass-panel { min-height: 96px; }
.prep-workspace > section.grid .glass-panel { min-height: 104px; }
.menu-changes-workspace > section.grid:last-of-type > :first-child { position: sticky; top: 126px; }

/* Итоговые страницы направлений повторяют структуру главной: итог → сравнение → действия. */
.direction-overview-description { max-width: 720px; margin: 9px 0 0; color: var(--overview-muted); font-size: 14px; line-height: 1.55; }
.direction-overview-statuses { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.direction-overview-pulse .pulse-card { min-height: 188px; }
.direction-overview-pulse .pulse-card > strong { font-size: clamp(30px,3vw,44px); }
.direction-spark-placeholder { height: 34px; }

/* Реестр изменений: два статуса собраны в одну компактную панель над списком. */
.change-summary-combined { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 12px; overflow: hidden; border: 1px solid var(--ui-border); border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.04); }
.change-summary-segment { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "label value" "detail value"; align-items: center; gap: 2px 12px; min-width: 0; padding: 13px 16px; text-align: left; background: transparent; }
.change-summary-segment + .change-summary-segment { border-left: 1px solid var(--ui-border); }
.change-summary-segment > span { grid-area: label; color: #64748b; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.change-summary-segment > strong { grid-area: value; color: #172033; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.change-summary-segment > small { grid-area: detail; color: #7b8798; font-size: 12px; }
.change-summary-segment.is-pending > strong { color: #b45309; }
.change-summary-segment.is-active { background: #eef2ff; box-shadow: inset 0 0 0 2px rgba(99,102,241,.18); }
.change-summary-segment.is-pending.is-active { background: #fffbeb; box-shadow: inset 0 0 0 2px rgba(245,158,11,.22); }

/* Продажи: главный денежный итог заметнее, дневная динамика остаётся сравнением порций. */
.sales-workspace > .sales-hero { margin-bottom: 16px; }
.sales-kpi-grid { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 12px; margin-bottom: 16px; }
.sales-kpi-grid article { min-height: 154px; padding: 20px; }
.sales-kpi-grid .sales-kpi-primary { border-color: #c7d2fe; background: #f8faff; }
.sales-kpi-grid .mini-sparkline { margin: 4px 0 2px; }
.sales-attention { margin-bottom: 16px; }

/* Детализации и окна: стабильная шапка, предсказуемый скролл и явное закрытие. */
.sales-detail-heading {
    min-height: 88px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15,23,42,.035);
}
.fixed.inset-0.backdrop-blur-sm > section,
.fixed.inset-0.backdrop-blur-sm > div { overscroll-behavior: contain; }
.fixed.inset-0.backdrop-blur-sm header { position: sticky; top: 0; z-index: 3; }
.assistant-chat-shell { min-height: 0; }
.assistant-chat-shell .workspace-hero { min-height: 70px; padding-block: 12px; }

@media (max-width: 900px) {
    .workspace-page { padding-top: 14px; padding-bottom: 100px; }
    .workspace-page .workspace-hero { min-height: 0; padding: 18px; }
    .workspace-page .workspace-hero::before { top: 18px; bottom: 18px; }
    .workspace-page .workspace-tabs { width: 100%; scroll-snap-type: x proximity; }
    .workspace-page .workspace-tabs > button { flex: 0 0 auto; scroll-snap-align: start; }
    .accounting-workspace .workspace-tabs { top: 102px; }
    .menu-changes-workspace > section.grid:last-of-type > :first-child { position: static; }
}

@media (max-width: 620px) {
    .workspace-page { padding-inline: 12px; }
    .workspace-page .workspace-hero { padding: 17px 15px; border-radius: 17px; }
    .workspace-page .workspace-hero::before { top: 17px; bottom: 17px; }
    .workspace-page .workspace-hero h1,
    .workspace-page .workspace-hero h2 { font-size: 26px; }
    .workspace-page > .grid > .glass-panel,
    .workspace-page > section.grid > .glass-panel,
    .workspace-page .workspace-mode-grid > .glass-panel { min-height: 106px; padding: 14px; }
    .workspace-page--registry > .grid { gap: 8px; }
    .workspace-page table button { min-height: 38px; }
    .sales-detail-heading { align-items: stretch; padding: 15px; }
    .direction-overview-statuses { justify-content: flex-start; }
    .direction-overview-pulse .pulse-card { min-height: 150px; }
    .change-summary-combined { grid-template-columns: 1fr; }
    .change-summary-segment + .change-summary-segment { border-top: 1px solid var(--ui-border); border-left: 0; }
    .sales-kpi-grid { grid-template-columns: 1fr; }
}

/* ── Ориентация в сложных отчётах: вопрос → три понятных шага ── */
.workspace-navigator {
    width: min(1500px,calc(100% - 32px));
    display: grid;
    grid-template-columns: minmax(250px,.82fr) minmax(560px,1.45fr);
    align-items: stretch;
    gap: 12px;
    margin: 14px auto 0;
    padding: 10px;
    border: 1px solid #dfe5ed;
    border-radius: 17px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 5px 18px rgba(15,23,42,.035);
}
.workspace-navigator-copy { min-width: 0; padding: 7px 9px; }
.workspace-navigator-copy > span { display: block; color: #6366f1; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.workspace-navigator-copy > strong { display: block; margin-top: 4px; color: #172033; font-size: 15px; line-height: 1.3; letter-spacing: -.015em; }
.workspace-navigator-copy > p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.workspace-navigator-steps { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.workspace-navigator-steps button { width: 100%; min-height: 76px; display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px; color: #334155; text-align: left; border: 1px solid #e3e7ee; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.workspace-navigator-steps button:hover { border-color: #c7d2fe; background: #f8faff; box-shadow: 0 5px 14px rgba(79,70,229,.07); }
.workspace-navigator-steps button:active { background: #eef2ff; }
.workspace-navigator-steps button > b { width: 27px; height: 27px; display: grid; place-items: center; color: #4338ca; border-radius: 9px; background: #eef2ff; font-size: 12px; }
.workspace-navigator-steps button span { min-width: 0; }
.workspace-navigator-steps button span strong,.workspace-navigator-steps button span small { display: block; }
.workspace-navigator-steps button span strong { color: #263247; font-size: 12px; line-height: 1.25; }
.workspace-navigator-steps button span small { margin-top: 3px; color: #7b8798; font-size: 12px; line-height: 1.3; }
.workspace-navigator-steps button > i { color: #818cf8; font-size: 13px; font-style: normal; }
.workspace-navigator + .workspace-page { padding-top: 12px; }

/* ── Второй цикл: единый спокойный язык рабочих экранов ── */
.v2-app-shell .app-shell-header {
    padding-inline: 18px;
    box-shadow: none;
}
.v2-app-shell .app-header-main {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.v2-app-shell .app-header-context {
    min-height: 0;
    margin-left: auto;
    padding: 0;
    border: 0;
}
.v2-app-shell .app-header-account { flex: 0 0 auto; }

/* ── Палитра v5: индиго, шафран и бумажные поверхности ── */
.app-sidebar {
    color: var(--ui-ink);
    border-color: rgba(52,48,83,.13);
    background: rgba(250,249,253,.97);
    box-shadow: 0 20px 52px rgba(31,30,67,.11);
}
.sidebar-brand-mark { border-color: #27369e; background: var(--ui-primary); }
.sidebar-brand:hover,.sidebar-group > button:hover,.sidebar-footer > button:hover { background: var(--ui-surface-muted); }
.sidebar-search:focus-within { border-color: #8d98e6; box-shadow: 0 0 0 3px rgba(52,70,197,.13); }
.sidebar-group > button,.sidebar-footer > button { color: #5d5e73; }
.sidebar-item-icon { color: #68697e; background: #efeff5; }
.sidebar-group > button.is-active { color: #26369f; background: var(--ui-primary-soft); box-shadow: inset 3px 0 var(--ui-primary); }
.sidebar-footer .sidebar-assistant,.sidebar-footer .sidebar-assistant > span:first-child { color: var(--ui-primary); }
.sidebar-footer .sidebar-assistant.is-active { color: #26369f; background: var(--ui-primary-soft); }
.primary-navigation.is-collapsed .sidebar-group + .sidebar-group { border-top-color: rgba(52,48,83,.10); }
.primary-navigation.is-collapsed .sidebar-item-icon { color: #66677b; }
.primary-navigation.is-collapsed .sidebar-group > button:hover .sidebar-item-icon { color: var(--ui-primary); background: var(--ui-primary-soft); }
.primary-navigation.is-collapsed .sidebar-group > button.is-active .sidebar-item-icon {
    background: var(--ui-primary);
    box-shadow: 0 8px 20px rgba(52,70,197,.25);
}
.primary-navigation.is-collapsed .sidebar-footer .sidebar-assistant > span:first-child { background: #eceaff; }

.v2-app-shell .app-shell-header {
    border-color: rgba(52,48,83,.11);
    background: rgba(250,249,253,.96);
    box-shadow: 0 10px 30px rgba(31,30,67,.06);
}
.header-period-presets button.is-active,.header-period-custom[open] > summary {
    border-color: var(--ui-primary);
    background: var(--ui-primary);
}
.overview-kicker { color: var(--ui-primary); }
.overview-ghost-button:hover { color: var(--ui-primary); border-color: #9ca5e6; }

.home-metric-card {
    border-color: rgba(52,48,83,.11) !important;
    background: var(--ui-surface);
    box-shadow: 0 10px 30px rgba(31,30,67,.055);
}
.home-metric-card:hover { border-color: rgba(52,70,197,.25) !important; box-shadow: 0 15px 38px rgba(31,30,67,.08); }
.home-metric-card--lead,
.home-metric-card--lead.is-good,
.home-metric-card--lead.is-warning,
.home-metric-card--lead.is-risk { background: #1d2446; }
.home-metric-card--lead > .mini-sparkline { color: #f5c85e; }
.home-metric-card--lead .mini-sparkline-area { opacity: .18; }
.home-metric-card--lead.is-good .home-metric-signal { color: #72d4b5 !important; }
.home-metric-card--lead.is-warning .home-metric-signal { color: #f5c85e !important; }
.home-metric-card--lead.is-risk .home-metric-signal { color: #ff8d96 !important; }
.home-metric-card--channels { background: #e6c66f; }
.home-metric-card--channels .home-metric-label b { color: #61501d; }
.home-channel-values > div { background: rgba(255,255,255,.52); }
.home-channel-values > div + div { background: #292f59; }

.money-pulse .money-pulse-primary,
.money-pulse .money-pulse-primary.is-neutral { background: #242b52 !important; }
.money-pulse .money-pulse-primary.is-warning { background: #916014 !important; }

@media (max-width: 900px) {
    .primary-nav-mobile button.is-active { color: var(--ui-primary); background: var(--ui-primary-soft); }
}
.workspace-page .workspace-hero {
    min-height: 76px;
    padding: 16px 18px !important;
    border-radius: 14px;
    box-shadow: none;
}
.workspace-page .workspace-hero::before { top: 16px; bottom: 16px; }
.workspace-page .workspace-hero h1,
.workspace-page .workspace-hero h2 { font-size: clamp(22px,1.8vw,28px); }
.workspace-page .workspace-hero h1 + p,
.workspace-page .workspace-hero h2 + p { margin-top: 4px; line-height: 1.4; }
.workspace-page > .grid > .glass-panel,
.workspace-page > section.grid > .glass-panel,
.workspace-page > section.grid > article.glass-panel,
.workspace-page .workspace-mode-grid > .glass-panel {
    min-height: 96px;
    padding: 14px;
}
.btn-primary,.btn-secondary,
.workspace-page button[class*="bg-indigo-600"][class*="text-white"],
.workspace-page button[class*="bg-emerald-600"][class*="text-white"] {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 9px;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
}
.btn-primary,
.workspace-page button[class*="bg-indigo-600"][class*="text-white"] {
    background: #4f46e5;
}
.btn-secondary { background: #fff; }
.workspace-page :is(input:not([type="checkbox"]):not([type="radio"]),select) {
    min-height: 38px;
    border-color: #dbe1e9;
    border-radius: 9px;
    box-shadow: none;
}
.workspace-page textarea { border-color: #dbe1e9; border-radius: 9px; box-shadow: none; }
.workspace-page details.glass-panel > summary {
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 14px;
}
.workspace-page details.glass-panel[open] > summary { border-radius: 14px 14px 0 0; }
.channel-tabs,.workspace-page .workspace-tabs {
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: #f1f4f8;
}
.channel-tab,.workspace-page .workspace-tabs > button {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: none !important;
}
@media (max-width: 620px) {
    .channel-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: visible; }
    .channel-tab { min-height: 48px; padding: 6px 4px; gap: 3px; white-space: normal; line-height: 1.35; }
    .channel-tab > svg { display: none; }
}
.channel-tab.is-active,.workspace-page .workspace-tabs > button.is-active {
    color: #3730a3;
    border-color: #dfe3f8;
    background: #fff;
}
.money-control-bar {
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.money-section-nav {
    display: flex;
    gap: 3px;
    padding: 3px;
    overflow-x: auto;
    border-radius: 10px;
    background: #eef1f5;
    box-shadow: none;
}
.money-section-tab {
    min-height: 36px;
    display: flex;
    grid-template-columns: none;
    padding: 0 12px;
    border-radius: 8px;
    white-space: nowrap;
}
.money-section-tab .money-section-symbol,.money-section-tab small { display: none; }
.money-section-tab strong { font-size: 12px; }
.money-section-tab.is-active { border-color: #dfe3f8; background: #fff; box-shadow: none; }
.money-pulse article {
    min-height: 108px;
    padding: 14px;
    border-radius: 14px;
    box-shadow: none;
}
.money-pulse .money-pulse-primary {
    background: #4f46e5;
    box-shadow: none;
}
.overview-hero { padding: 12px 0 16px; }
.overview-kicker { margin-bottom: 4px; font-size: 12px; }
.overview-hero h1 { font-size: clamp(26px,2.4vw,34px); }
.overview-ghost-button { min-height: 38px; padding: 0 13px; border-radius: 9px; font-size: 12px; }
.overview-pulse { gap: 10px; }
.pulse-card {
    min-height: 132px;
    padding: 15px;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}
.pulse-primary { background: #4f46e5; box-shadow: none; }
.pulse-card > strong { font-size: clamp(27px,2.5vw,36px); }
.pulse-card > small { font-size: 12px; }
@media (max-width: 900px) {
    .v2-app-shell .app-header-main { flex-wrap: wrap; padding-block: 7px; }
    .v2-app-shell .app-header-context { width: 100%; order: 2; }
    .v2-app-shell .app-header-account { margin-left: auto; }
    .sales-primary-filters > * { min-width: 0; max-width: 100%; }
    .sales-primary-filters .channel-tabs { width: 100%; min-width: 0; }
    .sales-primary-filters .channel-tab { min-width: 0; padding-inline: 7px; }
}
@media (max-width: 620px) {
    .v2-app-shell .header-period { flex-wrap: nowrap; overflow-x: auto; }
    .v2-app-shell .header-period-presets { width: auto; flex: 0 0 auto; }
    .workspace-page .workspace-hero { flex-wrap: wrap; }
    .workspace-page .workspace-hero > .btn-primary { max-width: 100%; white-space: normal; }
}
.workspace-step-highlight { animation: workspace-step-pulse 1.8s ease-out; }
@keyframes workspace-step-pulse { 0%,28% { box-shadow: 0 0 0 4px rgba(99,102,241,.22); } 100% { box-shadow: inherit; } }

@media (max-width: 980px) {
    .workspace-navigator { grid-template-columns: 1fr; }
    .workspace-navigator-copy > p { max-width: 760px; }
}
@media (max-width: 620px) {
    .workspace-navigator { width: calc(100% - 24px); margin-top: 10px; padding: 9px; }
    .workspace-navigator-copy { padding: 5px 7px 7px; }
    .workspace-navigator-copy > strong { font-size: 14px; }
    .workspace-navigator-copy > p { font-size: 12px; }
    .workspace-navigator-steps { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .workspace-navigator-steps::-webkit-scrollbar { display: none; }
    .workspace-navigator-steps li { flex: 0 0 min(240px,78vw); scroll-snap-align: start; }
    .workspace-navigator-steps button { min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    .workspace-navigator-steps button { transition: none; }
    .workspace-step-highlight { animation: none; outline: 3px solid rgba(99,102,241,.24); outline-offset: 3px; }
}

/* ── Третий цикл: спокойная продуктовая тема ──────────────────── */
.workspace-page .workspace-hero::before { display: none; }
.v2-app-shell .app-shell-header {
    border-bottom-color: var(--ui-border);
    background: var(--ui-surface);
}
#app > main table thead { background: var(--ui-surface-muted); }
#app > main table tbody tr:hover { background: #f7f7f4; }
button.glass-panel:hover,[role="button"].glass-panel:hover {
    border-color: var(--ui-border-strong);
    box-shadow: var(--ui-shadow-card);
}

.btn-primary,
.workspace-page button[class*="bg-indigo-600"][class*="text-white"],
.pulse-primary,
.money-pulse .money-pulse-primary {
    background: var(--ui-primary) !important;
    box-shadow: none;
}
.btn-primary:hover,
.workspace-page button[class*="bg-indigo-600"][class*="text-white"]:hover { background: var(--ui-primary-hover) !important; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
    outline-color: var(--ui-primary);
}

.v2-app-shell .text-indigo-600,
.v2-app-shell .text-indigo-700,
.v2-app-shell .text-indigo-500,
.v2-app-shell .text-violet-600,
.v2-app-shell .text-violet-700,
.v2-app-shell .text-violet-500,
.v2-app-shell .text-purple-600,
.v2-app-shell .text-purple-700 { color: var(--ui-primary) !important; }
.v2-app-shell .bg-indigo-50,
.v2-app-shell .bg-indigo-100,
.v2-app-shell .bg-violet-50,
.v2-app-shell .bg-purple-50 { background-color: var(--ui-primary-soft) !important; }
.v2-app-shell .bg-indigo-400 { background-color: #79a891 !important; }
.v2-app-shell .bg-violet-600,.v2-app-shell .bg-purple-600 { background-color: var(--ui-primary) !important; }
.v2-app-shell .border-indigo-100,
.v2-app-shell .border-indigo-200,
.v2-app-shell .border-indigo-300,
.v2-app-shell .border-violet-100,
.v2-app-shell .border-violet-200,
.v2-app-shell .border-violet-300 { border-color: #bed8ca !important; }
.v2-app-shell [class*="focus:ring-indigo"],
.v2-app-shell [class*="focus:ring-violet"],
.v2-app-shell [class*="focus:ring-purple"] { --tw-ring-color: rgba(23,99,72,.3) !important; }

.channel-tab.is-active,
.workspace-page .workspace-tabs > button.is-active,
.money-section-tab.is-active,
.change-summary-segment.is-active,
.abc-matrix > button:hover,
.abc-matrix > button.is-active {
    color: var(--ui-ink);
    border-color: var(--ui-border-strong);
    background: var(--ui-surface);
    box-shadow: inset 0 -2px var(--ui-primary) !important;
}
.header-period-presets button.is-active,
.header-period-custom[open] > summary {
    color: #fff;
    border-color: var(--ui-primary);
    background: var(--ui-primary);
}

.app-sidebar {
    color: #e4e5e2;
    border-right: 1px solid #343734;
    background: #202320;
    box-shadow: 8px 0 24px rgba(20,22,20,.08);
}
.sidebar-brand-mark {
    border-color: rgba(255,255,255,.12);
    background: #b76543;
    box-shadow: none;
}
.sidebar-group > p { color: #8e938e; }
.sidebar-group > button,.sidebar-footer > button { color: #c5c8c4; }
.sidebar-group > button.is-active {
    color: #fff;
    background: rgba(209,107,73,.18);
    box-shadow: inset 3px 0 #d16b49;
}
.sidebar-item-icon { color: #c2c5c1; background: rgba(255,255,255,.06); }
.sidebar-search:focus-within { border-color: #d16b49; box-shadow: 0 0 0 3px rgba(209,107,73,.15); }
.sidebar-collapse-toggle:hover { color: #fff; border-color: #777b76; }
.sidebar-collapse-toggle:focus-visible { outline-color: #d16b49; }
.sidebar-footer .sidebar-assistant { color: #d0d2cf; }
.sidebar-footer .sidebar-assistant > span:first-child { color: #e5a28b; }
.sidebar-footer .sidebar-assistant.is-active { background: rgba(209,107,73,.2); }

.overview-kicker,
.workspace-guide-disclosure > summary small,
.workspace-guide-disclosure > summary > b i,
.workspace-navigator-copy > span,
.workspace-navigator-steps button > i,
.insight-disclosure-trigger > b { color: var(--ui-primary); }
.workspace-navigator-steps button > b,
.insight-disclosure-trigger > span:first-child { color: var(--ui-primary); background: var(--ui-primary-soft); }
.mini-sparkline,.sparkline-indigo { color: #202320; }

@media (max-width: 900px) {
    .primary-nav-mobile {
        border-color: var(--ui-border);
        background: var(--ui-surface);
        box-shadow: 0 10px 28px rgba(39,48,43,.12);
        backdrop-filter: none;
    }
    .primary-nav-mobile button.is-active { color: var(--ui-primary); background: var(--ui-primary-soft); }
    .mobile-leaf.is-active { color: var(--ui-primary); }
    .mobile-assistant { color: var(--ui-primary); background: var(--ui-primary-soft); }
    .mobile-sheet-groups > div { border-color: var(--ui-border); }
    .mobile-nav-search input { border-color: var(--ui-border); background: var(--ui-surface-muted); }
}

/* Главная: шесть управленческих метрик без декоративной иерархии. */
.home-metric-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
}
.home-metric-card {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 17px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-card);
}
.home-metric-card--lead { background: #f7f7f3; }
.home-metric-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-metric-label span { color: var(--ui-ink); font-size: 13px; font-weight: 700; }
.home-metric-label b { color: var(--ui-subtle); font-size: 12px; font-weight: 700; }
.home-metric-card > strong { margin-top: 20px; color: var(--ui-ink); font-size: clamp(30px,3vw,42px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.home-metric-card > .mini-sparkline { height: 34px; margin: auto 0 6px; }
.home-metric-card > small { margin-top: auto; color: var(--ui-muted); font-size: 12px; }
.home-metric-card > small.is-positive,.home-metric-card > small.is-good { color: #26735b; }
.home-metric-card > small.is-negative,.home-metric-card > small.is-risk { color: #b33b32; }
.home-metric-card > small.is-warning { color: #a26212; }
.home-channel-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 24px 0 18px; }
.home-channel-values > div + div { padding-left: 14px; border-left: 1px solid var(--ui-border); }
.home-channel-values small,.home-channel-values strong { display: block; }
.home-channel-values small { color: var(--ui-muted); font-size: 12px; }
.home-channel-values strong { margin-top: 5px; color: var(--ui-ink); font-size: clamp(23px,2.3vw,32px); line-height: 1; letter-spacing: -.035em; }

/* Нагрузка кухни: сначала решение, затем четыре факта, детали по запросу. */
.live-kitchen-panel { padding: 18px; border: 1px solid var(--ui-border); border-radius: 17px; background: #fff; }
.live-kitchen-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.live-kitchen-presence > strong,.live-kitchen-presence > small { display: block; }
.live-kitchen-presence > strong { margin-top: 8px; color: var(--ui-ink); font-size: 17px; text-transform: capitalize; }
.live-kitchen-presence > small { margin-top: 2px; color: var(--ui-muted); font-size: 12px; }
.live-kitchen-status { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 24px; margin-top: 16px; padding: 15px 17px; border-radius: 13px; background: #eef7f2; }
.live-kitchen-status.is-overloaded { background: #fff0ee; }
.live-kitchen-status small,.live-kitchen-status strong,.live-kitchen-status time { display: block; }
.live-kitchen-status small { color: var(--ui-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.live-kitchen-status > div:first-child > strong { margin-top: 3px; color: var(--ui-ink); font-size: 14px; }
.live-kitchen-load { text-align: right; }
.live-kitchen-load strong { color: #26735b; font-size: 25px; line-height: 1; }
.is-overloaded .live-kitchen-load strong { color: #b33b32; }
.live-kitchen-load small { margin-top: 4px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.live-kitchen-status time { color: var(--ui-muted); font-size: 12px; }
.live-kitchen-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.live-kitchen-metrics article { min-height: 100px; padding: 14px; border: 1px solid #e8e8e3; border-radius: 13px; background: #fafaf8; }
.live-kitchen-metrics small,.live-kitchen-metrics strong,.live-kitchen-metrics span { display: block; }
.live-kitchen-metrics small { color: var(--ui-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.live-kitchen-metrics strong { margin-top: 9px; color: var(--ui-ink); font-size: 24px; line-height: 1; letter-spacing: -.03em; }
.live-kitchen-metrics span { margin-top: 7px; color: var(--ui-muted); font-size: 12px; }
.live-kitchen-metrics article.is-risk { border-color: #f0c9c5; background: #fff5f4; }
.live-kitchen-metrics article.is-risk strong { color: #b33b32; }
.live-kitchen-details,.live-kitchen-warning { margin-top: 10px; border-top: 1px solid var(--ui-border); }
.live-kitchen-details summary,.live-kitchen-warning summary { padding: 12px 2px 4px; color: var(--ui-muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.live-kitchen-details > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.live-kitchen-details p { padding: 10px; border-radius: 10px; background: var(--ui-surface-muted); }
.live-kitchen-details p b,.live-kitchen-details p span { display: block; }
.live-kitchen-details p b { color: var(--ui-ink); font-size: 14px; }
.live-kitchen-details p span,.live-kitchen-details > small,.live-kitchen-warning p { margin-top: 3px; color: var(--ui-muted); font-size: 12px; line-height: 1.45; }
.live-kitchen-details .live-kitchen-history-note {
    margin: 10px 0;
    padding: 10px 12px;
    color: #8b4a20;
    border: 1px solid #efd5b1;
    border-radius: 10px;
    background: #fff9ec;
    font-size: 12px;
    line-height: 1.45;
}
.live-kitchen-warning summary { color: #a26212; }

@media (max-width: 900px) {
    .home-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .live-kitchen-toolbar { flex-direction: column; }
    .live-kitchen-status { grid-template-columns: minmax(0,1fr) auto; }
    .live-kitchen-status time { grid-column: 1 / -1; }
    .live-kitchen-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
    .home-metric-grid { grid-template-columns: 1fr; }
    .home-metric-card { min-height: 156px; padding: 17px; }
    .live-kitchen-panel { padding: 13px; }
    .live-kitchen-status { grid-template-columns: 1fr; gap: 10px; }
    .live-kitchen-load { text-align: left; }
    .live-kitchen-status time { grid-column: auto; }
    .live-kitchen-metrics { grid-template-columns: 1fr 1fr; }
    .live-kitchen-metrics article { min-height: 94px; padding: 11px; }
    .live-kitchen-metrics strong { font-size: 21px; }
    .live-kitchen-details > div { grid-template-columns: 1fr; }
}

/* ── Финальная визуальная система: дизайн как управленческий сигнал ── */
/* Светлая навигация продолжает геометрию карточек из референсов. */
.v2-app-shell { padding-left: 268px; }
.v2-app-shell:has(.primary-navigation.is-collapsed) { padding-left: 92px; }
.app-sidebar {
    inset: 14px auto 14px 14px;
    width: 240px;
    padding: 14px 11px;
    color: var(--ui-ink);
    border: 1px solid rgba(201,201,193,.9);
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 46px rgba(28,31,28,.08);
}
.sidebar-collapse-toggle { top: 18px; right: -13px; width: 28px; height: 28px; color: var(--ui-muted); border-color: var(--ui-border); box-shadow: 0 4px 12px rgba(21,24,21,.1); }
.sidebar-collapse-toggle:hover { color: var(--ui-primary); border-color: #d7a896; }
.sidebar-brand { color: var(--ui-ink); }
.sidebar-brand:hover { background: var(--ui-surface-muted); }
.sidebar-brand-mark { color: #fff; border-color: #9d3f24; background: var(--ui-primary); box-shadow: none; }
.sidebar-brand-copy strong { font-size: 15px; }
.sidebar-brand-copy small { color: var(--ui-muted); }
.sidebar-search { border-color: var(--ui-border); background: var(--ui-surface-muted); }
.sidebar-search:focus-within { border-color: #d7a896; box-shadow: 0 0 0 3px rgba(180,79,46,.12); }
.sidebar-search b,.sidebar-search input::placeholder { color: var(--ui-subtle); }
.sidebar-search input { color: var(--ui-ink); }
.sidebar-groups { scrollbar-color: #d2d2cb transparent; }
.sidebar-group > p { color: var(--ui-subtle); }
.sidebar-group > button,.sidebar-footer > button { color: #575d57; }
.sidebar-group > button:hover,.sidebar-footer > button:hover { color: var(--ui-ink); background: var(--ui-surface-muted); }
.sidebar-group > button.is-active { color: #7f311c; background: var(--ui-primary-soft); box-shadow: inset 3px 0 var(--ui-primary); }
.sidebar-item-icon { color: #6e716e; background: #f0f0ec; }
.sidebar-group > button.is-active .sidebar-item-icon { color: #fff; background: var(--ui-primary); }
.sidebar-footer { border-top-color: var(--ui-border); }
.sidebar-footer .sidebar-assistant { color: #7b4434; }
.sidebar-footer .sidebar-assistant > span:first-child { color: var(--ui-primary); }
.sidebar-footer .sidebar-assistant.is-active { color: #7f311c; background: var(--ui-primary-soft); }
.primary-navigation.is-collapsed .app-sidebar { width: 66px; }

.v2-app-shell .app-shell-header { top: 12px; margin: 12px 18px 10px; padding-inline: 16px; border: 1px solid var(--ui-border); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 8px 26px rgba(21,24,21,.045); }
.v2-app-shell .app-header-context { border-top-color: #ecece7; }
.app-connection { color: var(--ui-muted); background: var(--ui-surface-muted); border-color: var(--ui-border); }

/* Экраны и управляющие поверхности. */
.overview-page,.workspace-page,#app > main:not(.overview-page) { width: min(100%, 1480px); }
.workspace-page .workspace-hero { padding: 8px 0 16px !important; border: 0; border-radius: 0; background: transparent; }
.workspace-page .workspace-hero h1,.workspace-page .workspace-hero h2,.overview-hero h1 { color: var(--ui-ink); font-weight: 700; }
.overview-kicker { color: var(--ui-primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.overview-ghost-button { border-color: var(--ui-border); background: rgba(255,255,255,.72); }
.overview-ghost-button:hover { color: var(--ui-primary); border-color: #d7a896; background: #fff; }
.btn-primary,.workspace-page button[class*="bg-indigo-600"][class*="text-white"],.workspace-page button[class*="bg-emerald-600"][class*="text-white"] { background: var(--ui-primary) !important; }
.btn-primary:hover,.workspace-page button[class*="bg-indigo-600"][class*="text-white"]:hover,.workspace-page button[class*="bg-emerald-600"][class*="text-white"]:hover { background: var(--ui-primary-hover) !important; }

/* Сводный сигнал выбранного периода. */
.overview-period-signal { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 76px; margin-bottom: 12px; padding: 13px 16px; border: 1px solid var(--signal-neutral-border); border-radius: 17px; background: var(--signal-neutral-bg); }
.overview-period-signal.is-good { border-color: var(--signal-good-border); background: var(--signal-good-bg); }
.overview-period-signal.is-warning { border-color: var(--signal-warning-border); background: var(--signal-warning-bg); }
.overview-period-signal.is-risk { border-color: var(--signal-risk-border); background: var(--signal-risk-bg); }
.overview-period-signal__icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--signal-neutral); font-size: 17px; font-weight: 700; }
.overview-period-signal.is-good .overview-period-signal__icon { background: var(--signal-good); }
.overview-period-signal.is-warning .overview-period-signal__icon { background: var(--signal-warning); }
.overview-period-signal.is-risk .overview-period-signal__icon { background: var(--signal-risk); }
.overview-period-signal__copy strong,.overview-period-signal__copy span { display: block; }
.overview-period-signal__copy strong { color: var(--ui-ink); font-size: 14px; }
.overview-period-signal__copy span { max-width: 780px; margin-top: 3px; color: var(--ui-muted); font-size: 12px; line-height: 1.45; }
.overview-period-signal__counts { display: flex; align-items: center; gap: 6px; }
.overview-period-signal__counts > span { padding: 6px 9px; color: var(--signal-neutral); border: 1px solid var(--signal-neutral-border); border-radius: 999px; background: rgba(255,255,255,.7); font-size: 12px; white-space: nowrap; }
.overview-period-signal__counts .is-good { color: var(--signal-good); border-color: var(--signal-good-border); }
.overview-period-signal__counts .is-warning { color: var(--signal-warning); border-color: var(--signal-warning-border); }
.overview-period-signal__counts .is-risk { color: var(--signal-risk); border-color: var(--signal-risk-border); }

/* KPI: цвет не украшает карточку, а сообщает её состояние. */
.home-metric-grid { gap: 12px; }
.home-metric-card { position: relative; min-height: 184px; border-radius: 18px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.home-metric-card::before { content: ''; position: absolute; inset: 14px auto 14px 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--signal-neutral-border); }
.home-metric-card.is-good::before { background: var(--signal-good); }
.home-metric-card.is-warning::before { background: var(--signal-warning); }
.home-metric-card.is-risk::before { background: var(--signal-risk); }
.home-metric-card.is-good { border-color: #d5e8df; }
.home-metric-card.is-warning { border-color: var(--signal-warning-border); background: #fffdfa; }
.home-metric-card.is-risk { border-color: var(--signal-risk-border); background: #fffafa; }
.home-metric-card:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(21,24,21,.07); }
.home-metric-label span { font-size: 12px; }
.home-metric-label b.home-metric-signal { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; color: var(--signal-neutral); border: 1px solid var(--signal-neutral-border); border-radius: 999px; background: var(--signal-neutral-bg); font-size: 12px; white-space: nowrap; }
.home-metric-label b.home-metric-signal::before { content: ''; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.home-metric-label b.home-metric-signal.is-good { color: var(--signal-good); border-color: var(--signal-good-border); background: var(--signal-good-bg); }
.home-metric-label b.home-metric-signal.is-warning { color: var(--signal-warning); border-color: var(--signal-warning-border); background: var(--signal-warning-bg); }
.home-metric-label b.home-metric-signal.is-risk { color: var(--signal-risk); border-color: var(--signal-risk-border); background: var(--signal-risk-bg); }
.home-metric-card > strong { font-weight: 700; }
.home-metric-card > small.is-positive,.home-metric-card > small.is-good { color: var(--signal-good); }
.home-metric-card > small.is-warning { color: var(--signal-warning); }
.home-metric-card > small.is-negative,.home-metric-card > small.is-risk { color: var(--signal-risk); }

.money-pulse .money-pulse-primary { border-color: transparent; background: #313630 !important; }
.money-pulse .money-pulse-primary.is-good { background: var(--signal-good) !important; }
.money-pulse .money-pulse-primary.is-warning { background: #8a6118 !important; }
.money-pulse .money-pulse-primary.is-risk { background: var(--signal-risk) !important; }
.money-pulse .money-pulse-primary.is-neutral { background: #313630 !important; }

/* Единые статусы на остальных экранах. */
.v2-app-shell .text-emerald-500,.v2-app-shell .text-emerald-600,.v2-app-shell .text-green-600 { color: var(--signal-good) !important; }
.v2-app-shell .text-amber-500,.v2-app-shell .text-amber-600,.v2-app-shell .text-yellow-600 { color: var(--signal-warning) !important; }
.v2-app-shell .text-red-500,.v2-app-shell .text-red-600,.v2-app-shell .text-rose-600 { color: var(--signal-risk) !important; }
.v2-app-shell .bg-emerald-50,.v2-app-shell .bg-green-50 { background-color: var(--signal-good-bg) !important; }
.v2-app-shell .bg-amber-50,.v2-app-shell .bg-yellow-50 { background-color: var(--signal-warning-bg) !important; }
.v2-app-shell .bg-red-50,.v2-app-shell .bg-rose-50 { background-color: var(--signal-risk-bg) !important; }

/* Экран входа — тот же продукт, а не отдельный фиолетовый шаблон. */
.login-shell { position: relative; overflow: hidden; background: radial-gradient(circle at 22% 18%,rgba(23,107,78,.10),transparent 31%),var(--ui-canvas); }
.login-shell::before { content: attr(data-brand); position: absolute; right: clamp(24px,8vw,120px); bottom: clamp(18px,7vw,80px); color: rgba(23,26,23,.025); font-size: clamp(160px,28vw,420px); font-weight: 700; line-height: .75; letter-spacing: -.12em; pointer-events: none; }
.login-card { position: relative; border-radius: 24px; box-shadow: 0 26px 70px rgba(21,24,21,.13); }
.login-brand-mark { background: var(--ui-primary); font-weight: 750; font-size: 18px; overflow: hidden; }
.login-eyebrow { margin-bottom: 4px; color: var(--ui-primary); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-submit { min-height: 44px; background: var(--ui-primary); }
.login-submit:hover { background: var(--ui-primary-hover); }

@media (max-width: 1100px) {
    .overview-period-signal { grid-template-columns: auto minmax(0,1fr); }
    .overview-period-signal__counts { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 900px) {
    .v2-app-shell,.v2-app-shell:has(.primary-navigation.is-collapsed) { padding-left: 0; }
    .v2-app-shell .app-shell-header { top: 0; margin: 0 0 8px; border-width: 0 0 1px; border-radius: 0; }
    .primary-nav-mobile { border-color: var(--ui-border); background: rgba(255,255,255,.97); box-shadow: 0 14px 38px rgba(21,24,21,.14); }
    .primary-nav-mobile button.is-active { color: var(--ui-primary); background: var(--ui-primary-soft); }
}
@media (max-width: 620px) {
    .overview-period-signal { grid-template-columns: auto minmax(0,1fr); align-items: start; }
    .overview-period-signal__counts { grid-column: 1 / -1; width: 100%; overflow-x: auto; }
    .overview-period-signal__counts > span { flex: 0 0 auto; }
    .home-metric-card { min-height: 164px; }
    .login-card { padding: 24px !important; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-metric-card { transition: none; }
    .home-metric-card:hover { transform: none; }
}

/* ── Арт-дирекция v4: editorial bento вместо SaaS-сетки ── */
.v2-app-shell { padding-left: 94px; }
.v2-app-shell:has(.primary-navigation.is-collapsed) { padding-left: 94px; }
.v2-app-shell:has(.primary-navigation:not(.is-collapsed)) { padding-left: 268px; }

.app-sidebar {
    width: 240px;
    border-color: rgba(23,26,23,.12);
    background: #f7f7f3;
    box-shadow: 0 18px 48px rgba(23,26,23,.10);
}
.primary-navigation.is-collapsed .app-sidebar { width: 66px; padding-inline: 8px; }
.primary-navigation.is-collapsed .sidebar-brand { min-height: 48px; }
.primary-navigation.is-collapsed .sidebar-brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; }
.primary-navigation.is-collapsed .sidebar-groups { padding-right: 0; }
.primary-navigation.is-collapsed .sidebar-group + .sidebar-group { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(23,26,23,.08); }
.primary-navigation.is-collapsed .sidebar-group > button,
.primary-navigation.is-collapsed .sidebar-footer > button { min-height: 42px; border-radius: 13px; }
.primary-navigation.is-collapsed .sidebar-item-icon { width: 38px; height: 38px; flex-basis: 38px; color: #5f645e; border-radius: 12px; background: transparent; font-size: 15px; font-weight: 700; }
.primary-navigation.is-collapsed .sidebar-group > button:hover .sidebar-item-icon { color: var(--ui-ink); background: #e9e9e3; }
.primary-navigation.is-collapsed .sidebar-group > button.is-active { background: transparent; box-shadow: none; }
.primary-navigation.is-collapsed .sidebar-group > button.is-active .sidebar-item-icon { color: #fff; background: var(--ui-primary); box-shadow: 0 7px 18px rgba(180,79,46,.22); }
.primary-navigation.is-collapsed .sidebar-footer { padding-top: 8px; }
.primary-navigation.is-collapsed .sidebar-footer .sidebar-assistant { background: transparent; }
.primary-navigation.is-collapsed .sidebar-footer .sidebar-assistant > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #efe5df; }

.v2-app-shell .app-shell-header {
    margin-left: 12px;
    background: rgba(247,247,243,.96);
    border-color: rgba(23,26,23,.10);
    box-shadow: 0 10px 28px rgba(23,26,23,.055);
}

.overview-page { max-width: 1380px !important; padding-top: 20px; }
.overview-hero { align-items: flex-end; padding: 22px 0 18px; }
.overview-hero h1 { font-size: clamp(38px,4.4vw,62px); font-weight: 700; line-height: .98; letter-spacing: -.065em; }
.overview-subtitle { max-width: 560px; margin-top: 11px; color: var(--ui-muted); font-size: 13px; line-height: 1.5; }
.overview-kicker { margin-bottom: 11px; font-size: 12px; }
.overview-ghost-button { min-height: 44px; padding: 0 16px; border-radius: 999px; }

.overview-period-signal {
    min-height: 58px;
    margin: 0 0 16px;
    padding: 10px 2px;
    border-width: 1px 0;
    border-color: rgba(23,26,23,.14) !important;
    border-radius: 0;
    background: transparent !important;
}
.overview-period-signal__icon {
    width: 30px;
    height: 30px;
    color: var(--signal-neutral);
    border: 1px solid currentColor;
    background: transparent !important;
    font-size: 13px;
}
.overview-period-signal.is-good .overview-period-signal__icon { color: var(--signal-good); }
.overview-period-signal.is-warning .overview-period-signal__icon { color: var(--signal-warning); }
.overview-period-signal.is-risk .overview-period-signal__icon { color: var(--signal-risk); }
.overview-period-signal__copy { display: flex; align-items: baseline; gap: 10px; }
.overview-period-signal__copy strong { font-size: 13px; }
.overview-period-signal__copy span { margin-top: 0; font-size: 12px; }
.overview-period-signal__counts { gap: 12px; }
.overview-period-signal__counts > span { padding: 0; border: 0; background: transparent; font-size: 12px; }
.overview-period-signal__counts > span + span { padding-left: 12px; border-left: 1px solid rgba(23,26,23,.12); }

.home-metric-grid {
    grid-template-columns: repeat(12,minmax(0,1fr));
    grid-auto-flow: row dense;
    gap: 14px;
}
.home-metric-card {
    min-height: 176px;
    padding: 20px;
    border-color: rgba(23,26,23,.10) !important;
    border-radius: 22px;
    background: #f7f7f3;
    box-shadow: 0 10px 28px rgba(23,26,23,.055);
}
.home-metric-card::before { display: none; }
.home-metric-card:hover { transform: none; border-color: rgba(23,26,23,.20) !important; box-shadow: 0 14px 34px rgba(23,26,23,.075); }
.home-metric-card--lead {
    grid-column: span 7;
    grid-row: span 2;
    min-height: 378px;
    padding: 26px;
    color: #fff;
    border: 0 !important;
    background: #252925;
}
.home-metric-card--lead.is-good { background: #155f48; }
.home-metric-card--lead.is-risk { background: #6f2b25; }
.home-metric-card--lead.is-warning { background: #755414; }
.home-metric-card--orders,.home-metric-card--check { grid-column: span 5; }
.home-metric-card--foodcost,.home-metric-card--labor { grid-column: span 3; min-height: 164px; }
.home-metric-card--channels { grid-column: span 6; min-height: 164px; background: #d5cfbf; }

.home-metric-card--lead .home-metric-label span,
.home-metric-card--lead > strong { color: #fff; }
.home-metric-card--lead > strong { margin-top: 40px; font-size: clamp(48px,6vw,82px); font-weight: 690; }
.home-metric-card--lead > .mini-sparkline { height: 112px; margin: auto 0 10px; color: rgba(255,255,255,.94); }
.home-metric-card--lead > .mini-sparkline svg { height: 104px; }
.home-metric-card--lead .mini-sparkline-area { opacity: .14; }
.home-metric-card--lead .mini-sparkline > span { color: rgba(255,255,255,.56); }
.home-metric-card--lead > small,
.home-metric-card--lead > small.is-positive,
.home-metric-card--lead > small.is-negative { color: rgba(255,255,255,.76); font-size: 12px; }

.home-metric-label b.home-metric-signal {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent !important;
    font-size: 12px;
}
.home-metric-label b.home-metric-signal::before { width: 6px; height: 6px; }
.home-metric-card--lead .home-metric-signal { color: rgba(255,255,255,.78) !important; }
.home-metric-card--lead .home-metric-signal::before { background: #fff; }
.home-metric-card:not(.home-metric-card--lead) > strong { margin-top: 24px; font-size: clamp(32px,3.6vw,48px); }
.home-metric-card--foodcost > strong,.home-metric-card--labor > strong { margin-top: 28px; font-size: clamp(34px,3.7vw,50px); }
.home-metric-card--channels .home-metric-label b { color: #5e5b53; }
.home-channel-values { gap: 8px; margin: 24px 0 12px; }
.home-channel-values > div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.45); }
.home-channel-values > div + div { padding-left: 12px; border-left: 0; background: rgba(37,41,37,.92); }
.home-channel-values > div + div small { color: rgba(255,255,255,.62); }
.home-channel-values > div + div strong { color: #fff; }
.home-channel-values strong { font-size: clamp(24px,3vw,38px); }

.money-pulse { grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; }
.money-pulse article { min-height: 148px; padding: 20px; border-radius: 22px; }
.money-pulse .money-pulse-primary { box-shadow: 0 15px 32px rgba(23,26,23,.13); }

@media (max-width: 1100px) {
    .home-metric-card--lead { grid-column: span 7; }
    .home-metric-card--orders,.home-metric-card--check { grid-column: span 5; }
    .home-metric-card--foodcost,.home-metric-card--labor { grid-column: span 6; }
    .home-metric-card--channels { grid-column: span 12; }
    .overview-period-signal__copy { display: block; }
}
@media (max-width: 900px) {
    .v2-app-shell,.v2-app-shell:has(.primary-navigation.is-collapsed),.v2-app-shell:has(.primary-navigation:not(.is-collapsed)) { padding-left: 0; }
    .overview-hero h1 { font-size: clamp(36px,9vw,54px); }
    .home-metric-card--lead { grid-column: span 12; grid-row: auto; min-height: 310px; }
    .home-metric-card--orders,.home-metric-card--check { grid-column: span 6; }
}
@media (max-width: 620px) {
    .overview-hero { align-items: stretch; padding-top: 18px; }
    .overview-hero h1 { font-size: 42px; }
    .overview-subtitle { font-size: 12px; }
    .overview-period-signal { grid-template-columns: auto minmax(0,1fr); }
    .overview-period-signal__counts { grid-column: 1 / -1; }
    .home-metric-card--lead,.home-metric-card--orders,.home-metric-card--check,.home-metric-card--foodcost,.home-metric-card--labor,.home-metric-card--channels { grid-column: span 12; }
    .home-metric-card--lead { min-height: 300px; padding: 22px; }
    .home-metric-card--lead > strong { margin-top: 32px; font-size: 49px; }
    .home-metric-card--lead > .mini-sparkline { height: 92px; }
    .home-metric-card--lead > .mini-sparkline svg { height: 84px; }
    .home-metric-card { border-radius: 20px; }
}

/* Верхний уровень навигации как в продуктовых референсах. */
.v2-app-shell .app-header-main {
    display: grid;
    grid-template-columns: minmax(360px,1fr) auto auto;
    align-items: center;
    gap: 12px;
}
.app-domain-tabs {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    overflow-x: auto;
    border-radius: 13px;
    background: #ecece7;
    scrollbar-width: none;
}
.app-domain-tabs::-webkit-scrollbar { display: none; }
.app-domain-tabs button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    color: #676c66;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.navigation-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.app-domain-tabs button .navigation-icon { width: 15px; height: 15px; color: #7d827b; }
.app-domain-tabs button:hover { color: var(--ui-ink); background: rgba(255,255,255,.56); }
.app-domain-tabs button.is-active { color: #fff; background: #252925; box-shadow: 0 4px 12px rgba(23,26,23,.14); }
.app-domain-tabs button.is-active .navigation-icon { color: #fff; }
.v2-app-shell .app-header-context { width: auto; min-height: 0; margin-left: 0; padding: 0; border: 0; }
.v2-app-shell .app-header-account { margin-left: 0; }

/* Смысловая тревога локальна: большая карточка остаётся спокойной. */
.home-metric-card--lead,
.home-metric-card--lead.is-good,
.home-metric-card--lead.is-warning,
.home-metric-card--lead.is-risk { background: #252925; }
.home-metric-card--lead .home-metric-signal { color: rgba(255,255,255,.78) !important; }
.home-metric-card--lead.is-good .home-metric-signal { color: #75d3b1 !important; }
.home-metric-card--lead.is-warning .home-metric-signal { color: #efc86d !important; }
.home-metric-card--lead.is-risk .home-metric-signal { color: #ff9186 !important; }
.home-metric-card--lead .home-metric-signal::before { background: currentColor; }

@media (max-width: 1240px) {
    .v2-app-shell .app-header-main { grid-template-columns: minmax(250px,1fr) auto; }
    .v2-app-shell .app-header-context { grid-column: 1; grid-row: 2; }
    .v2-app-shell .app-header-account { grid-column: 2; grid-row: 1 / span 2; }
    .app-domain-tabs button { padding-inline: 9px; }
}
@media (max-width: 900px) {
    .app-domain-tabs { display: none; }
    .v2-app-shell .app-header-main { display: flex; }
    .v2-app-shell .app-header-context { width: 100%; order: 2; }
}

/* Основная навигация живёт в боковой панели; шапка отвечает только за контекст. */
.v2-app-shell .app-header-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.v2-app-shell .app-header-context { margin-left: auto; }
.v2-app-shell .app-header-account { flex: 0 0 auto; }

/* Палитра v6: единая лесная гамма, семантические цвета только для состояний. */
.app-sidebar { border-color: rgba(34,72,56,.14); background: rgba(249,251,249,.97); box-shadow: 0 20px 52px rgba(24,53,41,.10); }
.sidebar-brand-mark { border-color: var(--ui-primary-hover); background: var(--ui-primary); }
.sidebar-collapse-toggle:hover { color: var(--ui-primary); border-color: #91b6a4; }
.sidebar-search:focus-within { border-color: #86b09c; box-shadow: 0 0 0 3px rgba(23,107,78,.12); }
.sidebar-group > button,.sidebar-footer > button { color: #59665f; }
.sidebar-group > button.is-active { color: var(--ui-primary-hover); background: var(--ui-primary-soft); box-shadow: inset 3px 0 var(--ui-primary); }
.sidebar-item-icon { color: #68746d; background: #edf1ee; }
.primary-navigation.is-collapsed .sidebar-item-icon { color: #667269; }
.primary-navigation.is-collapsed .sidebar-group > button:hover .sidebar-item-icon { color: var(--ui-primary); background: var(--ui-primary-soft); }
.primary-navigation.is-collapsed .sidebar-group > button.is-active .sidebar-item-icon { background: var(--ui-primary); box-shadow: 0 8px 20px rgba(23,107,78,.24); }
.primary-navigation.is-collapsed .sidebar-footer .sidebar-assistant > span:first-child { background: #e4efe9; }
.v2-app-shell .app-shell-header { border-color: rgba(34,72,56,.12); background: rgba(249,251,249,.96); box-shadow: 0 10px 30px rgba(24,53,41,.055); }
.overview-ghost-button:hover { color: var(--ui-primary); border-color: #91b6a4; }
.home-metric-card { border-color: rgba(34,72,56,.11) !important; background: var(--ui-surface); box-shadow: 0 10px 30px rgba(24,53,41,.05); }
.home-metric-card:hover { border-color: rgba(23,107,78,.24) !important; box-shadow: 0 15px 38px rgba(24,53,41,.075); }
.home-metric-card--lead,.home-metric-card--lead.is-good,.home-metric-card--lead.is-warning,.home-metric-card--lead.is-risk { background: #193f33; }
.home-metric-card--lead > .mini-sparkline { color: #a8d6c1; }
.home-metric-card--lead.is-good .home-metric-signal { color: #8bd1b2 !important; }
.home-metric-card--lead.is-warning .home-metric-signal { color: #e3c47d !important; }
.home-metric-card--lead.is-risk .home-metric-signal { color: #f0a0a0 !important; }
.home-metric-card--channels { background: #d6e4dc; }

/* Закреплённые разделы: отдельная кнопка не вкладывается в ссылку маршрута. */
.sidebar-route-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr) 28px;
    align-items: center;
    gap: 2px;
}
.sidebar-route-link {
    min-width: 0;
    min-height: 39px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    color: #59665f;
    text-align: left;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 690;
}
.sidebar-route-link:hover { color: var(--ui-ink); background: var(--ui-surface-muted); }
.sidebar-route-link.is-active { color: var(--ui-primary-hover); background: var(--ui-primary-soft); box-shadow: inset 3px 0 var(--ui-primary); }
.sidebar-route-link.is-active .sidebar-item-icon { color: #fff; background: var(--ui-primary); }
.sidebar-pin-button,.mobile-pin-button {
    display: grid;
    place-items: center;
    color: var(--ui-subtle);
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}
.sidebar-pin-button { width: 28px; height: 30px; opacity: 0; transition: opacity .14s ease,color .14s ease,background-color .14s ease; }
.sidebar-route-row:hover .sidebar-pin-button,.sidebar-pin-button:focus-visible,.sidebar-pin-button.is-pinned { opacity: 1; }
.sidebar-pin-button:hover,.sidebar-pin-button.is-pinned,.mobile-pin-button.is-pinned { color: var(--ui-primary); background: var(--ui-primary-soft); }
.sidebar-pin-button:disabled,.mobile-pin-button:disabled { cursor: wait; opacity: .45; }
.primary-navigation.is-collapsed .sidebar-route-row { grid-template-columns: 1fr; }
.primary-navigation.is-collapsed .sidebar-route-link { justify-content: center; min-height: 42px; padding-inline: 0; border-radius: 13px; }
.primary-navigation.is-collapsed .sidebar-route-link:hover .sidebar-item-icon { color: var(--ui-primary); background: var(--ui-primary-soft); }
.primary-navigation.is-collapsed .sidebar-route-link.is-active { background: transparent; box-shadow: none; }
.primary-navigation.is-collapsed .sidebar-route-link.is-active .sidebar-item-icon { color: #fff; background: var(--ui-primary); box-shadow: 0 8px 20px rgba(23,107,78,.24); }
.mobile-route-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; }
.mobile-route-row .mobile-leaf { padding-left: 10px; }
.mobile-pin-button { width: 44px; height: 44px; }

@media (hover: none) {
    .sidebar-pin-button { opacity: 1; }
}

/* Компактная навигация по задачам: видна структура, открыт только текущий раздел. */
.sidebar-group-heading { display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: center; }
.sidebar-group-heading .sidebar-group-toggle { min-width: 0; }
.sidebar-group-chevron-button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ui-subtle); border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.sidebar-group-chevron-button:hover { color: var(--ui-ink); background: var(--ui-surface-muted); }
.sidebar-group-chevron-button:focus-visible { outline: 3px solid rgba(180,79,46,.22); outline-offset: 1px; }
.sidebar-group-toggle,
.sidebar-group-shortcut {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    color: #575d57;
    text-align: left;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.sidebar-group-toggle:hover,.sidebar-group-shortcut:hover { color: var(--ui-ink); background: var(--ui-surface-muted); }
.sidebar-group-toggle.is-overview-active { color: var(--ui-primary); background: var(--ui-primary-soft); }
.sidebar-group-toggle:focus-visible,.sidebar-group-shortcut:focus-visible { outline: 3px solid rgba(180,79,46,.22); outline-offset: 1px; }
.sidebar-group-label { flex: 1; min-width: 0; }
.sidebar-group-chevron { color: var(--ui-subtle); font-size: 15px; transition: transform .16s ease; }
.sidebar-group-chevron.is-open { transform: rotate(180deg); }
.sidebar-group-items { margin: 3px 0 0 14px; padding-left: 9px; border-left: 1px solid var(--ui-border); }
.sidebar-group-items .sidebar-item-icon { width: 24px; height: 24px; flex-basis: 24px; background: transparent; }
.sidebar-group-items .sidebar-route-link { min-height: 36px; padding-block: 4px; }
.sidebar-group--pinned { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--ui-border); }
.primary-navigation.is-collapsed .sidebar-group-shortcut { justify-content: center; padding-inline: 0; }
.primary-navigation.is-collapsed .sidebar-group-shortcut.is-active { background: transparent; }
.primary-navigation.is-collapsed .sidebar-group-shortcut.is-active .sidebar-item-icon { color: #fff; background: var(--ui-primary); box-shadow: 0 8px 20px rgba(23,107,78,.24); }
.home-metric-card--channels .home-metric-label b { color: #53655b; }
.home-channel-values > div { background: rgba(255,255,255,.56); }
.home-channel-values > div + div { background: #294e42; }
.money-pulse .money-pulse-primary,
.money-pulse .money-pulse-primary.is-good,
.money-pulse .money-pulse-primary.is-warning,
.money-pulse .money-pulse-primary.is-risk,
.money-pulse .money-pulse-primary.is-neutral {
    background: #24483c !important;
}

/* Ассистент продолжает визуальную систему v2, а не отдельную фиолетовую тему. */
.assistant-modal-backdrop {
    background: rgba(22,32,25,.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.assistant-modal-panel {
    border-color: rgba(255,255,255,.82);
    background: var(--ui-surface);
    box-shadow: 0 28px 74px rgba(24,53,41,.22);
}
.assistant-modal-control:hover {
    color: var(--ui-primary-hover);
    background: var(--ui-primary-soft);
}
.assistant-modal-control:focus-visible {
    outline: 3px solid rgba(23,107,78,.18);
    outline-offset: 1px;
}
.assistant-modal-panel.is-minimized {
    border-color: var(--ui-border-strong);
    background: rgba(251,252,251,.97);
    box-shadow: 0 18px 48px rgba(24,53,41,.18);
}
.assistant-mini-icon,
.assistant-brand-icon,
.assistant-empty-icon,
.assistant-message-avatar,
.assistant-send-button {
    background: var(--ui-primary);
    box-shadow: 0 8px 20px rgba(23,107,78,.22);
}
.assistant-mini-expand,
.assistant-brand-kicker { color: var(--ui-primary); }
.workspace-page--assistant .workspace-hero::before { background: var(--ui-primary); }
.assistant-suggestion {
    border: 1px solid var(--ui-border);
    background: rgba(251,252,251,.82);
}
.assistant-suggestion:hover,
.assistant-suggestion:focus-visible {
    border-color: #91b6a4;
    background: var(--ui-surface);
    box-shadow: 0 7px 20px rgba(24,53,41,.07);
    outline: none;
}
.assistant-suggestion > span,
.assistant-suggestion:hover > span { color: var(--ui-primary); }
.assistant-user-message { background: var(--ui-primary); box-shadow: 0 7px 18px rgba(23,107,78,.18); }
.assistant-composer { border-color: var(--ui-border-strong); background: var(--ui-surface); }
.assistant-composer:focus-within { border-color: #86b09c; box-shadow: 0 0 0 3px rgba(23,107,78,.11); }
.assistant-send-button:hover:not(:disabled) { background: var(--ui-primary-hover); }
.workspace-page--assistant .chat-markdown a,
.workspace-page--assistant .chat-markdown li::marker,
.workspace-page--assistant .chat-caret::after { color: var(--ui-primary); }
.workspace-page--assistant .chat-markdown code { color: var(--ui-primary-hover); background: var(--ui-primary-soft); }
.workspace-page--assistant .chat-markdown blockquote { border-left-color: var(--ui-accent); background: var(--ui-primary-soft); }

/* Центр уведомлений и короткие toast-сообщения используют те же поверхности и акцент. */
.notification-trigger {
    color: var(--ui-muted);
    border-color: var(--ui-border);
    background: var(--ui-surface);
}
.notification-trigger:hover,
.notification-trigger.is-open {
    color: var(--ui-primary-hover);
    border-color: #91b6a4;
    background: var(--ui-primary-soft);
}
.notification-trigger:focus-visible { outline-color: rgba(23,107,78,.22); }
.notification-trigger > span { background: var(--ui-primary); }
.notification-trigger > span.has-critical { background: var(--signal-risk); }
.notification-popover {
    border-color: var(--ui-border);
    background: rgba(251,252,251,.98);
    box-shadow: 0 24px 60px rgba(24,53,41,.18);
}
.notification-popover > header { border-bottom-color: var(--ui-border); }
.notification-popover > header small { color: var(--ui-primary); }
.notification-popover > header > span { color: var(--ui-primary-hover); background: var(--ui-primary-soft); }
.notification-popover > header > button { color: var(--ui-muted); background: var(--ui-surface-muted); }
.notification-popover > header > button:hover { color: var(--ui-primary-hover); background: var(--ui-primary-soft); }
.notification-list > button:hover,
.notification-list > button:focus-visible { background: var(--ui-surface-muted); }
.notification-list > button > b { color: var(--ui-primary); }
.notification-loader { border-color: var(--ui-primary-soft); border-top-color: var(--ui-primary); }
.notification-popover > footer { border-top-color: var(--ui-border); background: var(--ui-surface-muted); }

.toast {
    color: var(--ui-ink);
    border: 1px solid var(--ui-border);
    border-left: 4px solid var(--signal-neutral);
    background: rgba(251,252,251,.97);
    box-shadow: 0 14px 38px rgba(24,53,41,.16);
}
.toast.toast-success { border-left-color: var(--signal-good); background: rgba(251,252,251,.97); }
.toast.toast-error { border-left-color: var(--signal-risk); background: rgba(251,252,251,.97); }
.toast.toast-info { border-left-color: var(--ui-primary); background: rgba(251,252,251,.97); }
.toast.toast-warning { border-left-color: var(--signal-warning); background: rgba(251,252,251,.97); }

@media (max-width: 640px) {
    .assistant-modal-panel.is-minimized { border-color: var(--ui-border-strong); }
    #toast-container { right: 12px; bottom: 84px; left: 12px; }
    .toast { max-width: none; }
}

/* ── Главная v2: плотный персональный управленческий дашборд ── */
.home-dashboard { padding-top: 2px; }
.home-dashboard-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 0 14px;
}
.home-dashboard-heading { min-width: 0; }
.home-dashboard-heading h1 {
    margin: 3px 0 0;
    color: var(--ui-ink);
    font-size: clamp(25px,2.4vw,34px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.035em;
}
.home-dashboard-heading > p { margin-top: 5px; color: var(--ui-muted); font-size: 12px; }
.home-dashboard-kicker-row { display: flex; align-items: center; gap: 8px; color: var(--ui-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.home-dashboard-health,.home-dashboard-source-warning { min-height: 22px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.home-dashboard-health { color: var(--signal-neutral); background: var(--signal-neutral-bg); }
.home-dashboard-health i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.home-dashboard-health.is-good { color: var(--signal-good); background: var(--signal-good-bg); }
.home-dashboard-health.is-warning { color: var(--signal-warning); background: var(--signal-warning-bg); }
.home-dashboard-health.is-risk { color: var(--signal-risk); background: var(--signal-risk-bg); }
.home-dashboard-source-warning { color: var(--signal-risk); background: var(--signal-risk-bg); }
.home-dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.dashboard-icon-button,.dashboard-secondary-button,.dashboard-primary-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease;
}
.dashboard-icon-button { width: 38px; padding: 0; color: var(--ui-muted); background: var(--ui-surface); font-size: 18px; }
.dashboard-secondary-button { color: var(--ui-ink); background: var(--ui-surface); }
.dashboard-secondary-button--quiet { color: var(--ui-muted); border-color: transparent; background: transparent; }
.dashboard-primary-button { color: #fff; border-color: var(--ui-primary); background: var(--ui-primary); box-shadow: 0 7px 16px rgba(23,107,78,.18); }
.dashboard-icon-button:hover,.dashboard-secondary-button:hover { color: var(--ui-primary); border-color: #91b6a4; background: var(--ui-primary-soft); }
.dashboard-primary-button:hover { background: var(--ui-primary-hover); }
.dashboard-icon-button:disabled,.dashboard-secondary-button:disabled,.dashboard-primary-button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.dashboard-icon-button:focus-visible,.dashboard-secondary-button:focus-visible,.dashboard-primary-button:focus-visible { outline: 3px solid rgba(23,107,78,.20); outline-offset: 2px; }
.dashboard-icon-button .is-spinning { animation: dashboard-spin .75s linear infinite; }
@keyframes dashboard-spin { to { transform: rotate(360deg); } }

.home-dashboard-edit-note {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 7px 11px;
    color: var(--ui-muted);
    border: 1px dashed #a9c4b6;
    border-radius: 10px;
    background: var(--ui-primary-soft);
    font-size: 12px;
    flex-wrap: wrap;
}
.home-dashboard-edit-note span { color: var(--ui-primary); font-weight: 700; }
.home-dashboard-edit-note b { color: var(--ui-primary); font-size: 15px; letter-spacing: -4px; }
.home-dashboard-edit-note > div { min-width: 250px; display: flex; flex: 1 1 320px; align-items: center; gap: 7px; }
.home-dashboard-density {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
}
.home-dashboard-density legend { margin-right: 5px; color: #526159; font-size: 12px; font-weight: 700; }
.home-dashboard-density button {
    min-height: 28px;
    padding: 0 9px;
    color: #526159;
    border: 1px solid #c8d8d0;
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    cursor: pointer;
    font-size: 12px;
    font-weight: 680;
}
.home-dashboard-density button:hover,
.home-dashboard-density button.is-active { color: #fff; border-color: var(--ui-primary); background: var(--ui-primary); }
.home-dashboard-density button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: 1px; }
.home-dashboard-columns { flex: 1 1 430px; justify-content: flex-end; }
.home-widget-menu-hint { margin: 0 0 7px; color: var(--ui-muted); font-size: 12px; line-height: 1.35; }

.section-dashboard-tabs {
    display: flex;
    gap: 4px;
    margin: -2px 0 12px;
    padding-bottom: 6px;
    overflow-x: auto;
    border-bottom: 1px solid var(--ui-border);
    scrollbar-width: thin;
}
.section-dashboard-tabs button {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 12px;
    color: var(--ui-muted);
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.section-dashboard-tabs button:hover { color: var(--ui-primary); }
.section-dashboard-tabs button.is-active { color: var(--ui-primary); border-bottom-color: var(--ui-primary); }
.section-dashboard-tabs button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: -3px; border-radius: 8px; }

.home-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12,minmax(0,1fr));
    grid-auto-flow: row;
    grid-auto-rows: 112px;
    gap: 8px;
}
.home-dashboard-widget {
    position: relative;
    min-width: 0;
    grid-column: span var(--widget-cols,3);
    grid-row: span 1;
    border-radius: 13px;
    transition: opacity .14s ease,transform .14s ease,box-shadow .14s ease;
}
.home-dashboard-widget.is-rows-2 { grid-row: span 2; }
.home-dashboard-widget.is-rows-3 { grid-row: span 3; }
.home-dashboard-widget.is-menu-open { z-index: 35; }
.home-dashboard-widget.is-editing { outline: 1px dashed #91b6a4; outline-offset: 2px; }
.home-dashboard-widget.is-dragging { opacity: .34; transform: scale(.985); }
.home-dashboard-widget.is-drop-target { z-index: 24; }
.home-dashboard-widget.is-drop-target::before {
    content: '';
    position: absolute;
    z-index: 30;
    border-radius: 999px;
    background: var(--ui-primary);
    box-shadow: 0 0 0 4px rgba(23,107,78,.13);
    pointer-events: none;
}
.home-dashboard-widget.is-drop-left::before,
.home-dashboard-widget.is-drop-right::before { top: -5px; bottom: -5px; width: 4px; }
.home-dashboard-widget.is-drop-left::before { left: -6px; }
.home-dashboard-widget.is-drop-right::before { right: -6px; }
.home-dashboard-widget.is-drop-top::before,
.home-dashboard-widget.is-drop-bottom::before { left: -5px; right: -5px; height: 4px; }
.home-dashboard-widget.is-drop-top::before { top: -6px; }
.home-dashboard-widget.is-drop-bottom::before { bottom: -6px; }
.home-widget-drag-preview {
    position: fixed !important;
    left: -10000px !important;
    top: -10000px !important;
    width: 320px !important;
    height: 120px !important;
    z-index: -1 !important;
    overflow: hidden;
    opacity: .92;
    transform: rotate(1deg);
    box-shadow: 0 18px 45px rgba(24,53,41,.22);
    pointer-events: none;
}
.home-dashboard-card {
    width: 100%;
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 11px 12px 9px;
    color: var(--ui-ink);
    text-align: left;
    border: 1px solid #dfe5e1;
    border-radius: 12px;
    background: var(--ui-surface);
    box-shadow: 0 2px 10px rgba(24,53,41,.035);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.home-dashboard-card:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(23,107,78,.32); box-shadow: 0 10px 25px rgba(24,53,41,.08); }
.home-dashboard-card:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: 2px; }
.home-dashboard-card:disabled { color: inherit; cursor: default; opacity: 1; }
.home-dashboard-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-dashboard-card > header span { min-width: 0; overflow: hidden; color: #263a31; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-dashboard-card > header i { color: var(--ui-subtle); font-size: 12px; font-style: normal; opacity: 0; transition: opacity .15s ease; }
.home-dashboard-card:hover > header i { opacity: 1; }
.home-dashboard-card:not(.is-metric).is-risk { border-top: 3px solid var(--signal-risk); padding-top: 11px; }
.home-dashboard-card:not(.is-metric).is-warning { border-top: 3px solid var(--signal-warning); padding-top: 11px; }
.home-dashboard-card:not(.is-metric).is-good { border-top: 3px solid var(--signal-good); padding-top: 11px; }
.home-widget-value {
    margin-top: 11px;
    overflow: hidden;
    color: var(--ui-ink);
    font-size: clamp(23px,2.25vw,34px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.home-dashboard-widget.is-rows-1 .home-widget-value {
    flex: 0 0 auto;
    margin-top: 6px;
    font-size: clamp(21px,1.75vw,26px);
}
.home-widget-metric-layout {
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) auto;
    align-items: center;
    gap: 11px;
}
.home-widget-metric-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--ui-primary);
    border-radius: 12px;
    background: #f0f5f2;
}
.home-widget-metric-icon .navigation-icon { width: 22px; height: 22px; flex-basis: 22px; }
.home-widget-metric-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.home-widget-metric-label { max-width: 100%; overflow: hidden; color: #34443b; font-size: 12px; font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.home-widget-metric-copy .home-widget-value { max-width: 100%; margin: 3px 0 4px; font-size: clamp(21px,1.65vw,26px); font-weight: 690; line-height: 1; }
.home-widget-metric-copy .home-widget-tone { max-width: 100%; color: var(--ui-muted); font-size: 12px; line-height: 1.4; white-space: normal; }
.home-widget-metric-copy .home-widget-secondary { max-width: 100%; margin-bottom: 3px; color: #52625a; font-size: 12px; line-height: 1.3; white-space: normal; }
/* Две базы ФОТ и статус сверки должны оставаться видны в узкой карточке. */
@container (max-width: 180px) {
    .home-dashboard .is-widget-labor .home-dashboard-card { padding: 8px 10px !important; }
    .is-widget-labor .home-widget-metric-copy .home-widget-metric-label { line-height: 1.2; }
    .is-widget-labor .home-widget-metric-copy .home-widget-value { margin: 3px 0; }
    .is-widget-labor .home-widget-metric-copy .home-widget-secondary { margin-bottom: 2px; }
    .is-widget-labor .home-widget-metric-copy .home-widget-tone { line-height: 1.2; }
}
.home-widget-metric-spark { width: 62px; height: 27px; min-height: 27px; display: block; flex: 0 0 62px; margin: 0; opacity: .38; }
.home-widget-metric-spark svg { height: 24px; }
.home-widget-metric-spark > span { display: none; }
.home-dashboard-card.is-good .home-widget-metric-icon { color: var(--signal-good); background: var(--signal-good-bg); }
.home-dashboard-card.is-warning .home-widget-metric-icon { color: var(--signal-warning); background: var(--signal-warning-bg); }
.home-dashboard-card.is-risk .home-widget-metric-icon { color: var(--signal-risk); background: var(--signal-risk-bg); }
.home-dashboard-card.is-good .home-widget-value { color: var(--signal-good); }
.home-dashboard-card.is-risk .home-widget-value { color: var(--signal-risk); }
.home-dashboard-card.is-warning .home-widget-value { color: var(--signal-warning); }
.home-dashboard-card > .mini-sparkline { flex: 1; min-height: 42px; margin: 8px 0 2px; color: var(--ui-primary); }
.home-dashboard-widget.is-rows-1 .home-dashboard-card > .mini-sparkline { height: 22px; min-height: 22px; flex: 0 0 22px; margin: 5px 0 1px; }
.home-dashboard-widget.is-rows-1 .home-dashboard-card > .mini-sparkline svg { height: 20px; }
.home-dashboard-widget.is-rows-1 .home-dashboard-card > .mini-sparkline > span { display: none; }
.home-dashboard-card > footer { min-height: 16px; display: flex; align-items: flex-end; margin-top: auto; color: var(--ui-muted); font-size: 12px; line-height: 1.25; }
.home-widget-tone { display: flex; align-items: center; gap: 5px; }
.home-widget-tone i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--signal-neutral); }
.home-dashboard-card.is-good .home-widget-tone { color: var(--signal-good); }
.home-dashboard-card.is-good .home-widget-tone i { background: var(--signal-good); }
.home-dashboard-card.is-warning .home-widget-tone { color: var(--signal-warning); }
.home-dashboard-card.is-warning .home-widget-tone i { background: var(--signal-warning); }
.home-dashboard-card.is-risk .home-widget-tone { color: var(--signal-risk); }
.home-dashboard-card.is-risk .home-widget-tone i { background: var(--signal-risk); }

.home-widget-summary { display: grid; grid-template-columns: repeat(var(--summary-cols,2),minmax(0,1fr)); gap: 0 14px; margin-top: 8px; }
.home-widget-summary > div { min-width: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 24px; border-bottom: 1px solid #edf0ee; }
.home-widget-summary > div span { min-width: 0; overflow: hidden; color: var(--ui-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.home-widget-summary > div strong { min-width: 0; max-width: 100%; overflow: hidden; color: var(--ui-ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-widget-summary > div.is-risk strong { color: var(--signal-risk); }
.home-dashboard-widget.is-rows-1 .home-widget-summary { grid-template-columns: repeat(var(--summary-cols,2),minmax(0,1fr)); margin-top: 4px; }

.home-widget-skeleton { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.home-widget-skeleton span { height: 9px; border-radius: 6px; background: linear-gradient(90deg,#edf1ee 20%,#f7f9f8 50%,#edf1ee 80%); background-size: 220% 100%; animation: overview-shimmer 1.25s linear infinite; }
.home-widget-skeleton span:first-child { width: 64%; height: 27px; }
.home-widget-skeleton span:last-child { width: 82%; }
.home-widget-error { display: flex; flex-direction: column; gap: 4px; margin: auto 0; color: var(--signal-risk); }
.home-widget-error strong { font-size: 13px; }
.home-widget-error span { display: -webkit-box; overflow: hidden; color: var(--ui-muted); font-size: 12px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.chart-widget-canvas { position: relative; height: 240px; min-height: 0; }
.home-dashboard-chart,.home-dashboard-chart > .chart-widget { width: 100%; height: 100%; min-height: 0; }
.chart-widget--fill { display: flex; flex-direction: column; padding: 13px 14px 11px !important; border: 1px solid rgba(34,72,56,.12); border-radius: 13px; box-shadow: 0 5px 18px rgba(24,53,41,.045); }
.chart-widget--fill > h3 { margin: 0 0 8px; color: #34443b; font-size: 12px; letter-spacing: 0; text-transform: none; }
.chart-widget--fill .chart-widget-canvas { flex: 1; height: auto; min-height: 0; }
.home-dashboard-widget.is-rows-1 .chart-widget--fill .chart-widget-canvas { min-height: 76px; }

.home-widget-controls { position: absolute; inset: 7px 7px auto auto; z-index: 20; display: flex; align-items: center; gap: 4px; pointer-events: none; }
.home-widget-controls > button,.home-widget-menu-toggle { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; color: var(--ui-muted); border: 1px solid var(--ui-border); border-radius: 8px; background: rgba(251,252,251,.96); box-shadow: 0 3px 9px rgba(24,53,41,.09); cursor: pointer; pointer-events: auto; font-size: 12px; font-weight: 700; }
.home-widget-controls > button:hover,.home-widget-menu-toggle:hover,.home-widget-menu-toggle[aria-expanded="true"] { color: var(--ui-primary); border-color: #91b6a4; background: var(--ui-primary-soft); }
.home-widget-controls button:focus-visible { outline: 3px solid rgba(23,107,78,.20); outline-offset: 1px; }
.home-widget-drag { cursor: grab !important; font-size: 17px !important; }
.home-widget-drag:active { cursor: grabbing !important; }
.home-widget-menu-wrap { position: relative; pointer-events: auto; }
.home-widget-menu-toggle { letter-spacing: 1px; line-height: 1; }
.home-widget-menu {
    position: absolute;
    top: 35px;
    right: 0;
    z-index: 40;
    width: 238px;
    padding: 12px;
    color: var(--ui-ink);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: var(--ui-surface);
    box-shadow: 0 18px 44px rgba(24,53,41,.20);
}
.home-widget-menu > strong { display: block; padding-right: 4px; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-widget-menu > label { display: block; margin: 11px 0 5px; color: var(--ui-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.home-widget-size-options { display: flex; gap: 4px; }
.home-widget-size-options button,.home-widget-menu-actions button,.home-widget-remove-action {
    min-width: 0;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: var(--ui-muted);
    border: 1px solid var(--ui-border);
    border-radius: 8px;
    background: var(--ui-surface);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.home-widget-size-options button { flex: 1; }
.home-widget-size-options button.is-active { color: #fff; border-color: var(--ui-primary); background: var(--ui-primary); }
.home-widget-size-options button:disabled { cursor: not-allowed; opacity: .3; }
.home-widget-size-options button:hover:not(.is-active),.home-widget-menu-actions button:hover:not(:disabled) { color: var(--ui-primary); border-color: #91b6a4; background: var(--ui-primary-soft); }
.home-widget-menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ui-border); }
.home-widget-menu-actions button:disabled { cursor: not-allowed; opacity: .35; }
.home-widget-remove-action { width: 100%; margin-top: 6px; color: var(--signal-risk); border-color: transparent; background: transparent; }
.home-widget-remove-action:hover { border-color: var(--signal-risk-border); background: var(--signal-risk-bg); }
.home-dashboard-widget.is-editing .home-dashboard-card > header,.home-dashboard-widget.is-editing .chart-widget--fill > h3 { padding-right: 66px; }

.home-dashboard-loading { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.home-dashboard-loading span { height: 126px; border: 1px solid var(--ui-border); border-radius: 13px; background: linear-gradient(90deg,#edf1ee 20%,#f8faf9 50%,#edf1ee 80%); background-size: 220% 100%; animation: overview-shimmer 1.25s linear infinite; }
.home-dashboard-empty { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ui-muted); border: 1px dashed var(--ui-border-strong); border-radius: 16px; background: rgba(251,252,251,.65); text-align: center; }
.home-dashboard-empty strong { color: var(--ui-ink); font-size: 17px; }
.home-dashboard-empty span { font-size: 12px; }
.home-dashboard-empty div { display: flex; gap: 8px; margin-top: 8px; }

.home-catalog-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; padding: 14px; background: rgba(22,32,25,.42); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.home-catalog { width: min(440px,100%); height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.78); border-radius: 18px; background: var(--ui-surface); box-shadow: 0 28px 72px rgba(24,53,41,.25); }
.home-catalog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 13px; }
.home-catalog > header span { color: var(--ui-primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.home-catalog > header h2 { margin-top: 2px; color: var(--ui-ink); font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.home-catalog > header > button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ui-muted); border: 0; border-radius: 10px; background: var(--ui-surface-muted); cursor: pointer; font-size: 22px; }
.home-catalog > header > button:hover { color: var(--ui-primary); background: var(--ui-primary-soft); }
.home-catalog-search { padding: 0 18px 12px; }
.home-catalog-search input { width: 100%; min-height: 43px; padding: 0 13px; color: var(--ui-ink); border: 1px solid var(--ui-border); border-radius: 11px; background: var(--ui-surface-muted); font-size: 12px; outline: none; }
.home-catalog-search input:focus { border-color: #86b09c; box-shadow: 0 0 0 3px rgba(23,107,78,.12); }
.home-catalog-groups { flex: 1; overflow-y: auto; padding: 0 18px 18px; }
.home-catalog-groups > section + section { margin-top: 16px; }
.home-catalog-groups h3 { margin-bottom: 6px; color: var(--ui-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.home-catalog-groups section > div { display: grid; grid-template-columns: 1fr; gap: 6px; }
.home-catalog-groups section button { min-width: 0; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; color: var(--ui-ink); text-align: left; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface); cursor: pointer; }
.home-catalog-groups section button:hover:not(:disabled) { color: var(--ui-primary); border-color: #91b6a4; background: var(--ui-primary-soft); }
.home-catalog-groups section button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: 1px; }
.home-catalog-groups section button:disabled { cursor: default; opacity: .72; background: var(--ui-surface-muted); }
.home-catalog-groups section button > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-catalog-groups section button b { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-catalog-groups section button small { display: flex; align-items: center; gap: 6px; color: var(--ui-muted); font-size: 12px; }
.home-catalog-groups section button small em { padding: 2px 5px; color: var(--ui-muted); border-radius: 999px; background: var(--ui-surface-muted); font-size: 12px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.home-catalog-groups section button small em.is-key { color: var(--ui-primary); background: var(--ui-primary-soft); }
.home-catalog-groups section button small em.is-control { color: var(--signal-warning); background: var(--signal-warning-bg); }
.home-catalog-purpose { display: -webkit-box; overflow: hidden; color: var(--ui-muted); font-size: 12px; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-catalog-groups section button i { flex: 0 0 auto; color: var(--ui-primary); font-size: 12px; font-style: normal; font-weight: 700; }
.home-catalog-empty { padding: 40px 0; color: var(--ui-muted); text-align: center; font-size: 12px; }

@media (max-width: 1180px) {
    .home-dashboard-grid { grid-auto-rows: 112px; }
}
@media (max-width: 900px) {
    .home-dashboard-header { align-items: flex-start; }
    .home-dashboard-widget { grid-column: span 6; }
    .home-dashboard-widget:has(.home-dashboard-chart) { grid-column: span 12; }
    .home-dashboard-loading { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .home-dashboard { padding-inline: 12px !important; }
    .home-dashboard-header { flex-direction: column; gap: 12px; padding: 7px 0 12px; }
    .home-dashboard-actions { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
    .dashboard-icon-button,.dashboard-secondary-button,.dashboard-primary-button { min-height: 44px; flex: 0 0 auto; }
    .dashboard-icon-button { width: 44px; }
    .home-dashboard-kicker-row { flex-wrap: wrap; }
    .home-dashboard-heading > p { display: none; }
    .section-dashboard-tabs { margin-inline: -2px; }
    .section-dashboard-tabs button { min-height: 44px; padding-inline: 10px; }
    .home-dashboard-edit-note { align-items: flex-start; line-height: 1.4; }
    .home-dashboard-grid { grid-auto-rows: 112px; gap: 8px; }
    .home-dashboard-widget { grid-column: span 12; }
    .home-dashboard-widget.is-rows-3 { grid-row: span 2; }
    .home-widget-controls { inset: 6px 6px auto auto; }
    .home-widget-controls > button,.home-widget-menu-toggle { width: 38px; height: 38px; }
    .home-widget-menu { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; }
    .home-dashboard-loading { grid-template-columns: 1fr; }
    .home-catalog-backdrop { align-items: flex-end; padding: 0; }
    .home-catalog { height: min(88vh,720px); border-radius: 18px 18px 0 0; }
    .home-catalog-groups section > div { grid-template-columns: 1fr; }
    .home-catalog-groups section button { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-dashboard-widget,.home-dashboard-card,.dashboard-icon-button .is-spinning { animation: none; transition: none; }
}

/* Контекстный вход в ИИ: один понятный сценарий вместо отдельной декоративной кнопки. */
.app-assistant-command {
    min-width: 220px;
    max-width: 440px;
    min-height: 42px;
    display: flex;
    flex: 1 1 320px;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    overflow: hidden;
    color: var(--ui-muted);
    text-align: left;
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    background: var(--ui-surface);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(24,53,41,.035);
}
.app-assistant-command > span:first-child { color: var(--ui-primary); font-size: 20px; line-height: 1; }
.app-assistant-command > span:nth-child(2) { min-width: 0; flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.app-assistant-command > b { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 8px; background: var(--ui-primary); font-size: 12px; }
.app-assistant-command:hover { color: var(--ui-ink); border-color: #91b6a4; background: var(--ui-primary-soft); }
.app-assistant-command:focus-visible { outline: 3px solid rgba(23,107,78,.20); outline-offset: 2px; }

/* Приоритеты дополняют персональные виджеты, не заменяя и не перестраивая их. */
.home-attention {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(34,72,56,.13);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 6px 20px rgba(24,53,41,.045);
}
.home-attention > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.home-attention > header span { color: var(--ui-primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.home-attention > header h2 { margin-top: 2px; color: var(--ui-ink); font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.home-attention > header > small { color: var(--ui-muted); font-size: 12px; }
.home-attention-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.home-attention-list > button {
    min-width: 0;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 11px 12px;
    color: var(--ui-ink);
    text-align: left;
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    background: var(--ui-surface-muted);
    cursor: pointer;
    transition: border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.home-attention-list > button:hover { transform: translateY(-1px); border-color: #91b6a4; box-shadow: 0 8px 20px rgba(24,53,41,.07); }
.home-attention-list > button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: 2px; }
.home-attention-list > button.is-risk { border-color: var(--signal-risk-border); background: var(--signal-risk-bg); }
.home-attention-list > button.is-warning { border-color: var(--signal-warning-border); background: var(--signal-warning-bg); }
.home-attention-status { display: inline-flex; align-items: center; gap: 5px; color: var(--signal-neutral); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.home-attention-status i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.home-attention-list > button.is-risk .home-attention-status { color: var(--signal-risk); }
.home-attention-list > button.is-warning .home-attention-status { color: var(--signal-warning); }
.home-attention-list > button > strong { margin-top: 8px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.home-attention-list > button > small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--ui-muted); font-size: 12px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-attention-list > button > b { margin-top: auto; padding-top: 8px; color: var(--ui-primary); font-size: 12px; font-weight: 700; }
.home-attention-ok { min-height: 68px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; color: var(--signal-good); border-radius: 11px; background: var(--signal-good-bg); }
.home-attention-ok > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--signal-good-border); border-radius: 50%; font-size: 15px; }
.home-attention-ok strong,.home-attention-ok small { display: block; }
.home-attention-ok strong { font-size: 12px; }
.home-attention-ok small { margin-top: 3px; color: var(--ui-muted); font-size: 12px; }
.home-attention-loading { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.home-attention-loading span { height: 68px; border-radius: 11px; background: linear-gradient(90deg,#edf1ee 20%,#f7f9f8 50%,#edf1ee 80%); background-size: 220% 100%; animation: overview-shimmer 1.25s linear infinite; }

.home-ai-prompts { margin-top: 12px; padding: 13px 14px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); }
.home-ai-prompts > header { display: flex; align-items: center; gap: 9px; }
.home-ai-prompts > header > span { width: 31px; height: 31px; display: grid; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 9px; background: var(--ui-primary); }
.home-ai-prompts h2 { color: var(--ui-ink); font-size: 12px; font-weight: 700; }
.home-ai-prompts header small { display: block; margin-top: 2px; color: var(--ui-muted); font-size: 12px; }
.home-ai-prompts > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.home-ai-prompts > div button { min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; color: var(--ui-ink); text-align: left; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface-muted); cursor: pointer; font-size: 12px; font-weight: 690; }
.home-ai-prompts > div button:hover { color: var(--ui-primary); border-color: #91b6a4; background: var(--ui-primary-soft); }
.home-ai-prompts > div button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: 2px; }
.home-ai-prompts > div button b { color: var(--ui-primary); }

/* На широком экране ассистент работает как рабочая боковая панель. */
@media (min-width: 901px) {
    body.assistant-modal-open { overflow: auto; }
    .assistant-modal-backdrop {
        align-items: stretch;
        justify-content: flex-end;
        padding: 12px;
        background: rgba(22,32,25,.08);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        pointer-events: none;
    }
    .assistant-modal-panel {
        width: min(470px,calc(100vw - 36px));
        height: calc(100vh - 24px);
        border-color: var(--ui-border-strong);
        border-radius: 18px;
        box-shadow: -16px 0 52px rgba(24,53,41,.16);
        pointer-events: auto;
    }
}

@media (max-width: 1180px) {
    .app-assistant-command { max-width: 320px; flex-basis: 240px; }
    .home-attention-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .app-assistant-command { display: none; }
    .home-attention-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .home-attention { padding: 12px; }
    .home-attention > header { align-items: flex-start; flex-direction: column; gap: 4px; }
    .home-attention-list { grid-template-columns: 1fr; }
    .home-attention-loading { grid-template-columns: 1fr; }
    .home-attention-list > button { min-height: 116px; }
    .home-ai-prompts > div { grid-template-columns: 1fr; }
    .home-ai-prompts > div button { min-height: 48px; }
}

/* Оценки отзывов: единый блок для страницы и виджета главной. */
.review-ratings-overview {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 0;
    padding: 15px 17px;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 6px 20px rgba(24,53,41,.045);
}
.review-rating-column { min-width: 0; padding-right: 20px; }
.review-platform-column { padding-right: 0; padding-left: 20px; border-left: 1px solid var(--ui-border); }
.review-rating-column > header { min-height: 38px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.review-rating-column > header > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.review-rating-column > header span { color: var(--ui-ink); font-size: 12px; font-weight: 700; }
.review-rating-column > header strong { flex-shrink: 0; color: var(--ui-primary); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-rating-column > header strong small { color: var(--ui-muted); font-size: 12px; font-weight: 650; }
.review-rating-column > header > small { color: var(--ui-muted); font-size: 12px; white-space: nowrap; }
.review-rating-bars { display: flex; flex-direction: column; gap: 7px; }
.review-rating-row,.review-platform-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(60px,1fr) 42px; align-items: center; gap: 9px; min-height: 20px; }
.review-rating-row > span,.review-platform-row > span { overflow: hidden; color: var(--ui-muted); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.review-rating-row > span i { margin-left: 2px; color: #d6a12a; font-style: normal; }
.review-rating-row > div,.review-platform-row > div { height: 7px; overflow: hidden; border-radius: 999px; background: #edf1ee; }
.review-rating-row > div b,.review-platform-row > div b { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--ui-primary); }
.review-rating-row:nth-child(2) > div b { background: #62a886; }
.review-rating-row:nth-child(3) > div b { background: #d4a248; }
.review-rating-row:nth-child(4) > div b,.review-rating-row:nth-child(5) > div b { background: #c65e58; }
.review-rating-row > strong,.review-platform-row > strong { color: var(--ui-ink); text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-platform-row { grid-template-columns: minmax(76px,148px) minmax(50px,1fr) 68px; }
.review-platform-row > strong small { color: var(--ui-muted); font-size: 12px; font-weight: 600; }
.review-rating-column > footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 7px; color: var(--ui-muted); border-top: 1px solid #edf0ee; font-size: 12px; }
.review-rating-column > footer strong { color: var(--ui-ink); }

/* На телефоне текст отзыва и действия доступны без прокрутки таблицы. */
.reviews-mobile-list { display: none; }
@media (max-width: 720px) {
    .reviews-desktop-table { display: none; }
    .reviews-mobile-list { display: grid; }
    .reviews-mobile-card { padding: 16px; border-bottom: 1px solid var(--ui-border); background: var(--ui-surface); }
    .reviews-mobile-card:last-child { border-bottom: 0; }
    .reviews-mobile-card__top,.reviews-mobile-card__followup { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
    .reviews-mobile-card__index { margin-right: auto; color: var(--ui-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
    .reviews-mobile-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 12px; }
    .reviews-mobile-card__meta > div { min-width: 0; }
    .reviews-mobile-card__meta dt,.reviews-mobile-card__label { color: var(--ui-muted); font-size: 12px; font-weight: 500; }
    .reviews-mobile-card__meta dd { margin-top: 2px; overflow-wrap: anywhere; color: var(--ui-ink); font-size: 13px; }
    .reviews-mobile-card__text { margin-top: 14px; color: var(--ui-ink); font-size: 14px; line-height: 1.55; }
    .reviews-mobile-card__text > .reviews-mobile-card__label { margin-bottom: 4px; }
    .reviews-mobile-card__followup { justify-content: space-between; margin-top: 14px; border-top: 1px solid var(--ui-border); padding-top: 12px; }
    .reviews-mobile-card button { min-height: 44px; }
}

.review-ratings-overview.is-embedded { width: 100%; flex: 1; padding: 4px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.review-ratings-overview.is-compact .review-rating-column { padding-right: 11px; }
.review-ratings-overview.is-compact .review-platform-column { padding-right: 0; padding-left: 11px; }
.review-ratings-overview.is-compact .review-rating-column > header { min-height: 28px; margin-bottom: 4px; }
.review-ratings-overview.is-compact .review-rating-column > header span { font-size: 12px; }
.review-ratings-overview.is-compact .review-rating-column > header strong { font-size: 15px; }
.review-ratings-overview.is-compact .review-rating-column > header > small { display: none; }
.review-ratings-overview.is-compact .review-rating-bars { gap: 4px; }
.review-ratings-overview.is-compact .review-rating-row,.review-ratings-overview.is-compact .review-platform-row { min-height: 15px; gap: 5px; }
.review-ratings-overview.is-compact .review-rating-row { grid-template-columns: 28px minmax(32px,1fr) 28px; }
.review-ratings-overview.is-compact .review-platform-row { grid-template-columns: minmax(52px,80px) minmax(28px,1fr) 48px; }
.review-ratings-overview.is-compact .review-rating-row > span,.review-ratings-overview.is-compact .review-platform-row > span { font-size: 12px; }
.review-ratings-overview.is-compact .review-rating-row > strong,.review-ratings-overview.is-compact .review-platform-row > strong { font-size: 12px; }
.review-ratings-overview.is-compact .review-rating-row > div,.review-ratings-overview.is-compact .review-platform-row > div { height: 5px; }
.review-ratings-overview.is-compact .review-rating-column > footer { margin-top: 4px; padding-top: 4px; font-size: 12px; }

@media (max-width: 720px) {
    .reviews-workspace > .review-ratings-overview:not(.is-compact) { grid-template-columns: 1fr; gap: 14px; }
    .reviews-workspace .review-rating-column > header { flex-wrap: wrap; gap: 6px; }
    .reviews-workspace .review-rating-column > header > div { flex: 1 1 100%; }
    .reviews-workspace .review-rating-column > header strong { margin-left: auto; }
    .reviews-workspace > .review-ratings-overview:not(.is-compact) .review-rating-column { padding-right: 0; }
    .reviews-workspace > .review-ratings-overview:not(.is-compact) .review-platform-column { padding-top: 14px; padding-left: 0; border-top: 1px solid var(--ui-border); border-left: 0; }
}

/* Общий каркас заголовков рабочих страниц. */
.workspace-page-header {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 17px 18px;
    border: 1px solid rgba(34,72,56,.13);
    border-radius: 16px;
    background: var(--ui-surface);
    box-shadow: 0 6px 20px rgba(24,53,41,.045);
}
.workspace-page-header__copy { min-width: 0; }
.workspace-page-header__eyebrow { margin-bottom: 4px; color: var(--ui-primary); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.workspace-page-header h1 { margin: 0; color: var(--ui-ink); font-size: clamp(25px,2.35vw,32px); font-weight: 700; line-height: 1.06; letter-spacing: -.035em; outline: none; }
.workspace-page-header__description { max-width: 760px; margin-top: 5px; color: var(--ui-muted); font-size: 12px; line-height: 1.45; }
.workspace-page-header__side { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.workspace-page-header__meta { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.workspace-page-header__period,.workspace-page-header__status { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-muted); background: var(--ui-surface-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.workspace-page-header__status i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.workspace-page-header__status.is-ready { color: var(--signal-good); border-color: var(--signal-good-border); background: var(--signal-good-bg); }
.workspace-page-header__status.is-loading { color: var(--signal-neutral); border-color: var(--signal-neutral-border); background: var(--signal-neutral-bg); }
.workspace-page-header__status.is-error { color: var(--signal-risk); border-color: var(--signal-risk-border); background: var(--signal-risk-bg); }
.workspace-page-header__reload { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--ui-ink); border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface); cursor: pointer; font-size: 12px; font-weight: 700; }
.workspace-page-header__reload:hover { color: var(--ui-primary); border-color: #91b6a4; background: var(--ui-primary-soft); }
.workspace-page-header__reload:focus-visible { outline: 3px solid rgba(23,107,78,.2); outline-offset: 2px; }
.workspace-page-header__reload:disabled { cursor: wait; opacity: .55; }
.workspace-page-header__reload .is-spinning { animation: dashboard-spin .75s linear infinite; }

/* Полный каталог инструментов: редкие задачи остаются обнаруживаемыми. */
.all-sections-workspace { padding-top: 2px; }
.all-sections-search { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--ui-border); border-radius: 13px; background: var(--ui-surface); }
.all-sections-search > label { min-width: 0; max-width: 680px; min-height: 42px; display: flex; flex: 1; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface-muted); }
.all-sections-search > label:focus-within { border-color: #86b09c; box-shadow: 0 0 0 3px rgba(23,107,78,.12); }
.all-sections-search label i { color: var(--ui-primary); font-size: 19px; font-style: normal; }
.all-sections-search input { min-width: 0; width: 100%; color: var(--ui-ink); border: 0; outline: 0; background: transparent; font-size: 12px; }
.all-sections-search label button { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; color: var(--ui-muted); border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 18px; }
.all-sections-search label button:hover { color: var(--ui-primary); background: var(--ui-primary-soft); }
.all-sections-search > span { color: var(--ui-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.all-sections-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 11px; }
.all-sections-group { min-width: 0; overflow: hidden; border: 1px solid rgba(34,72,56,.13); border-radius: 14px; background: var(--ui-surface); box-shadow: 0 5px 18px rgba(24,53,41,.04); }
.all-sections-group-header { width: 100%; min-height: 82px; display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px 11px; color: inherit; text-align: left; border: 0; border-bottom: 1px solid var(--ui-border); background: var(--ui-surface-muted); cursor: pointer; }
.all-sections-group-header:hover { background: var(--ui-primary-soft); }
.all-sections-group-header:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: -3px; }
.all-sections-group-header > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; color: var(--ui-primary); border-radius: 10px; background: var(--ui-primary-soft); }
.all-sections-group-header > div { min-width: 0; flex: 1; }
.all-sections-group-header > b { color: var(--ui-primary); font-size: 14px; }
.all-sections-group-header h2 { color: var(--ui-ink); font-size: 13px; font-weight: 700; }
.all-sections-group-header p { margin-top: 3px; color: var(--ui-muted); font-size: 12px; line-height: 1.35; }
.all-sections-group > div { padding: 5px; }
.all-sections-group > div > button { width: 100%; min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px; color: var(--ui-ink); text-align: left; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; }
.all-sections-group > div > button + button { border-top-color: #edf0ee; border-radius: 0; }
.all-sections-group > div > button:hover { color: var(--ui-primary); border-color: #b9d0c4; border-radius: 9px; background: var(--ui-primary-soft); }
.all-sections-group > div > button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: -1px; }
.all-sections-group button > span { min-width: 0; }
.all-sections-group button strong,.all-sections-group button small { display: block; }
.all-sections-group button strong { font-size: 12px; font-weight: 700; }
.all-sections-group button small { margin-top: 3px; color: var(--ui-muted); font-size: 12px; line-height: 1.35; }
.all-sections-group button > b { flex: 0 0 auto; color: var(--ui-primary); font-size: 13px; }
.all-sections-empty { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ui-muted); border: 1px dashed var(--ui-border-strong); border-radius: 14px; background: var(--ui-surface); text-align: center; }
.all-sections-empty > span { font-size: 28px; }
.all-sections-empty strong { margin-top: 7px; color: var(--ui-ink); font-size: 15px; }
.all-sections-empty p { margin-top: 4px; font-size: 12px; }
.all-sections-empty button { min-height: 40px; margin-top: 12px; padding: 0 13px; color: #fff; border: 0; border-radius: 10px; background: var(--ui-primary); cursor: pointer; font-size: 12px; font-weight: 700; }
.all-sections-assistant { width: 100%; min-height: 70px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 13px; color: var(--ui-ink); text-align: left; border: 1px solid #b9d0c4; border-radius: 13px; background: var(--ui-primary-soft); cursor: pointer; }
.all-sections-assistant > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; border-radius: 10px; background: var(--ui-primary); }
.all-sections-assistant strong,.all-sections-assistant small { display: block; }
.all-sections-assistant strong { font-size: 12px; }
.all-sections-assistant small { margin-top: 3px; color: var(--ui-muted); font-size: 12px; }
.all-sections-assistant > b { color: var(--ui-primary); }
.all-sections-assistant:hover { border-color: #86b09c; background: #d6e9df; }
.all-sections-assistant:focus-visible { outline: 3px solid rgba(23,107,78,.2); outline-offset: 2px; }
.sidebar-footer .sidebar-all-sections.is-active { color: var(--ui-primary); background: var(--ui-primary-soft); }
.sidebar-footer .sidebar-all-sections.is-active .sidebar-item-icon { color: #fff; background: var(--ui-primary); }

@media (max-width: 1100px) {
    .all-sections-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .workspace-page-header { min-height: 0; align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px; }
    .workspace-page-header__side { width: 100%; align-items: flex-start; justify-content: space-between; }
    .workspace-page-header__meta { min-width: 0; flex-wrap: wrap; justify-content: flex-start; }
    .workspace-page-header__period { white-space: normal; }
    .workspace-page-header__reload { min-height: 44px; }
    .all-sections-workspace { padding-inline: 12px !important; padding-bottom: 100px; }
    .all-sections-search { align-items: stretch; flex-direction: column; }
    .all-sections-search > label { max-width: none; min-height: 46px; }
    .all-sections-grid { grid-template-columns: 1fr; }
    .all-sections-group > div > button { min-height: 64px; }
    .all-sections-assistant { min-height: 82px; }
}
@media (prefers-reduced-motion: reduce) {
    .workspace-page-header__reload .is-spinning { animation: none; }
}

/* ── Референсная система экранов: тёмная навигация + плотные светлые виджеты ── */
html { background: var(--ui-canvas); }
body { background: var(--ui-canvas); color: var(--ui-ink); font-family: 'Inter',sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.glass-panel { border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface); box-shadow: var(--ui-shadow-card); backdrop-filter: none; -webkit-backdrop-filter: none; transition: border-color .16s ease; }
/* Каркас на больших экранах повторяет пропорции референсов. */
.v2-app-shell,
.v2-app-shell:has(.primary-navigation:not(.is-collapsed)) { padding-left: 250px; }
.v2-app-shell:has(.primary-navigation.is-collapsed) { padding-left: 76px; }
.app-sidebar {
    inset: 0 auto 0 0;
    width: 250px;
    padding: 18px 12px 14px;
    color: #e9f1ed;
    border: 0;
    border-radius: 0;
    background: #12372d;
    box-shadow: none;
}
.sidebar-collapse-toggle {
    top: 24px;
    right: -13px;
    color: #174b39;
    border-color: #dce5e0;
    background: #fff;
}
.sidebar-brand { min-height: 58px; padding: 8px 10px; color: #fff; }
.sidebar-brand:hover { background: rgba(255,255,255,.07); }
.sidebar-brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    color: #0b3b2c;
    border-color: rgba(255,255,255,.65);
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
}
.sidebar-brand-copy strong { color: #fff; font-size: 15px; }
.sidebar-brand-copy small { color: #9ab2a8; }
.sidebar-search { border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.06); }
.sidebar-search:focus-within { border-color: rgba(255,255,255,.42); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.sidebar-search b,.sidebar-search input::placeholder { color: #91aa9f; }
.sidebar-search input { color: #fff; }
.sidebar-group + .sidebar-group { margin-top: 8px; }
.sidebar-group > p { color: #78958a; }
.sidebar-group > button,
.sidebar-footer > button { min-height: 42px; color: #dce8e3; border-radius: 8px; font-size: 12px; }
.sidebar-group > button:hover,
.sidebar-footer > button:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-group > button.is-active,
.sidebar-footer > button.is-active,
.sidebar-footer .sidebar-all-sections.is-active,
.sidebar-footer .sidebar-assistant.is-active {
    color: #fff;
    background: #245440;
    box-shadow: inset 3px 0 #8bc8a7;
}
.sidebar-item-icon { color: #e3eee9; background: transparent; }
.sidebar-group > button.is-active .sidebar-item-icon,
.sidebar-footer .sidebar-all-sections.is-active .sidebar-item-icon { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-group-items { margin: 2px 0 4px 35px; padding-left: 9px; border-left: 1px solid rgba(255,255,255,.16); }
.sidebar-route-link { min-height: 34px !important; padding: 5px 8px !important; color: #aec2b9 !important; border-radius: 7px !important; font-size: 12px !important; }
.sidebar-route-link .sidebar-item-icon { display: none; }
.sidebar-route-link:hover { color: #fff !important; background: rgba(255,255,255,.06) !important; }
.sidebar-route-link.is-active { color: #fff !important; background: rgba(45,126,87,.54) !important; box-shadow: none !important; }
.sidebar-pin-button { color: #84a095; }
.app-sidebar :is(.sidebar-group-toggle,.sidebar-group-shortcut,.sidebar-all-sections,.sidebar-assistant) { min-height: 44px; color: #dae8e0; border-radius: 8px; font-size: 13px; font-weight: 500; }
.app-sidebar :is(.sidebar-group-toggle,.sidebar-group-shortcut,.sidebar-group-chevron-button):hover { color: #fff; background: rgba(255,255,255,.08); }
.app-sidebar .sidebar-group-toggle.is-overview-active { color: #fff; background: #245440; box-shadow: inset 3px 0 #8bc8a7; }
.app-sidebar :is(.sidebar-group-chevron,.sidebar-group-chevron-button) { color: #acc4b6; }
.app-sidebar .sidebar-group-toggle.is-overview-active .sidebar-item-icon { color: #fff; background: transparent; }
.app-sidebar :is(.sidebar-group-toggle,.sidebar-group-shortcut,.sidebar-group-chevron-button):focus-visible { outline: 2px solid #b7ddc7; outline-offset: -2px; }
.app-sidebar .sidebar-route-link { min-height: 36px !important; font-weight: 400; line-height: 1.4; }
.app-sidebar .sidebar-brand-copy small { font-size: 11px; line-height: 1.4; color: #b5cbbf; }
.app-sidebar .sidebar-brand-mark { border-radius: 12px; }
.sidebar-search .navigation-icon { flex-shrink: 0; color: #adc6b9; }
.sidebar-footer { border-top-color: rgba(255,255,255,.12); }
.sidebar-footer .sidebar-assistant { color: #fff; }
.sidebar-footer .sidebar-assistant > span:first-child { color: #bfe1d0; background: transparent; }
.primary-navigation.is-collapsed .app-sidebar { width: 66px; }

/* Верхняя строка — поиск, период и действия без отдельной плавающей капсулы. */
.v2-app-shell .app-shell-header {
    position: sticky;
    top: 0;
    margin: 0 0 10px;
    padding: 14px 32px 8px;
    border: 0;
    border-radius: 0;
    background: rgba(245,247,246,.97);
    z-index: 60;
    box-shadow: none;
}
.v2-app-shell .app-header-main {
    min-height: 46px;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 0;
}
.v2-app-shell .app-assistant-command {
    max-width: none;
    min-height: 46px;
    border-color: #d9e0dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}
.v2-app-shell .app-assistant-command > span:first-child { color: #69736d; }
.v2-app-shell .app-assistant-command > b { width: 46px; height: 44px; margin: -1px -11px -1px 0; border-radius: 0 8px 8px 0; background: var(--ui-primary); font-size: 16px; }
.app-assistant-command-icon { flex: 0 0 auto; color: var(--ui-muted); }
.v2-app-shell .app-assistant-command-label { min-width: 0; flex: 1; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.app-assistant-command-action .navigation-icon { width: 19px; height: 19px; }
.header-period-chevron { flex: 0 0 auto; width: 16px; height: 16px; }
.header-period-custom[open] .header-period-chevron { transform: rotate(180deg); }
.v2-app-shell .app-header-context { width: auto; margin-left: 10px; padding: 0; border: 0; }
.v2-app-shell .header-period-presets { display: flex; }
.header-period-custom summary { min-height: 46px; min-width: 220px; border-color: #d9e0dc; border-radius: 8px; background: #fff; }
.app-header-account { gap: 8px; }
.app-connection { min-height: 40px; padding: 0 10px; color: #53615a; border-color: #dfe5e1; border-radius: 8px; background: #fff; }
.app-user { min-height: 40px; padding: 0 4px 0 10px; border-radius: 8px; background: transparent; }
.app-user button,.app-login { border-radius: 8px; }

/* Общая геометрия экранов и заголовков. */
.home-dashboard,
.workspace-page,
.overview-page,
#app > main:not(.overview-page) {
    width: min(100%,1480px);
    max-width: 1480px !important;
    margin-inline: auto;
    padding-inline: 32px !important;
}
.home-dashboard { padding-top: 0; }
.home-dashboard-header {
    min-height: 78px;
    align-items: flex-start;
    padding: 8px 0 12px;
}
.home-dashboard-heading h1,
.workspace-page-header h1 {
    margin-top: 0;
    font-size: clamp(26px,2.2vw,32px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.035em;
}
.home-dashboard-heading > p,
.workspace-page-header__description { margin-top: 5px; color: #68726c; font-size: 12px; }
.home-dashboard-kicker-row { display: none; }
.home-dashboard-actions { padding-top: 2px; }
.dashboard-icon-button,.dashboard-secondary-button,.dashboard-primary-button { min-height: 36px; border-radius: 8px; box-shadow: none; }
.section-dashboard-tabs {
    gap: 22px;
    margin: -2px 0 14px;
    padding-bottom: 0;
}
.section-dashboard-tabs button { min-height: 42px; padding: 0 2px; font-size: 12px; font-weight: 560; }
.section-dashboard-tabs button.is-active { font-weight: 650; }

/* Карточки: одинаковая рамка, без декоративного glass-эффекта. */
.home-dashboard {
    --dashboard-row-height: 120px;
    --dashboard-grid-gap: 10px;
}
.home-dashboard.is-density-dense {
    --dashboard-row-height: 100px;
    --dashboard-grid-gap: 8px;
}
.home-dashboard.is-density-comfortable {
    --dashboard-row-height: 140px;
    --dashboard-grid-gap: 12px;
}
.home-dashboard-grid {
    grid-template-columns: repeat(12,minmax(0,1fr));
    grid-auto-flow: row;
    grid-auto-rows: var(--dashboard-row-height);
    gap: var(--dashboard-grid-gap);
}
.home-dashboard-widget { grid-column: span var(--widget-cols,3); border-radius: 10px; container-type: inline-size; }
.home-dashboard.is-columns-1 .home-dashboard-widget { grid-column: span 12; }
.home-dashboard.is-columns-2 .home-dashboard-widget { grid-column: span 6; }
.home-dashboard.is-columns-3 .home-dashboard-widget { grid-column: span 4; }
.home-dashboard.is-columns-4 .home-dashboard-widget { grid-column: span 3; }
.home-dashboard.is-columns-6 .home-dashboard-widget { grid-column: span 2; }
.home-dashboard-card,
.chart-widget--fill {
    padding: 14px 15px 12px !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.home-dashboard-card:hover:not(:disabled),
.chart-widget--fill:hover { transform: none; border-color: #b8cac0 !important; box-shadow: 0 3px 12px rgba(16,49,34,.05) !important; }
.home-dashboard-card:not(.is-metric).is-risk,
.home-dashboard-card:not(.is-metric).is-warning,
.home-dashboard-card:not(.is-metric).is-good { padding-top: 14px; border-top-width: 1px; }

/* KPI-карточка: иконка слева, подпись и значение — как в референсах. */
.home-widget-metric-layout { grid-template-columns: 32px minmax(0,1fr); gap: 10px; }
.home-widget-metric-icon {
    width: 38px;
    height: 38px;
    color: var(--ui-primary) !important;
    border-radius: 50%;
    background: #f0f4f1 !important;
}
.home-widget-metric-label { color: var(--ui-muted); font-size: 13px; font-weight: 500; white-space: normal; line-height: 1.4; }
.home-widget-metric-copy .home-widget-value {
    margin: 4px 0 3px;
    color: #111713 !important;
    font-size: clamp(23px,1.8vw,29px);
    font-weight: 600;
    letter-spacing: -.025em;
}
.home-widget-metric-copy .home-widget-tone { color: #4f5e56; font-size: 12px; line-height: 1.3; }
.home-widget-metric-spark { display: none; }
.home-dashboard-card.is-risk .home-widget-tone { color: #d4433b; }
.home-dashboard-card.is-good .home-widget-tone { color: #12633f; }
.home-dashboard-card.is-warning .home-widget-tone { color: #b57016; }

/* Внутренности сводок, графиков и карточек внимания. */
.home-dashboard-card > header span,
.chart-widget--fill > h3 { color: #17211b; font-size: 13px; font-weight: 680; }
.home-widget-summary { margin-top: 8px; gap: 0 16px; }
.home-widget-summary > div { min-height: 27px; border-bottom-color: #edf0ee; }
.home-widget-summary > div span { color: #4f5e56; font-size: 12px; line-height: 1.25; }
.home-widget-summary > div strong { font-size: 12px; font-weight: 650; }
.home-dashboard-card > footer { color: #4f5e56; font-size: 12px; }
.home-dashboard-card.is-summary > footer {
    min-height: 0;
    margin-top: 6px;
    line-height: 1.35;
}
.home-dashboard-card.is-summary .home-widget-summary { flex: 0 0 auto; }
.chart-widget--fill { padding: 14px 16px 12px !important; }
.chart-widget--fill > h3 { margin-bottom: 10px; }

/* Плотные режимы сжимают содержимое, а не только внешнюю сетку. */
.home-dashboard.is-density-compact .home-dashboard-card,
.home-dashboard.is-density-compact .chart-widget--fill { padding: 10px 12px 9px !important; }
.home-dashboard.is-density-compact .home-widget-summary { margin-top: 5px; }
.home-dashboard.is-density-compact .home-widget-summary > div { min-height: 23px; }
.home-dashboard.is-density-compact .home-dashboard-card.is-summary > footer { margin-top: 3px; font-size: 12px; }
.home-dashboard.is-density-dense .home-dashboard-card,
.home-dashboard.is-density-dense .chart-widget--fill { padding: 7px 9px !important; }
.home-dashboard.is-density-dense .home-widget-metric-layout { grid-template-columns: 32px minmax(0,1fr); gap: 8px; }
.home-dashboard.is-density-dense .home-widget-metric-icon { width: 32px; height: 32px; }
.home-dashboard.is-density-dense .home-widget-metric-label { font-size: 12px; }
.home-dashboard.is-density-dense .home-widget-metric-copy .home-widget-value { margin: 2px 0 1px; font-size: clamp(17px,1.28vw,22px); }
.home-dashboard.is-density-dense .home-widget-metric-copy .home-widget-tone { font-size: 12px; }
.home-dashboard.is-density-dense .home-dashboard-card > header span,
.home-dashboard.is-density-dense .chart-widget--fill > h3 { font-size: 12px; }
.home-dashboard.is-density-dense .home-widget-summary { margin-top: 3px; gap: 0 10px; }
.home-dashboard.is-density-dense .home-widget-summary > div { min-height: 24px; }
.home-dashboard.is-density-dense .home-widget-summary > div span { font-size: 12px; }
.home-dashboard.is-density-dense .home-widget-summary > div strong { font-size: 12px; }
.home-dashboard.is-density-dense .home-dashboard-card.is-summary > footer { display: none; }
.home-dashboard.is-density-dense .chart-widget--fill > h3 { margin-bottom: 4px; }

@container (max-width: 420px) {
    .home-widget-summary > div { grid-template-columns: minmax(0,1fr); align-content: center; gap: 0; }
    .home-widget-summary > div span { font-size: 12px; line-height: 1.2; }
    .home-widget-summary > div strong { justify-self: start; font-size: 12px; line-height: 1.2; }
}
.home-attention {
    margin-bottom: 12px;
    padding: 11px 12px;
    border-color: var(--ui-border);
    border-radius: 10px;
    box-shadow: none;
}
.home-attention > header { align-items: center; margin-bottom: 8px; }
.home-attention-heading { display: flex; align-items: center; gap: 7px; }
.home-attention-heading > span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: var(--signal-warning);
    border: 1px solid var(--signal-warning-border);
    border-radius: 50%;
    background: var(--signal-warning-bg);
    font-size: 12px;
    font-weight: 700;
}
.home-attention > header h2 { margin: 0; font-size: 14px; }
.home-attention > header > small { font-size: 12px; }
.home-attention-list { gap: 7px; border: 0; border-radius: 0; overflow: visible; }
.home-attention-list > button {
    min-height: 50px;
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) 12px;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid #e2e7e4;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}
.home-attention-list > button + button { border-top: 1px solid #e2e7e4; }
.home-attention-list > button:hover { transform: none; border-color: #a9c4b6; background: #f8fbf9; box-shadow: none; }
.home-attention-list > button.is-risk,
.home-attention-list > button.is-warning { background: #fff; }
.home-attention-status { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #f1f4f2; }
.home-attention-status i { width: auto; height: auto; border-radius: 0; background: transparent; font-size: 12px; font-style: normal; font-weight: 700; }
.home-attention-list > button.is-risk .home-attention-status { color: var(--signal-risk); background: var(--signal-risk-bg); }
.home-attention-list > button.is-warning .home-attention-status { color: var(--signal-warning); background: var(--signal-warning-bg); }
.home-attention-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.home-attention-list > button .home-attention-copy > strong { margin: 0; overflow: hidden; color: var(--ui-ink); font-size: 12.5px; font-weight: 680; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.home-attention-list > button .home-attention-copy > small { margin: 0; overflow: hidden; color: #516058; font-size: 12px; font-weight: 560; line-height: 1.2; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.home-attention-list > button > b { margin: 0; padding: 0; color: #617068; font-size: 18px; font-weight: 450; line-height: 1; }
.home-attention-loading span { height: 50px; border-radius: 8px; }

/* Карточка сигналов живёт в общей сетке и настраивается как остальные виджеты. */
.home-attention-widget { cursor: default; }
.home-attention-widget:hover { transform: none !important; box-shadow: none !important; }
.home-attention-widget > header { flex: 0 0 auto; }
.home-attention-widget > header > span { font-size: 13px; }
.home-attention-widget > header > small { color: #536159; font-size: 12px; font-weight: 560; white-space: nowrap; }
.home-attention-widget-list {
    min-height: 0;
    display: grid;
    grid-auto-rows: minmax(38px,auto);
    align-content: start;
    gap: 4px;
    margin-top: 8px;
}
.home-attention-widget-list > button {
    min-width: 0;
    min-height: 38px;
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) 12px;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    color: var(--ui-ink);
    text-align: left;
    border: 1px solid #e2e7e4;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}
.home-attention-widget-list > button:hover:not(:disabled) { border-color: #a9c4b6; background: #f8fbf9; }
.home-attention-widget-list > button:focus-visible { outline: 3px solid rgba(23,107,78,.18); outline-offset: -1px; }
.home-attention-widget-list > button:disabled { cursor: default; }
.home-attention-widget-status {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--signal-neutral);
    border-radius: 50%;
    background: #f1f4f2;
    font-size: 12px;
    font-weight: 700;
}
.home-attention-widget-list > button.is-risk .home-attention-widget-status { color: var(--signal-risk); background: var(--signal-risk-bg); }
.home-attention-widget-list > button.is-warning .home-attention-widget-status { color: var(--signal-warning); background: var(--signal-warning-bg); }
.home-attention-widget-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.home-attention-widget-copy strong,
.home-attention-widget-copy small { overflow: hidden; text-overflow: ellipsis; }
.home-attention-widget-copy strong { display:-webkit-box; color: var(--ui-ink); font-size: 12px; font-weight: 680; line-height: 1.25; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.home-attention-widget-copy small { white-space:nowrap; }
.home-attention-widget-copy small { color: #516058; font-size: 12px; font-weight: 560; line-height: 1.15; }
.home-attention-widget-list > button > b { color: #617068; font-size: 18px; font-weight: 450; line-height: 1; }
.home-attention-widget-loading { display: grid; gap: 5px; margin-top: 8px; }
.home-attention-widget-loading span { height: 32px; border-radius: 7px; background: linear-gradient(90deg,#edf1ee 20%,#f7f9f8 50%,#edf1ee 80%); background-size: 220% 100%; animation: overview-shimmer 1.25s linear infinite; }
.home-attention-widget-ok { min-height: 90px; display: flex; align-items: center; gap: 10px; color: var(--signal-good); }
.home-attention-widget-ok > span { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--signal-good-border); border-radius: 50%; background: var(--signal-good-bg); }
.home-attention-widget-ok strong,.home-attention-widget-ok small { display: block; }
.home-attention-widget-ok strong { font-size: 12px; }
.home-attention-widget-ok small { margin-top: 2px; color: #516058; font-size: 12px; }
.home-dashboard.is-density-dense .home-attention-widget-list { gap: 3px; margin-top: 5px; }
.home-dashboard.is-density-dense .home-attention-widget-list > button { min-height: 31px; grid-template-columns: 22px minmax(0,1fr) 10px; padding-block: 3px; }
.home-dashboard.is-density-dense .home-attention-widget-status { width: 22px; height: 22px; }
.home-dashboard.is-density-dense .home-attention-widget-copy small { display: none; }
.home-dashboard.is-density-dense .home-attention-widget-copy strong { font-size: 12px; }

/* ИИ-диагностика: суммы разных типов влияния не смешиваются. */
.diagnostics-workspace { display:grid; gap:14px; }
.weekly-diagnostic-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:14px 16px; border:1px solid #dfe8e3; border-radius:12px; background:#fff; }
.weekly-diagnostic-toolbar > div,.weekly-diagnostic-toolbar label { display:grid; gap:4px; }
.weekly-diagnostic-toolbar span,.weekly-diagnostic-toolbar label { color:#607168; font-size: 12px; font-weight: 700; letter-spacing:.08em; text-transform:uppercase; }
.weekly-diagnostic-toolbar strong { color:#183d2e; font-size:16px; }
.weekly-diagnostic-toolbar small { color:#718078; font-size: 12px; }
.weekly-diagnostic-toolbar select { min-height:36px; min-width:150px; padding:6px 28px 6px 10px; border:1px solid #d4dfd9; border-radius:8px; background:#fff; color:#294338; font-size:12px; text-transform:none; }
.weekly-diagnostic-period-note { padding:11px 14px; border:1px solid #eadfc8; border-radius:10px; background:#fffaf0; color:#795c27; font-size: 12px; }
.weekly-diagnostic-diagnosis { padding:24px; border-left:4px solid #176b4e; }
.weekly-diagnostic-diagnosis > span,.weekly-diagnostic-section > header span { color:#176b4e; font-size: 12px; font-weight: 700; letter-spacing:.1em; text-transform:uppercase; }
.weekly-diagnostic-diagnosis h2 { max-width:1100px; margin:8px 0 10px; color:#18372b; font-size:clamp(19px,2.4vw,28px); font-weight: 700; line-height:1.3; }
.weekly-diagnostic-diagnosis p { color:#6c7d74; font-size: 12px; }
.weekly-diagnostic-section { display:grid; gap:14px; min-width:0; padding:20px; }
.weekly-diagnostic-section:not(.glass-panel) { padding:8px 0; }
.weekly-diagnostic-section > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.weekly-diagnostic-section > header h2 { margin-top:3px; color:#18372b; font-size:19px; font-weight: 700; }
.weekly-diagnostic-section > header > small { max-width:480px; color:#718078; font-size: 12px; line-height:1.5; text-align:right; }
.weekly-diagnostic-economics { display:grid; grid-template-columns:repeat(auto-fit,minmax(185px,1fr)); gap:9px; }
.weekly-diagnostic-economics article { min-width:0; padding:14px; border:1px solid #e1e9e4; border-radius:10px; background:#fbfdfc; }
.weekly-diagnostic-economics span,.weekly-diagnostic-economics strong,.weekly-diagnostic-economics b,.weekly-diagnostic-economics small { display:block; }
.weekly-diagnostic-economics span { color:#607168; font-size: 12px; font-weight: 700; }
.weekly-diagnostic-economics strong { margin:5px 0 2px; color:#18372b; font-size:19px; font-variant-numeric:tabular-nums; }
.weekly-diagnostic-economics b { color:#176b4e; font-size: 12px; }
.weekly-diagnostic-economics small { margin-top:7px; color:#7b8981; font-size: 12px; line-height:1.4; }
.weekly-diagnostic-details { border-top:1px solid #e4ebe7; padding-top:10px; }
.weekly-diagnostic-details summary { color:#176b4e; font-size: 12px; font-weight: 700; cursor:pointer; }
.weekly-diagnostic-details ul { margin:8px 0 0; padding-left:18px; color:#697970; font-size: 12px; }
.weekly-diagnostic-months { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px; margin-top:10px; }
.weekly-diagnostic-months article { display:grid; gap:3px; padding:10px; border-radius:8px; background:#f4f8f6; color:#4f6258; font-size: 12px; }
.weekly-diagnostic-months strong { color:#28483a; }
.weekly-diagnostic-months small { color:#7c8b83; }
.weekly-diagnostic-decisions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.weekly-diagnostic-decisions > article { display:flex; min-width:0; flex-direction:column; gap:11px; padding:18px; }
.weekly-diagnostic-decisions > article > header { display:flex; align-items:flex-start; gap:10px; }
.weekly-diagnostic-decisions > article > header > b { flex:none; width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#e8f3ed; color:#176b4e; font-size:12px; }
.weekly-diagnostic-decisions header small { color:#738178; font-size: 12px; font-weight:700; text-transform:uppercase; }
.weekly-diagnostic-decisions h3 { margin-top:3px; color:#19392c; font-size:15px; line-height:1.35; }
.weekly-diagnostic-decisions > article > p { color:#3f574c; font-size: 12px; line-height:1.5; }
.weekly-diagnostic-decisions > article > p.is-cause { padding:9px 10px; border-radius:8px; background:#f4f7f5; color:#63736a; }
.weekly-diagnostic-decisions ol { display:grid; gap:5px; margin:0; padding-left:20px; color:#3e554a; font-size: 12px; line-height:1.4; }
.weekly-diagnostic-first-step { display:grid; gap:3px; margin-top:auto; padding:11px; border-left:3px solid #d49a32; border-radius:7px; background:#fffaf0; }
.weekly-diagnostic-first-step span { color:#8a651f; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.weekly-diagnostic-first-step strong { color:#5e4a27; font-size: 12px; }
.weekly-diagnostic-first-step small { color:#826d46; font-size: 12px; }
.weekly-diagnostic-scenarios { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:10px; }
.weekly-diagnostic-scenarios article { padding:14px; border:1px solid #e4dccb; border-radius:10px; background:#fffcf5; }
.weekly-diagnostic-scenarios h3 { color:#634919; font-size:13px; }
.weekly-diagnostic-scenarios p { margin:7px 0; color:#5d5546; font-size: 12px; line-height:1.45; }
.weekly-diagnostic-scenarios dl { display:grid; gap:5px; }
.weekly-diagnostic-scenarios dl div { display:grid; grid-template-columns:100px minmax(0,1fr); gap:8px; font-size: 12px; }
.weekly-diagnostic-scenarios dt { color:#8a7651; font-weight: 700; }
.weekly-diagnostic-scenarios dd { color:#665b48; }
.weekly-diagnostic-scenarios > article > small { display:block; margin-top:8px; color:#9a681c; font-size: 12px; }
.weekly-diagnostic-plan { display:grid; gap:9px; margin:0; padding:0; list-style:none; }
.weekly-diagnostic-plan li { display:flex; align-items:flex-start; gap:11px; padding:11px 0; border-bottom:1px solid #e7ede9; }
.weekly-diagnostic-plan li > b { flex:none; width:25px; height:25px; display:grid; place-items:center; border-radius:6px; background:#176b4e; color:#fff; font-size: 12px; }
.weekly-diagnostic-plan li > div { display:grid; gap:3px; }
.weekly-diagnostic-plan strong { color:#294338; font-size:12px; }
.weekly-diagnostic-plan span,.weekly-diagnostic-plan small { color:#718078; font-size: 12px; }
.weekly-diagnostic-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:12px; }
.weekly-diagnostic-facts h3 { margin-bottom:7px; color:#294338; font-size: 12px; }
.weekly-diagnostic-facts p { padding:5px 0; color:#63736a; font-size: 12px; }
.weekly-diagnostic-signals-title { margin-top:12px; color:#40574c; font-size:14px; font-weight: 700; }
.diagnostics-money-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.diagnostics-money-strip article { padding:16px 18px; border:1px solid #dce5e0; border-radius:10px; background:#fff; }
.diagnostics-money-strip article.is-loss { border-top:3px solid #c95a4b; }
.diagnostics-money-strip article.is-returned { border-top:3px solid #2f8a62; }
.diagnostics-money-strip article.is-potential { border-top:3px solid #d09632; }
.diagnostics-money-strip span,.diagnostics-money-strip small,.diagnostics-money-strip strong { display:block; }
.diagnostics-money-strip span { color:#526158; font-size: 12px; font-weight:700; }
.diagnostics-money-strip strong { margin:4px 0; color:#173e2f; font-size:clamp(20px,2.5vw,29px); font-weight: 700; font-variant-numeric:tabular-nums; }
.diagnostics-money-strip small { color:#718078; font-size: 12px; }
.diagnostics-forecast-note { display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:center; gap:10px; padding:10px 13px; border:1px solid #eadfc8; border-radius:9px; background:#fffaf0; color:#6c604c; }
.diagnostics-forecast-note span { font-size: 12px; font-weight: 700; text-transform:uppercase; }
.diagnostics-forecast-note strong { color:#8a5b0d; font-size:15px; }
.diagnostics-forecast-note small { font-size: 12px; }
.diagnostics-action-message { padding:9px 12px; border-radius:8px; background:#eaf3ee; color:#176b4e; font-size: 12px; font-weight:700; }
.diagnostics-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid #dfe6e2; border-radius:10px; background:#fff; }
.diagnostics-filter { display:flex; flex-wrap:wrap; gap:4px; }
.diagnostics-filter button { min-height:34px; padding:6px 11px; border-radius:7px; color:#526158; font-size: 12px; font-weight:700; }
.diagnostics-filter button:hover,.diagnostics-filter button.is-active { color:#14563e; background:#eaf3ee; }
.diagnostics-toolbar label { display:flex; align-items:center; gap:8px; color:#65736b; font-size: 12px; font-weight:650; }
.diagnostics-toolbar select { min-height:34px; padding:5px 28px 5px 9px; border:1px solid #d8e1dc; border-radius:7px; background:#fff; color:#253c32; }
.diagnostics-signal-list { display:grid; gap:8px; }
.diagnostics-history { margin-top:12px; padding-top:4px; }
.diagnostics-history > summary { margin-bottom:10px; color:#486157; font-size:12px; font-weight: 700; cursor:pointer; list-style-position:inside; }
.diagnostics-history[open] > summary { color:#176b4e; }
.diagnostics-signal { overflow:hidden; border:1px solid #dfe6e2; border-left:3px solid #a7b5ae; border-radius:10px; background:#fff; }
.diagnostics-signal.is-risk { border-left-color:var(--signal-risk); }
.diagnostics-signal.is-warning { border-left-color:var(--signal-warning); }
.diagnostics-signal-summary { width:100%; display:grid; grid-template-columns:32px minmax(0,1fr) minmax(130px,190px) 20px; align-items:center; gap:12px; padding:14px 16px; text-align:left; }
.diagnostics-signal-summary:hover { background:#f8fbf9; }
.diagnostics-signal-summary:focus-visible { outline:3px solid rgba(23,107,78,.18); outline-offset:-3px; }
.diagnostics-signal-mark { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#596860; background:#eef2f0; font-size:14px; font-weight: 700; }
.diagnostics-signal.is-risk .diagnostics-signal-mark { color:var(--signal-risk); background:var(--signal-risk-bg); }
.diagnostics-signal.is-warning .diagnostics-signal-mark { color:var(--signal-warning); background:var(--signal-warning-bg); }
.diagnostics-signal-main { min-width:0; display:grid; gap:3px; }
.diagnostics-signal-main small { color:#68776f; font-size: 12px; font-weight:690; }
.diagnostics-signal-main strong { color:#173429; font-size:14px; font-weight: 700; }
.diagnostics-signal-main em { overflow:hidden; color:#526158; font-size: 12px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.diagnostics-signal-money { text-align:right; }
.diagnostics-signal-money strong,.diagnostics-signal-money small { display:block; }
.diagnostics-signal-money strong { color:#173e2f; font-size:15px; font-weight: 700; font-variant-numeric:tabular-nums; }
.diagnostics-signal-money small { margin-top:2px; color:#718078; font-size: 12px; }
.diagnostics-signal-summary > b { color:#718078; font-size:18px; font-weight:500; text-align:center; }
.diagnostics-signal-detail { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,.55fr); gap:14px; padding:15px 18px 17px 60px; border-top:1px solid #e7ece9; background:#fbfcfb; }
.diagnostics-signal-detail dl { display:grid; gap:11px; }
.diagnostics-signal-detail dl > div { display:grid; grid-template-columns:110px minmax(0,1fr); gap:10px; }
.diagnostics-signal-detail dt { color:#6b7971; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.diagnostics-signal-detail dd { color:#344b40; font-size:12px; line-height:1.45; }
.diagnostics-signal-detail dd span { margin-left:5px; padding:2px 5px; border-radius:4px; background:#edf3f0; color:#52675d; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.diagnostics-signal-detail ul { margin:0; padding:0; list-style:none; }
.diagnostics-signal-detail li { padding:5px 0; border-bottom:1px solid #e8edea; color:#526158; font-size: 12px; }
.diagnostics-signal-action { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:13px; border:1px solid #dce5e0; border-radius:9px; background:#fff; }
.diagnostics-signal-action label { display:grid; gap:5px; color:#5b6b63; font-size: 12px; font-weight: 700; }
.diagnostics-signal-action label.is-wide { grid-column:1/-1; }
.diagnostics-signal-action input { min-height:36px; width:100%; padding:7px 9px; color:#253c32; border:1px solid #d5dfda; border-radius:7px; background:#fff; font-size: 12px; }
.diagnostics-signal-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:6px; }
.diagnostics-signal-actions button { min-height:34px; padding:6px 10px; color:#315246; border:1px solid #cddbd4; border-radius:7px; background:#f8fbf9; font-size: 12px; font-weight: 700; }
.diagnostics-signal-actions button:nth-child(2) { color:#fff; border-color:#176b4e; background:#176b4e; }
.diagnostics-signal-actions button:disabled { opacity:.55; cursor:wait; }
.diagnostics-signal-detail > button { grid-column:1/-1; justify-self:start; color:#176b4e; font-size: 12px; font-weight: 700; }
.diagnostics-empty { min-height:180px; display:grid; place-content:center; gap:4px; padding:24px; border:1px solid #dfe6e2; border-radius:10px; background:#fff; color:#66756d; text-align:center; }
.diagnostics-empty strong { color:#294338; font-size:14px; }
.diagnostics-empty.is-warning { min-height:0; place-content:initial; padding:14px 16px; border-color:#eadfc8; background:#fffaf0; color:#795c27; text-align:left; }
.diagnostics-empty.is-warning strong { color:#795c27; }
@media(max-width:700px) {
    .weekly-diagnostic-toolbar,.weekly-diagnostic-section > header { align-items:stretch; flex-direction:column; }
    .weekly-diagnostic-toolbar select { width:100%; }
    .weekly-diagnostic-diagnosis,.weekly-diagnostic-section { padding:15px; }
    .weekly-diagnostic-section:not(.glass-panel) { padding:6px 0; }
    .weekly-diagnostic-section > header > small { text-align:left; }
    .weekly-diagnostic-decisions,.weekly-diagnostic-facts { grid-template-columns:1fr; }
    .weekly-diagnostic-scenarios dl div { grid-template-columns:1fr; gap:2px; }
    .diagnostics-money-strip { grid-template-columns:1fr; gap:7px; }
    .diagnostics-money-strip article { padding:12px 14px; }
    .diagnostics-forecast-note { grid-template-columns:1fr auto; }
    .diagnostics-forecast-note small { grid-column:1/-1; }
    .diagnostics-toolbar { align-items:stretch; flex-direction:column; }
    .diagnostics-toolbar label { justify-content:space-between; }
    .diagnostics-signal-summary { grid-template-columns:30px minmax(0,1fr) 18px; gap:9px; padding:12px; }
    .diagnostics-signal-money { grid-column:2; text-align:left; }
    .diagnostics-signal-summary > b { grid-column:3; grid-row:1/3; }
    .diagnostics-signal-detail { grid-template-columns:1fr; padding:13px; }
    .diagnostics-signal-detail dl > div { grid-template-columns:1fr; gap:2px; }
    .diagnostics-signal-action { grid-template-columns:1fr; }
    .diagnostics-signal-action label.is-wide { grid-column:auto; }
}

/* ИИ-диагностика: финансовый итог и одно главное действие на первом экране. */
.diagnostics-workspace--focused { gap:12px; }
.weekly-finance-overview { display:grid; gap:18px; padding:20px; }
.weekly-finance-heading,.weekly-priorities > header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.weekly-finance-heading > div,.weekly-priorities > header > div { display:grid; gap:3px; }
.weekly-finance-heading span,.weekly-priorities > header span { color:#176b4e; font-size: 12px; font-weight: 700; letter-spacing:.09em; text-transform:uppercase; }
.weekly-finance-heading h2,.weekly-priorities > header h2 { color:#18372b; font-size:20px; font-weight: 700; }
.weekly-finance-heading > small,.weekly-priorities > header > small { color:#718078; font-size: 12px; line-height:1.45; text-align:right; }
.weekly-finance-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid #dfe8e3; border-radius:12px; background:#fbfdfc; }
.weekly-finance-kpis article { min-width:0; padding:16px 18px; border-right:1px solid #e1e9e4; }
.weekly-finance-kpis article:last-child { border-right:0; }
.weekly-finance-kpis article.is-result { background:#edf7f1; }
.weekly-finance-kpis span,.weekly-finance-kpis strong,.weekly-finance-kpis small { display:block; }
.weekly-finance-kpis span { color:#65766d; font-size: 12px; font-weight: 700; }
.weekly-finance-kpis strong { overflow-wrap:anywhere; margin:5px 0 3px; color:#18372b; font-size:clamp(18px,2vw,26px); font-weight: 700; font-variant-numeric:tabular-nums; line-height:1.15; }
.weekly-finance-kpis article.is-result strong { color:#176b4e; }
.weekly-finance-kpis small { color:#75847c; font-size: 12px; line-height:1.35; }
.weekly-expense-focus { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,.62fr); align-items:center; gap:24px; }
.weekly-expense-chart { display:grid; gap:8px; min-width:0; }
.weekly-expense-chart-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.weekly-expense-chart-title strong { color:#294338; font-size:12px; }
.weekly-expense-chart-title span,.weekly-expense-chart > small { color:#78877f; font-size: 12px; }
.weekly-expense-bar { display:flex; overflow:hidden; width:100%; height:20px; border-radius:7px; background:#e9eeeb; }
.weekly-expense-bar span { min-width:2px; height:100%; }
.weekly-expense-bar .is-0,.weekly-expense-leaders i.is-0 { background:#176b4e; }
.weekly-expense-bar .is-1,.weekly-expense-leaders i.is-1 { background:#4c8d72; }
.weekly-expense-bar .is-2,.weekly-expense-leaders i.is-2 { background:#83ad99; }
.weekly-expense-bar .is-3 { background:#b3cbbf; }.weekly-expense-bar .is-4 { background:#d6a94b; }.weekly-expense-bar .is-5 { background:#e2c47f; }.weekly-expense-bar .is-6 { background:#c5cfc9; }.weekly-expense-bar .is-7 { background:#dde4e0; }
.weekly-expense-leaders { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.weekly-expense-leaders li { display:grid; grid-template-columns:8px minmax(0,1fr) auto auto; align-items:center; gap:8px; color:#42584d; font-size: 12px; }
.weekly-expense-leaders i { width:8px; height:8px; border-radius:50%; }
.weekly-expense-leaders strong { color:#243e33; font-size: 12px; font-variant-numeric:tabular-nums; }
.weekly-expense-leaders small { min-width:40px; color:#718078; text-align:right; }
.weekly-finance-empty { padding:12px; border-radius:8px; background:#f4f7f5; color:#687870; font-size: 12px; }
.weekly-disclosure-button { width:100%; min-height:44px; display:flex; align-items:center; justify-content:space-between; padding:9px 12px; border:0; border-top:1px solid #e4ebe7; background:transparent; color:#176b4e; font-size: 12px; font-weight: 700; text-align:left; cursor:pointer; }
.weekly-disclosure-button:focus-visible,.weekly-priority-summary:focus-visible,.weekly-secondary-panel > button:focus-visible { outline:3px solid rgba(23,107,78,.2); outline-offset:2px; }
.weekly-disclosure-button b { font-size:17px; font-weight:500; }
.weekly-expense-details { display:grid; gap:14px; padding-top:2px; }
.weekly-expense-table { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; }
.weekly-expense-table > div { display:grid; grid-template-columns:minmax(0,1fr) auto 54px; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid #e7ede9; color:#53675d; font-size: 12px; }
.weekly-expense-table strong { color:#294338; font-variant-numeric:tabular-nums; }
.weekly-expense-table small { color:#718078; text-align:right; }
.weekly-diagnostic-summary { padding-top:2px; }
.weekly-diagnostic-summary summary { min-height:44px; display:flex; align-items:center; color:#52675d; font-size: 12px; font-weight: 700; cursor:pointer; }
.weekly-diagnostic-summary p { max-width:1120px; padding:0 2px 4px; color:#3f574c; font-size:12px; line-height:1.55; }
.weekly-priorities { display:grid; gap:12px; padding:8px 0; }
.weekly-priority-list { display:grid; gap:8px; }
.weekly-priority-card { overflow:hidden; border:1px solid #dfe6e2; border-radius:11px; background:#fff; }
.weekly-priority-card.is-primary { border-left:4px solid #d49a32; }
.weekly-priority-card.is-expanded { box-shadow:0 8px 24px rgba(22,55,42,.06); }
.weekly-priority-summary { width:100%; min-height:76px; display:grid; grid-template-columns:32px minmax(0,1fr) minmax(150px,220px) 22px; align-items:center; gap:12px; padding:13px 16px; border:0; background:transparent; text-align:left; cursor:pointer; }
.weekly-priority-summary:hover { background:#f8fbf9; }
.weekly-priority-summary > b { width:30px; height:30px; display:grid; place-items:center; border-radius:8px; background:#eaf3ee; color:#176b4e; font-size:12px; }
.weekly-priority-card.is-primary .weekly-priority-summary > b { background:#fff3d9; color:#946313; }
.weekly-priority-copy { min-width:0; display:grid; gap:2px; }
.weekly-priority-copy small { color:#738178; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.weekly-priority-copy strong { color:#19392c; font-size:14px; line-height:1.35; }
.weekly-priority-copy em { display:-webkit-box; overflow:hidden; color:#607168; font-size: 12px; font-style:normal; line-height:1.35; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.weekly-priority-owner { display:grid; gap:2px; justify-items:end; text-align:right; }
.weekly-priority-owner strong { color:#344f43; font-size: 12px; }
.weekly-priority-owner small { color:#7a8981; font-size: 12px; }
.weekly-priority-summary > i { color:#718078; font-size:18px; font-style:normal; text-align:center; }
.weekly-priority-detail { display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); gap:12px 18px; padding:16px 18px 18px 62px; border-top:1px solid #e7ece9; background:#fbfcfb; }
.weekly-priority-fact { display:grid; align-content:start; gap:5px; }
.weekly-priority-fact > span { color:#176b4e; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.weekly-priority-fact p { color:#3e554a; font-size: 12px; line-height:1.5; }
.weekly-priority-detail .weekly-diagnostic-first-step { margin:0; }
.weekly-priority-actions { grid-column:1/-1; display:grid; gap:7px; margin:0; padding:0; list-style:none; }
.weekly-priority-actions li { display:grid; grid-template-columns:20px minmax(0,1fr); gap:8px; padding:9px 10px; border-radius:8px; background:#fff; }
.weekly-priority-actions li > b { color:#176b4e; font-size: 12px; }
.weekly-priority-actions li > div { display:grid; gap:2px; }
.weekly-priority-actions strong { color:#294338; font-size: 12px; }
.weekly-priority-actions span { color:#3e554a; font-size: 12px; line-height:1.4; }
.weekly-priority-actions small { color:#78877f; font-size: 12px; }
.weekly-priority-dependency { grid-column:1/-1; color:#7d671f; font-size: 12px; }
.weekly-priority-reason { grid-column:1/-1; padding-top:3px; border-top:1px solid #e7ede9; }
.weekly-priority-reason summary { min-height:40px; display:flex; align-items:center; color:#5c7066; font-size: 12px; font-weight: 700; cursor:pointer; }
.weekly-priority-reason p { margin-bottom:7px; color:#607168; font-size: 12px; line-height:1.45; }
.weekly-priority-reason > small { display:inline-block; margin:0 7px 4px 0; color:#819087; font-size: 12px; }
.weekly-priority-controls,.weekly-task-editor { grid-column:1/-1; }
.weekly-priority-controls .diagnostics-signal-actions { display:flex; }
.diagnostics-signal-actions button.is-editor { margin-left:auto; color:#315246; border-color:#cddbd4; background:#f8fbf9; }
.weekly-task-editor { margin-top:-4px; }
.weekly-secondary-panel { overflow:hidden; padding:0; }
.weekly-secondary-panel > button { width:100%; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 16px; border:0; background:transparent; text-align:left; cursor:pointer; }
.weekly-secondary-panel > button:hover { background:#f8fbf9; }
.weekly-secondary-panel > button > span { min-width:0; display:grid; gap:2px; }
.weekly-secondary-panel > button small { color:#176b4e; font-size: 12px; font-weight: 700; letter-spacing:.07em; text-transform:uppercase; }
.weekly-secondary-panel > button strong { color:#294338; font-size:13px; }
.weekly-secondary-panel > button em { color:#718078; font-size: 12px; font-style:normal; }
.weekly-secondary-panel > button > b { color:#718078; font-size:18px; font-weight:500; }
.weekly-secondary-panel .weekly-diagnostic-scenarios,.weekly-secondary-panel .weekly-diagnostic-facts { margin:0; padding:0 16px 16px; }
.weekly-additional-signals-body { display:grid; gap:10px; padding:0 14px 14px; border-top:1px solid #e7ede9; }
.weekly-additional-signals-body > .diagnostics-money-strip { margin-top:14px; }
@media(max-width:900px) {
    .weekly-finance-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .weekly-finance-kpis article:nth-child(2) { border-right:0; }
    .weekly-finance-kpis article:nth-child(-n+2) { border-bottom:1px solid #e1e9e4; }
    .weekly-expense-focus { grid-template-columns:1fr; gap:14px; }
    .weekly-priority-detail { grid-template-columns:1fr; padding-left:18px; }
}
@media(max-width:700px) {
    .weekly-finance-overview { padding:15px; }
    .weekly-finance-heading,.weekly-priorities > header { align-items:stretch; flex-direction:column; gap:5px; }
    .weekly-finance-heading > small,.weekly-priorities > header > small { text-align:left; }
    .weekly-finance-kpis article { padding:13px; }
    .weekly-finance-kpis strong { font-size:18px; }
    .weekly-expense-table { grid-template-columns:1fr; }
    .weekly-priority-summary { grid-template-columns:30px minmax(0,1fr) 20px; gap:9px; padding:12px; }
    .weekly-priority-owner { grid-column:2; justify-items:start; text-align:left; }
    .weekly-priority-summary > i { grid-column:3; grid-row:1/3; }
    .weekly-priority-detail { padding:13px; }
    .weekly-priority-controls .diagnostics-signal-actions { display:grid; grid-template-columns:1fr 1fr; }
    .diagnostics-signal-actions button.is-editor { margin-left:0; }
}
@media(max-width:430px) {
    .weekly-finance-kpis strong { font-size:16px; }
    .weekly-finance-overview { gap:10px; padding:13px; }
    .weekly-finance-heading h2 { font-size:18px; }
    .weekly-finance-kpis article { min-height:84px; padding:10px; }
    .weekly-finance-kpis small { font-size: 12px; }
    .weekly-expense-focus { gap:8px; }
    .weekly-expense-leaders { display:none; }
    .weekly-expense-chart > small { display:none; }
    .weekly-diagnostic-summary summary { min-height:36px; }
    .weekly-priority-controls .diagnostics-signal-actions { grid-template-columns:1fr; }
}

/* Полный формат ИИ-отчёта: восстановлен после эксперимента с компактной версией. */
.diagnostics-workspace--restored { gap:14px; }
.diagnostics-workspace--restored .weekly-diagnostic-diagnosis { padding:24px; }
.diagnostics-workspace--restored .weekly-diagnostic-diagnosis h2 { max-width:1100px; margin:8px 0 10px; font-size:clamp(19px,2.4vw,28px); font-weight: 700; line-height:1.3; }
.diagnostics-workspace--restored .weekly-diagnostic-decisions { align-items:stretch; gap:12px; }
.diagnostics-workspace--restored .weekly-additional-signals > button { display:none; }
.diagnostics-workspace--restored .weekly-additional-signals-body { padding:14px; border-top:0; }
@media(max-width:700px) {
    .diagnostics-workspace--restored .weekly-diagnostic-diagnosis { padding:15px; }
    .diagnostics-workspace--restored .weekly-diagnostic-diagnosis h2 { font-size:19px; }
}
.home-ai-prompts {
    margin-top: 12px;
    padding: 13px 15px;
    border-color: var(--ui-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}
.home-ai-prompts > header small { display: none; }
.home-ai-prompts > div { gap: 0; border: 1px solid #e7ebe8; border-radius: 8px; overflow: hidden; }
.home-ai-prompts > div button { min-height: 42px; border: 0; border-radius: 0; background: #fff; }

/* ИИ-диагностика: сценарии сверху, компактный отчёт без общего KPI-дашборда. */
.diagnostics-workspace--focused { gap:12px; }
.weekly-change-focus { padding:18px; border-top:3px solid #d49a32; }
.weekly-change-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.weekly-change-grid > article { min-width:0; padding:14px; border:1px solid #eadfc8; border-radius:10px; background:#fffcf6; }
.weekly-change-card-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:10px; }
.weekly-change-card-head h3 { color:#493918; font-size:13px; line-height:1.35; }
.weekly-change-card-head strong { color:#176b4e; font-size:15px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.weekly-change-card-head strong.is-unconfirmed { color:#9a681c; font-size: 12px; }
.weekly-change-grid > article > p { display:-webkit-box; overflow:hidden; min-height:32px; margin:8px 0; color:#5d5546; font-size: 12px; line-height:1.45; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.weekly-change-start { display:grid; gap:2px; padding:8px 9px; border-radius:7px; background:#fff; }
.weekly-change-start span { color:#8a7651; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.weekly-change-start b { color:#5e513a; font-size: 12px; font-weight:650; line-height:1.4; }
.weekly-change-grid details { margin-top:5px; }
.weekly-change-grid summary { min-height:44px; display:flex; align-items:center; color:#80662f; font-size: 12px; font-weight: 700; cursor:pointer; }
.weekly-change-grid dl { display:grid; gap:6px; }
.weekly-change-grid dl div { display:grid; gap:2px; font-size: 12px; line-height:1.4; }
.weekly-change-grid dt { color:#8a7651; font-weight: 700; }
.weekly-change-grid dd { color:#665b48; }
.weekly-change-grid details > small { display:block; margin-top:7px; color:#9a681c; font-size: 12px; }
.weekly-diagnostic-diagnosis { padding:13px 16px; }
.weekly-diagnostic-diagnosis h2 { max-width:1440px; margin:5px 0 6px; font-size:16px; font-weight:700; line-height:1.42; }
.weekly-costs-compact { padding:16px 18px; }
.weekly-costs-compact .weekly-diagnostic-economics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.weekly-costs-compact .weekly-diagnostic-economics article { padding:11px 12px; }
.weekly-costs-compact .weekly-diagnostic-economics strong { font-size:17px; }
.weekly-inline-disclosure { min-height:44px; padding:8px 12px; border:1px solid #d4dfd9; border-radius:8px; background:#fff; color:#176b4e; font-size: 12px; font-weight: 700; cursor:pointer; }
.weekly-inline-disclosure:hover { background:#f6faf8; }
.weekly-inline-disclosure:focus-visible,.weekly-decision-toggle:focus-visible,.weekly-change-grid summary:focus-visible { outline:3px solid rgba(23,107,78,.2); outline-offset:2px; }
.weekly-decisions-section { gap:10px; }
.weekly-diagnostic-decisions { align-items:start; gap:10px; }
.weekly-diagnostic-decisions > article.weekly-decision-card { gap:9px; padding:15px; border-left:3px solid transparent; box-shadow:none; }
.weekly-diagnostic-decisions > article.weekly-decision-card:not(.is-expanded) { align-self:start; }
.weekly-diagnostic-decisions > article.weekly-decision-card.is-primary { border-left-color:#d49a32; background:#fffdf8; }
.weekly-diagnostic-decisions > article.weekly-decision-card > p { display:-webkit-box; overflow:hidden; min-height:34px; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.weekly-decision-card .weekly-diagnostic-first-step { min-height:90px; margin-top:0; }
.weekly-decision-toggle { min-height:44px; display:flex; align-items:center; justify-content:space-between; width:100%; padding:8px 0 0; border:0; border-top:1px solid #e4ebe7; background:transparent; color:#176b4e; font-size: 12px; font-weight: 700; text-align:left; cursor:pointer; }
.weekly-decision-toggle b { font-size:17px; font-weight:500; }
.weekly-decision-detail { display:grid; gap:9px; padding-top:2px; }
.weekly-decision-detail > div:first-child { display:grid; gap:3px; padding:9px 10px; border-radius:8px; background:#f4f7f5; }
.weekly-decision-detail > div:first-child > span { color:#176b4e; font-size: 12px; font-weight: 700; text-transform:uppercase; }
.weekly-decision-detail > div:first-child p { color:#607168; font-size: 12px; line-height:1.45; }
.weekly-decision-detail .weekly-priority-actions { grid-column:auto; }
.weekly-decision-detail .weekly-priority-dependency,.weekly-decision-detail .weekly-priority-controls,.weekly-decision-detail .weekly-task-editor { grid-column:auto; }

@media(max-width:1050px) {
    .weekly-change-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .weekly-costs-compact .weekly-diagnostic-economics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
    .weekly-change-focus,.weekly-costs-compact { padding:14px; }
    .weekly-change-grid,.weekly-diagnostic-decisions { grid-template-columns:1fr; }
    .weekly-change-card-head { grid-template-columns:1fr; gap:4px; }
    .weekly-change-card-head strong { white-space:normal; }
    .weekly-diagnostic-diagnosis { padding:12px 13px; }
    .weekly-diagnostic-diagnosis h2 { font-size:14px; }
    .weekly-diagnostic-section > header { align-items:stretch; flex-direction:column; gap:7px; }
    .weekly-diagnostic-section > header > small { text-align:left; }
    .weekly-inline-disclosure { width:100%; }
    .weekly-decision-card .weekly-diagnostic-first-step { min-height:0; }
}
@media(max-width:430px) {
    .weekly-costs-compact .weekly-diagnostic-economics { grid-template-columns:1fr 1fr; gap:6px; }
    .weekly-costs-compact .weekly-diagnostic-economics strong { font-size:15px; }
    .weekly-change-grid > article,.weekly-diagnostic-decisions > article.weekly-decision-card { padding:12px; }
}
.home-ai-prompts > div button + button { border-left: 1px solid #e7ebe8; }

/* ИИ-диагностика: короткий вывод, три действия и подробности по запросу. */
.diagnostics-workspace--simple { display:grid; gap:12px; }
.diagnostics-workspace--simple .weekly-diagnostic-toolbar span,.diagnostics-workspace--simple .weekly-diagnostic-toolbar label,.diagnostics-workspace--simple .weekly-diagnostic-toolbar small { font-size:12px; }
.diagnostics-workspace--simple .weekly-diagnostic-diagnosis { padding:18px 20px; border-left-width:3px; }
.diagnostics-workspace--simple .weekly-diagnostic-diagnosis h2 { max-width:1180px; margin:6px 0 0; font-size:clamp(17px,2vw,22px); line-height:1.4; }
.weekly-data-warning { display:inline-flex; width:fit-content; margin-top:12px; padding:8px 10px; border-radius:7px; background:#fff4dc; color:#7b5718 !important; font-size:14px !important; font-weight:650; }
.diagnostics-workspace--simple .weekly-diagnostic-decisions { grid-template-columns:1fr; }
.diagnostics-workspace--simple .weekly-diagnostic-decisions > article.weekly-decision-card { overflow:hidden; padding:0; border-left:3px solid #d7e2dc; }
.diagnostics-workspace--simple .weekly-diagnostic-decisions > article.weekly-decision-card.is-expanded { border-left-color:#176b4e; }
.weekly-decision-summary { width:100%; min-height:88px; display:grid; grid-template-columns:32px minmax(0,1fr) 24px; align-items:center; gap:12px; padding:14px 16px; border:0; background:#fff; text-align:left; cursor:pointer; }
.weekly-decision-summary:hover { background:#f8fbf9; }
.weekly-decision-summary:focus-visible,.weekly-section-toggle:focus-visible,.weekly-more-recommendations:focus-visible,.weekly-task-button:focus-visible { outline:3px solid rgba(23,107,78,.2); outline-offset:2px; }
.weekly-decision-summary > b { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#e8f3ed; color:#176b4e; font-size:12px; }
.weekly-decision-copy { min-width:0; display:grid; gap:3px; }
.weekly-decision-copy small { color:#738178; font-size:12px; font-weight: 700; text-transform:uppercase; }
.weekly-decision-copy strong { color:#19392c; font-size:16px; line-height:1.35; }
.weekly-decision-copy em { color:#607168; font-size:14px; font-style:normal; line-height:1.4; overflow-wrap:anywhere; }
.weekly-decision-owner { display:grid; gap:2px; justify-items:end; text-align:right; }
.weekly-decision-owner strong { color:#344f43; font-size:14px; }
.weekly-decision-owner small { color:#7a8981; font-size:12px; }
.weekly-decision-summary > i { color:#718078; font-size:18px; font-style:normal; }
.diagnostics-workspace--simple .weekly-decision-detail { gap:10px; padding:14px 16px 16px 60px; border-top:1px solid #e7ece9; background:#fbfcfb; }
.diagnostics-workspace--simple .weekly-decision-detail > div { display:grid; gap:3px; padding:9px 10px; border-radius:8px; background:#f4f7f5; }
.diagnostics-workspace--simple .weekly-decision-detail > div > span { color:#176b4e; font-size:12px; font-weight: 700; text-transform:uppercase; }
.diagnostics-workspace--simple .weekly-decision-detail > div p { color:#53685e; font-size:14px; line-height:1.5; }
.diagnostics-workspace--simple .weekly-priority-actions li { grid-template-columns:minmax(90px,180px) minmax(0,1fr); }
.diagnostics-workspace--simple .weekly-priority-actions li > b { overflow-wrap:anywhere; font-size:13px; }
.diagnostics-workspace--simple .weekly-priority-actions span { font-size:14px; }
.diagnostics-workspace--simple .weekly-priority-actions small { font-size:12px; }
.weekly-priority-check { padding:8px 10px; border-radius:7px; background:#eef5f1; color:#52675d; font-size:14px; line-height:1.45; }
.weekly-priority-owner-line { display:flex; flex-wrap:wrap; gap:5px 14px; color:#607168; font-size:14px; }
.weekly-task-button,.weekly-more-recommendations { min-height:42px; padding:8px 12px; border:1px solid #cddbd4; border-radius:8px; background:#fff; color:#176b4e; font-size:14px; font-weight: 700; cursor:pointer; }
.weekly-task-button:hover,.weekly-more-recommendations:hover { background:#f4f8f6; }
.weekly-more-recommendations { justify-self:center; min-width:190px; }
.diagnostics-workspace--simple .weekly-diagnostic-section.glass-panel { overflow:hidden; padding:0; }
.weekly-section-toggle { width:100%; min-height:70px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 16px; border:0; background:#fff; text-align:left; cursor:pointer; }
.weekly-section-toggle:hover { background:#f8fbf9; }
.weekly-section-toggle > span { min-width:0; display:grid; gap:2px; }
.weekly-section-toggle small { color:#176b4e; font-size:12px; font-weight: 700; letter-spacing:.07em; text-transform:uppercase; }
.weekly-section-toggle strong { color:#294338; font-size:16px; }
.weekly-section-toggle em { color:#718078; font-size:12px; font-style:normal; }
.weekly-section-toggle > b { color:#718078; font-size:18px; font-weight:500; }
.weekly-report-evidence { display:grid; gap:16px; padding:0 16px 16px; border-top:1px solid #e7ede9; }
.weekly-report-evidence .weekly-diagnostic-facts { margin-top:14px; }
.weekly-report-scenarios { display:grid; gap:9px; }
.weekly-report-evidence .weekly-diagnostic-facts h3,.weekly-report-scenarios > h3 { color:#294338; font-size:14px; }
.weekly-report-evidence .weekly-diagnostic-facts p,.weekly-report-evidence .weekly-diagnostic-scenarios p { font-size:14px; line-height:1.5; }
.weekly-report-evidence .weekly-diagnostic-scenarios dl div { font-size:13px; }
.weekly-report-evidence .weekly-diagnostic-scenarios > article > small { font-size:12px; }
.weekly-report-note { color:#718078; font-size:13px; }

@media(max-width:700px) {
    .weekly-decision-summary { grid-template-columns:28px minmax(0,1fr) 20px; gap:9px; padding:12px; }
    .weekly-decision-owner { grid-column:2; justify-items:start; text-align:left; }
    .weekly-decision-summary > i { grid-column:3; grid-row:1/3; }
    .weekly-decision-copy em { white-space:normal; }
    .diagnostics-workspace--simple .weekly-decision-detail { padding:12px; }
    .diagnostics-workspace--simple .weekly-priority-actions li { grid-template-columns:1fr; }
    .weekly-data-warning { width:100%; }
}

@media(max-width:430px) {
    .diagnostics-workspace--simple .weekly-diagnostic-diagnosis { padding:14px; }
    .diagnostics-workspace--simple .weekly-diagnostic-diagnosis h2 { font-size:16px; }
    .weekly-decision-summary { min-height:82px; }
    .weekly-section-toggle { min-height:64px; padding:11px 12px; }
}

/* Tailwind-экраны получают ту же плотность карточек и таблиц. */
.workspace-page-header { margin-bottom: 16px; padding: 8px 0 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.workspace-page > .grid,
.workspace-page > section.grid { gap: 12px !important; }
.workspace-page > .grid > .glass-panel,
.workspace-page > section.grid > .glass-panel,
.workspace-page > section.grid > article.glass-panel,
.workspace-page .workspace-mode-grid > .glass-panel { padding: 18px; border-radius: 12px; box-shadow: none; }
.workspace-page > .glass-panel:not(.workspace-hero),
.workspace-page > section.glass-panel:not(.workspace-hero),
.workspace-page > details.glass-panel { border-radius: 10px; box-shadow: none; }
.workspace-page table thead { background: #f5f7f6; }
.workspace-page table th { color: var(--ui-muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.workspace-page table td { border-color: #e9edea; }
.abc-matrix > button { border-radius: 8px; background: #f7f9f8; }
.abc-matrix > button:hover,.abc-matrix > button.is-active { color: var(--ui-primary); border-color: #a9c4b6; background: var(--ui-primary-soft); }


/* Шкала текста и элементов управления для рабочих экранов. */
.v2-app-shell :is(.text-\[8px\],.text-\[9px\],.text-\[10px\],.text-\[11px\]) { font-size: 12px; line-height: 1.45; }
.ui-dialog :is(.text-\[8px\],.text-\[9px\],.text-\[10px\],.text-\[11px\]) { font-size: 12px; line-height: 1.45; }
.ui-dialog .text-slate-400 { color: var(--ui-muted); }
.ui-dialog :is(.text-indigo-500,.text-indigo-600,.text-indigo-700,.text-indigo-900) { color: var(--ui-primary); }
.ui-dialog .border-indigo-500 { border-color: var(--ui-primary); }
.ui-dialog .border-indigo-200 { border-color: var(--ui-border-strong); }
.ui-dialog .bg-indigo-50 { background: var(--ui-primary-soft); }
.ui-dialog .bg-indigo-600 { background: var(--ui-primary); }
body:has([aria-modal="true"]) #scroll-to-top { visibility: hidden; pointer-events: none; }
.ui-dialog button[aria-label="Закрыть карточку"] { min-width: 44px; min-height: 44px; border-radius: 8px; }
.ui-dialog button[aria-label="Закрыть карточку"]:hover { background: var(--ui-surface-muted); }
.ui-dialog :is(button,input,select):focus-visible { outline: 2px solid var(--ui-primary); outline-offset: 2px; }
.v2-app-shell .text-slate-400 { color: #64756c; }
.v2-app-shell :is(.workspace-page,.home-dashboard,.overview-page) { overflow-wrap: break-word; }
.v2-app-shell :is(input,select,textarea):focus-visible { outline: 2px solid var(--ui-primary); outline-offset: 2px; }
.v2-app-shell :is(input[type="checkbox"],input[type="radio"]) { accent-color: var(--ui-primary); }
.v2-app-shell :is(.btn-primary,.btn-secondary,.dashboard-secondary-button,.dashboard-primary-button,.workspace-page-header__reload) { min-height: 40px; font-weight: 600; }
.v2-app-shell :is(.workspace-page,.home-dashboard) :is(td,dd,.tabular-nums) { font-variant-numeric: tabular-nums; }
.workspace-page table td { font-size: 13px; }
.workspace-page table td :is(button,input,select) { font-size: inherit; }
.workspace-page table th button { min-height: 28px; }
.workspace-page table tbody tr:focus-within { background: var(--ui-primary-soft); }
.workspace-page :is(.overflow-x-auto,.table-scroll-container) { overscroll-behavior-inline: contain; scrollbar-width: thin; }
.workspace-page-header__description,.home-dashboard-heading > p { max-width: 760px; line-height: 1.55; }
.sales-toolbar { border-radius: 12px; box-shadow: none; }
.sales-item-link { min-height: 32px; }
.all-sections-group button strong { font-size: 13px; font-weight: 600; }
.all-sections-group-header h2 { font-size: 15px; font-weight: 600; }
.all-sections-group > div > button { min-height: 70px; padding: 12px; }
.all-sections-group-header { min-height: 100px; padding: 16px; }
.all-sections-group-header p { line-height: 1.5; }
.all-sections-group { box-shadow: none; }
.all-sections-group:not(:has(> div)) { grid-column: 1 / -1; }
.all-sections-group:not(:has(> div)) .all-sections-group-header { min-height: 70px; border-bottom: 0; align-items: center; background: var(--ui-surface); }
.all-sections-search input { font-size: 13px; }
.all-sections-search .navigation-icon { width: 18px; height: 18px; color: var(--ui-primary); flex-shrink: 0; }
@media (min-width: 901px) and (max-width: 1250px) {
    .sales-primary-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; }
    .sales-primary-filters > input { grid-column: 1 / 3; grid-row: 2; }
    .sales-primary-filters > button:not(:last-child) { grid-column: 3; grid-row: 1; }
    .sales-primary-filters > button:last-child { grid-column: 3; grid-row: 2; }
}
@media (max-width: 640px) {
    .workspace-page-header { padding: 4px 0 12px; }
    .workspace-page-header__side { gap: 8px; flex-wrap: wrap; }
    .workspace-page-header__meta { flex: 1; }
    .workspace-page :is(.btn-primary,.btn-secondary),.dashboard-secondary-button,.workspace-page-header__reload { min-height: 44px; }
    .workspace-page table td { font-size: 12px; }
    .home-dashboard-heading > p { font-size: 13px; }
    .home-dashboard-actions { flex-wrap: wrap; }
    .sales-favorite-button { width: 40px; height: 40px; }
    .primary-nav-mobile { padding-bottom: env(safe-area-inset-bottom,0px); }
}

/* Шапка остаётся однострочной: поиск сжимается, период и аккаунт не перекрываются. */
.v2-app-shell .app-header-shell { container: app-header / inline-size; }
.v2-app-shell .app-header-main {
    display: grid;
    grid-template-columns: minmax(260px,1fr) max-content max-content;
    align-items: center;
    gap: 12px;
}
.v2-app-shell .app-assistant-command { width: 100%; min-width: 0; grid-column: 1; grid-row: 1; }
.v2-app-shell .app-header-context { min-width: 0; margin-left: 0; grid-column: 2; grid-row: 1; }
.v2-app-shell .app-header-account { grid-column: 3; grid-row: 1; }

@container app-header (max-width: 1650px) {
    .v2-app-shell .app-header-main { grid-template-columns: minmax(220px,1fr) max-content max-content; gap: 8px; }
    .v2-app-shell .header-period { gap: 5px; }
    .v2-app-shell .header-period-presets button { padding-inline: 9px; }
    .v2-app-shell .header-period-custom summary { min-width: 200px; }
    .v2-app-shell .app-header-account { gap: 5px; }
    .v2-app-shell .app-user > span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@container app-header (max-width: 1400px) {
    .v2-app-shell .header-period-presets button { padding-inline: 7px; }
    .v2-app-shell .header-period-custom summary { min-width: 180px; }
    .v2-app-shell .app-connection { width: 40px; padding-inline: 0; justify-content: center; }
    .v2-app-shell .app-connection > span:last-child { display: none; }
    .v2-app-shell .app-user > span { max-width: 96px; }
}

@container app-header (max-width: 1100px) {
    .v2-app-shell .app-header-main { grid-template-columns: 46px minmax(0,1fr) max-content; }
    .v2-app-shell .app-assistant-command { width: 46px; min-width: 46px; display: flex; justify-content: center; padding: 0; }
    .v2-app-shell .app-assistant-command > span { display: none; }
    .v2-app-shell .app-assistant-command-icon { display: none; }
    .v2-app-shell .app-assistant-command > b { width: 44px; height: 44px; margin: 0; border-radius: 8px; }
    .v2-app-shell .app-header-context { grid-column: 2; }
    .v2-app-shell .app-header-account { grid-column: 3; }
}

@media (max-width: 1180px) {
    .home-dashboard-widget { grid-column: span 6; }
    .home-dashboard.is-columns-1 .home-dashboard-widget { grid-column: span 12; }
    .home-dashboard.is-columns-2 .home-dashboard-widget,
    .home-dashboard.is-columns-3 .home-dashboard-widget,
    .home-dashboard.is-columns-4 .home-dashboard-widget,
    .home-dashboard.is-columns-6 .home-dashboard-widget { grid-column: span 6; }
    .home-dashboard-widget:has(.home-dashboard-chart),
    .home-dashboard-widget.is-widget-ratingsOverview { grid-column: span 12; }
}
@media (max-width: 900px) {
    .v2-app-shell,
    .v2-app-shell:has(.primary-navigation.is-collapsed),
    .v2-app-shell:has(.primary-navigation:not(.is-collapsed)) { padding-left: 0; }
    .v2-app-shell .app-shell-header { padding: 10px 14px 6px; }
    body { overflow-x: hidden; }
    .v2-app-shell .app-header-main { width: 100%; min-width: 0; display: flex; flex-wrap: wrap; }
    .v2-app-shell .app-assistant-command { width: 100%; min-width: 0; max-width: 100%; flex: 1 0 100%; order: 1; justify-content: flex-start; padding: 0 0 0 12px; }
    .v2-app-shell .app-assistant-command > span { display: block; text-align: left; }
    .v2-app-shell .app-assistant-command-icon { display: block; }
    .v2-app-shell .app-assistant-command > b { border-radius: 0 8px 8px 0; }
    .v2-app-shell .app-header-context { width: min(100%,320px); min-width: 0; margin: 0; order: 2; }
    .v2-app-shell .app-header-account { min-width: 0; margin-left: auto; order: 2; }
    .header-period,.header-period-custom { width: 100%; min-width: 0; }
    .header-period-custom summary { min-width: 0; }
    .home-dashboard,.workspace-page,.overview-page,#app > main:not(.overview-page) { padding-inline: 16px !important; }
}
@media (max-width: 640px) {
    .home-dashboard,.workspace-page,.overview-page,#app > main:not(.overview-page) { padding-inline: 12px !important; }
    .home-dashboard-widget { grid-column: span 12; }
    .home-dashboard[class*="is-columns-"] .home-dashboard-widget { grid-column: span 12; }
    .home-dashboard-grid { grid-auto-rows: 120px; gap: 12px; }
    .home-widget-metric-layout { grid-template-columns: 44px minmax(0,1fr); }
    .home-dashboard[class*="is-columns-"] .home-dashboard-widget:has(.home-widget-metric-layout) { grid-column: span 6; }
    .home-widget-metric-layout { display: block; }
    .home-widget-metric-icon { display: none; }
    .home-widget-metric-copy .home-widget-value { font-size: clamp(16px,4.5vw,20px); white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
    .home-widget-metric-label { font-size: 12px; }
    .home-dashboard-edit-note { align-items: stretch; flex-direction: column; }
    .home-dashboard-density { width: 100%; margin-left: 0; flex-wrap: wrap; }
    .home-dashboard-density legend { width: 100%; }
    .home-dashboard-columns { justify-content: flex-start; }
    .home-attention > header { align-items: flex-start; flex-direction: column; gap: 5px; }
    .home-attention-list > button { min-height: 52px; }
    .home-ai-prompts > div { display: block; }
    .home-ai-prompts > div button + button { border-top: 1px solid #e7ebe8; border-left: 0; }
    .v2-app-shell .app-header-account { gap: 5px; }
    .v2-app-shell .app-connection { display: none; }
    .v2-app-shell .app-user > span { display: none; }
    .v2-app-shell .app-user { padding-left: 0; }
    .v2-app-shell .app-user button { min-height: 40px; }
}

/* Финансовый обзор: плотная управленческая раскладка без скрытых внутренних вкладок. */
.finance-overview { display: grid; gap: 14px; }
.finance-overview button { font-family: inherit; }
.finance-overview-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.finance-overview-kpis > button { min-width: 0; min-height: 112px; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 11px; padding: 18px; text-align: left; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-surface); cursor: pointer; transition: border-color .16s; }
.finance-overview-kpis > button:hover { border-color: #a9c4b6; }
.finance-overview-kpis > button:focus-visible,.finance-overview-card button:focus-visible { outline: 3px solid rgba(23,107,78,.2); outline-offset: 2px; }
.finance-kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ui-primary); border: 1px solid #bdd2c7; border-radius: 50%; background: #f5faf7; font-size: 17px; font-weight: 700; }
.finance-kpi-copy { min-width: 0; display: grid; gap: 5px; }
.finance-kpi-copy small { color: #52625a; font-size: 12px; font-weight: 700; }
.finance-kpi-copy strong { overflow: hidden; color: var(--ui-ink); font-size: clamp(18px,1.65vw,25px); line-height: 1.1; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.finance-kpi-copy em { color: #7b8981; font-size: 12px; font-style: normal; line-height: 1.35; }
.finance-overview-kpis > button.is-risk .finance-kpi-copy em { color: #c54538; }
.finance-overview-main-grid { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(0,1fr) minmax(260px,.78fr); gap: 12px; }
.finance-overview-bottom-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.finance-overview-card { min-width: 0; padding: 18px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-surface); }
.finance-overview-card > header { min-height: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.finance-overview-card > header h2 { margin: 0; color: var(--ui-ink); font-size: 14px; font-weight: 700; letter-spacing: -.015em; }
.finance-overview-card > header small { color: var(--ui-subtle); font-size: 12px; }
.finance-overview-card > header > button { min-height: 28px; color: var(--ui-primary); border: 0; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.finance-breakdown-row { width: 100%; min-height: 42px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 12px; padding: 7px 0; color: #405048; border: 0; background: transparent; cursor: pointer; font-size: 13px; text-align: left; }
.finance-breakdown-row > i { grid-column: 1 / -1; grid-row: 2; height: 4px; overflow: hidden; border-radius: 2px; background: #eef3f0; }
.finance-breakdown-row > i b { height: 100%; display: block; border-radius: inherit; background: #8dbca4; }
.finance-breakdown-row.is-income > i b { background: #176b4e; }.finance-breakdown-row.is-result > i b { background: #315d4d; }.finance-breakdown-row.is-loss > i b { background: #d76557; }
.finance-breakdown-row > strong { color: #2f3c35; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.finance-breakdown-row.is-result,.finance-breakdown-row.is-loss { margin-top: 5px; padding-top: 8px; border-top: 1px solid var(--ui-border); font-weight: 700; }
.finance-result-chart > div { position: relative; height: 232px; }
.finance-attention-card > div { display: grid; gap: 8px; }
.finance-attention-card > div > button { min-height: 48px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; text-align: left; color: #3f4d46; border: 1px solid #e4e9e6; border-radius: 11px; background: #fff; cursor: pointer; }
.finance-attention-card > div > button > i { width: 26px; height: 26px; display: grid; place-items: center; color: var(--ui-primary); border-radius: 50%; background: var(--ui-primary-soft); font-style: normal; font-weight: 700; }
.finance-attention-card > div > button.is-risk > i { color: #bd3f34; background: #fff0ed; }.finance-attention-card > div > button.is-warning > i { color: #b26a17; background: #fff7e8; }
.finance-attention-card > div > button > span { font-size: 12px; font-weight: 700; line-height: 1.35; }.finance-attention-card > div > button > b { color: #87928c; font-size: 18px; }
.finance-revenue-structure > div + div { margin-top: 13px; }.finance-revenue-structure p { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; color: #536159; font-size: 12px; }.finance-revenue-structure p strong { color: #33423a; font-size: 12px; }
.finance-revenue-structure > div > i { height: 8px; display: block; overflow: hidden; border-radius: 999px; background: #e8f0eb; }.finance-revenue-structure > div > i b { height: 100%; display: block; border-radius: inherit; background: #176b4e; }.finance-revenue-structure > div > i b.is-aggregator { background: #8abd9f; }
.finance-top-expenses > button,.finance-problem-days > button { width: 100%; min-height: 34px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; padding: 5px 0; color: #526159; text-align: left; border: 0; border-bottom: 1px solid #edf0ee; background: transparent; cursor: pointer; font-size: 12px; }
.finance-top-expenses > button strong,.finance-problem-days > button strong { color: #2f3d35; font-variant-numeric: tabular-nums; }.finance-top-expenses > button small { min-width: 39px; color: #869089; text-align: right; }
.finance-problem-days > button { grid-template-columns: minmax(0,1fr) auto; }.finance-problem-days > button strong { color: #c8463a; }
.finance-data-ready > header > strong { color: var(--ui-primary); font-size: 12px; }.finance-data-ready > p { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 5px 0; color: #536159; font-size: 12px; }.finance-data-ready > p b { font-size: 12px; }.finance-data-ready > p b.is-ready { color: #187050; }.finance-data-ready > p b.is-missing { color: #b56b18; }.finance-data-ready > button { min-height: 36px; margin-top: 5px; padding: 0; color: var(--ui-primary); text-align: left; border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.finance-overview-ok { min-height: 82px; display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0; color: #39745c; }.finance-overview-ok > i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #e9f5ee; font-style: normal; }.finance-overview-ok span b,.finance-overview-ok span small { display: block; }.finance-overview-ok span b { font-size: 12px; }.finance-overview-ok span small { margin-top: 2px; color: #7a8981; font-size: 12px; }.finance-overview-ok.compact { min-height: 110px; }
.finance-overview-empty { min-height: 100px; display: grid; place-items: center; margin: 0; color: var(--ui-subtle); font-size: 12px; }
.finance-overview-loading { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }.finance-overview-loading span { height: 112px; border-radius: 16px; background: linear-gradient(90deg,#edf1ef,#f7f9f8,#edf1ef); background-size: 200% 100%; animation: skeleton-shimmer 1.4s infinite; }
@media (max-width: 1180px) { .finance-overview-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }.finance-overview-main-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.finance-attention-card { grid-column: 1 / -1; }.finance-overview-bottom-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.finance-overview-loading { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 760px) { .finance-overview-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }.finance-overview-main-grid,.finance-overview-bottom-grid { grid-template-columns: 1fr; }.finance-attention-card { grid-column: auto; }.finance-result-chart > div { height: 210px; }.finance-overview-loading { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 430px) { .finance-overview-kpis { grid-template-columns: 1fr; }.finance-overview-kpis > button { min-height: 96px; }.finance-breakdown-row { gap: 5px 8px; }.finance-overview-loading { grid-template-columns: 1fr; } }

/* Единая детализация финансов. */
.finance-expenses-page { max-width: 1400px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; color: #263e33; }
.finance-expenses-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.finance-expenses-heading h1 { font-size: 28px; font-weight: 700; margin: 4px 0; }
.finance-expenses-heading p, .finance-expenses-panel header p { color: #76847b; font-size: 13px; }
.finance-expenses-eyebrow { font-size: 12px !important; text-transform: uppercase; letter-spacing: .12em; }
.finance-expenses-channel-tabs { align-self: flex-start; max-width: 100%; }
.finance-expenses-channel-tabs .channel-tab { min-width: 0; padding-inline: 10px; }
.finance-expenses-channel-note { padding: 16px; border: 1px solid #dce8e1; border-radius: 12px; background: #f2f7f4; font-size: 13px; color: #53675b; }
.finance-expenses-channel-note p + p { margin-top: 8px; }
.finance-expenses-channel-note button { margin-top: 12px; }
.finance-expenses-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.finance-expenses-metrics article { padding: 20px; }
.finance-expenses-metrics p { font-size: 12px; color: #758479; margin-bottom: 8px; }
.finance-expenses-metrics strong { font-size: clamp(18px,2vw,28px); font-weight: 700; font-variant-numeric: tabular-nums; }
.finance-expenses-metrics .is-result { background: #eaf4ee; }
.finance-expenses-metrics .is-loss { background: #fff0ed; color: #a44035; }
.finance-expenses-panel { padding: 24px; min-width: 0; }
.finance-expenses-panel header { margin-bottom: 20px; }
.finance-expenses-panel h2 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.finance-expenses-panel h3 { font-size: 13px; font-weight: 700; }
.finance-expenses-notice { background: #fff8e7; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #83622c; }
.finance-expenses-ring-layout { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.6fr); align-items: center; gap: 32px; }
.finance-expenses-ring { position: relative; width: min(100%,330px); margin: 0 auto; }
.finance-expenses-ring svg { width: 100%; display: block; }
.finance-expenses-ring-total { position: absolute; inset: 31% 18%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.finance-expenses-ring-total small { font-size: 12px; color: #76847b; }
.finance-expenses-ring-total strong { margin-top: 7px; font-size: clamp(17px,1.8vw,23px); white-space: nowrap; }
.finance-expenses-legend { list-style: none; padding: 0; margin: 0; }
.finance-expenses-legend li { display: grid; grid-template-columns: 10px minmax(0,1fr) auto 52px; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1ee; font-size: 13px; }
.finance-expenses-legend i { width: 9px; height: 9px; border-radius: 50%; }
.finance-expenses-legend span { overflow-wrap: anywhere; }
.finance-expenses-legend em { font-style: normal; text-align: right; color: #78857d; font-size: 12px; }
.finance-expenses-legend small, .finance-expenses-article-name small { display: block; font-size: 12px; color: #849188; font-weight: 400; }
.finance-expenses-corrections { margin-top: 18px; padding: 16px; border-radius: 12px; background: #f3f7f4; }
.finance-expenses-corrections p, .finance-expenses-payroll p, .finance-expenses-manual { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13px; }
.finance-expenses-corrections small, .finance-expenses-payroll small { font-size: 12px; color: #738177; }
.finance-expenses-table-head { display: grid; grid-template-columns: 1.4fr 1fr minmax(130px,.65fr); gap: 20px; color: #7b8980; font-size: 12px; padding-bottom: 10px; }
.finance-expenses-table-head span:last-child { text-align: right; }
.finance-expenses-group-heading { display: grid; grid-template-columns: 1.4fr 1fr minmax(130px,.65fr); align-items: center; gap: 20px; margin-top: 18px; padding: 16px 12px; background: #edf4ef; border-radius: 10px; scroll-margin-top: 100px; }
.finance-expenses-group-heading h3 { margin: 0; font-size: 15px; font-weight: 700; color: #234936; }
.finance-expenses-group-heading > div > small { display: block; margin-top: 4px; font-size: 11px; color: #6d7d72; }
.finance-expenses-group-heading > strong { text-align: right; font-size: 14px; white-space: nowrap; }
.finance-expenses-article { border-top: 1px solid #e7ede9; scroll-margin-top: 100px; }
.finance-expenses-article:not([open]) > :not(summary) { display: none; }
.finance-expenses-article summary { display: grid; grid-template-columns: 1.4fr 1fr minmax(130px,.65fr); gap: 20px; align-items: center; padding: 17px 0; cursor: pointer; list-style: none; font-size: 14px; }
.finance-expenses-article summary::-webkit-details-marker { display: none; }
.finance-expenses-article summary > strong { text-align: right; font-size: 14px; white-space: nowrap; }
.finance-expenses-article summary > strong span { color: #91a096; margin-left: 8px; }
.finance-expenses-article[open] > summary > strong span { display: inline-block; transform: rotate(180deg); }
.finance-expenses-group-body { padding-left: 14px; border-left: 2px solid #dce8e1; margin-bottom: 14px; }
.finance-expenses-article summary:focus-visible { outline: 2px solid #176b4e; outline-offset: 3px; border-radius: 4px; }
.finance-expenses-bar { display: flex; align-items: center; gap: 12px; }
.finance-expenses-bar i { flex: 1; height: 9px; background: #edf3ef; border-radius: 3px; overflow: hidden; }
.finance-expenses-bar b { display: block; height: 100%; background: #8eb9a4; border-radius: 3px; }
.finance-expenses-bar small { width: 48px; text-align: right; font-size: 12px; color: #7b8980; }
.finance-expenses-article.is-income .finance-expenses-bar b { background: #176b4e; }
.finance-expenses-detail { padding: 4px 16px 20px; background: #f7faf8; border-radius: 10px; margin-bottom: 12px; }
.finance-expenses-detail > p { font-size: 12px; color: #6d7d72; padding: 12px 0; }
.finance-expenses-records { overflow: auto; max-height: 420px; margin: 6px 0 12px; }
.finance-expenses-records table { border-collapse: collapse; width: 100%; font-size: 12px; }
.finance-expenses-records th, .finance-expenses-records td { padding: 10px 8px; border-bottom: 1px solid #e5ece7; text-align: left; }
.finance-expenses-records th { position: sticky; top: 0; background: #f0f5f2; font-size: 12px; }
.finance-expenses-records td:first-child { white-space: nowrap; }
.finance-expenses-records td:last-child, .finance-expenses-records th:last-child { text-align: right; white-space: nowrap; }
.finance-expenses-payroll { margin-top: 18px; border-top: 1px solid #dfe9e2; padding-top: 16px; }
.finance-expenses-payroll strong { white-space: nowrap; }
.finance-expenses-manual small { display: block; }
.finance-expenses-result { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 20px; border-top: 2px solid #dfe8e2; font-weight: 700; }
.finance-expenses-sources { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.finance-expenses-sources article { padding: 12px; border-radius: 10px; background: #f5f7f5; border-left: 3px solid #b6c3ba; }
.finance-expenses-sources article.is-ready { border-color: #4d9471; }
.finance-expenses-sources article.is-error { border-color: #c07c61; }
.finance-expenses-sources p { font-size: 12px; margin: 6px 0; }
.finance-expenses-sources small { display: block; font-size: 12px; color: #7b8980; overflow-wrap: anywhere; }
.finance-expenses-empty { padding: 30px 0; color: #7b8980; text-align: center; font-size: 14px; }
@media (max-width: 700px) {
  .finance-expenses-page { padding: 16px 12px; gap: 14px; }
  .finance-expenses-heading { align-items: flex-start; }
  .finance-expenses-heading h1 { font-size: 23px; }
  .finance-expenses-heading .btn-secondary { font-size: 12px; padding: 8px; }
  .finance-expenses-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .finance-expenses-metrics article { padding: 14px 12px; }
  .finance-expenses-panel { padding: 16px; }
  .finance-expenses-ring-layout { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .finance-expenses-ring { max-width: 280px; }
  .finance-expenses-legend li { grid-template-columns: 8px minmax(0,1fr) auto; gap: 8px; }
  .finance-expenses-legend li em { grid-column: 3; font-size: 12px; margin-top: -6px; }
  .finance-expenses-table-head { display: none; }
  .finance-expenses-group-heading { grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 12px 10px; }
  .finance-expenses-group-heading h3 { font-size: 14px; }
  .finance-expenses-group-heading > strong { font-size: 12px; }
  .finance-expenses-article summary { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .finance-expenses-article summary > strong { font-size: 12px; }
  .finance-expenses-bar { grid-column: 1 / -1; grid-row: 2; }
  .finance-expenses-detail { padding: 4px 10px 14px; }
  .finance-expenses-payroll p { flex-direction: column; gap: 4px; }
}

.finance-expenses-sector { pointer-events: visiblePainted; cursor: help; }
.finance-expenses-sector:focus-visible { outline: none; stroke-width: 30; }
.finance-expenses-tooltip { position: absolute; z-index: 3; width: 208px; max-width: calc(100% - 16px); padding: 12px 14px; background: #203b30; color: #fff; border-radius: 10px; box-shadow: 0 8px 24px #173c3026; pointer-events: none; }
.finance-expenses-tooltip span, .finance-expenses-tooltip strong, .finance-expenses-tooltip small { display: block; }
.finance-expenses-tooltip span { font-size: 12px; }
.finance-expenses-tooltip strong { font-size: 18px; margin: 4px 0; }
.finance-expenses-tooltip small { font-size: 12px; color: #d2e5db; }

/* Два независимых цеха, общий временной масштаб и слои. */
.live-kitchen-layers { display:flex; flex-wrap:wrap; gap:12px 20px; margin-bottom:8px; }
.live-kitchen-layers label { display:flex; align-items:center; gap:8px; min-height:36px; font-size:13px; color:#475569; cursor:pointer; }
.live-kitchen-layers input { accent-color:#7c3aed; width:16px; height:16px; }
.live-kitchen-chart-note { color:#64748b; font-size:12px; line-height:1.5; margin:8px 0; }
.live-kitchen-station-chart { margin-top:16px; padding-top:12px; border-top:1px solid #e2e8f0; min-width:0; }
.live-kitchen-chart-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.live-kitchen-chart-heading strong { font-size:15px; }
.live-kitchen-chart-heading span { display:flex; align-items:center; gap:8px; color:#64748b; font-size: 12px; }
.live-kitchen-chart-heading i { width:18px; border-top:2px solid; }
.live-kitchen-chart-heading .is-capacity { border-top:2px dashed #94a3b8; margin-left:6px; }
.live-kitchen-canvas { position:relative; height:280px; min-width:0; }
.live-kitchen-area-hint { min-height:36px; }
.live-kitchen-chart-heading span { flex-wrap:wrap; }
.live-kitchen-legend-button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:3px; border-radius:4px; }
.live-kitchen-legend-button:hover { background:#f1f5f9; }
.live-kitchen-legend-button.is-hidden { opacity:0.5; text-decoration:line-through; }
.live-kitchen-legend-button:focus-visible { outline:2px solid #7c3aed; outline-offset:2px; }
.live-preorder-plan { padding:16px; margin:12px 0 20px; border:1px solid #ddd6fe; border-radius:12px; background:#faf9ff; color:#334155; font-size:13px; line-height:1.5; }
.live-preorder-toolbar, .live-preorder-time, .live-preorder-totals { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.live-preorder-toolbar p, .live-preorder-help { color:#64748b; font-size:12px; margin:6px 0; }
.live-preorder-time input { border:1px solid #cbd5e1; background:white; border-radius:6px; padding:6px; margin-left:4px; }
.live-preorder-time button { background:white; border:1px solid #cbd5e1; padding:8px; border-radius:6px; font-size:12px; }
.live-preorder-totals { justify-content:flex-start; margin:14px 0; }
.live-preorder-buckets { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:12px 0; }
.live-preorder-buckets article { background:white; border:1px solid #e2e8f0; border-radius:8px; padding:12px; }
.live-preorder-buckets article > strong, .live-preorder-buckets article > span { display:block; }
.live-preorder-buckets article > span { color:#64748b; margin:4px 0 10px; }
.live-preorder-buckets dl > div { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px; }
.live-preorder-buckets dl > div:first-child { color:#c2410c; }
.live-preorder-buckets dl > div:last-child { color:#6d28d9; }
.live-preorder-caution { padding:8px 10px; margin:8px 0; border-radius:6px; background:#fffbeb; color:#92400e; font-size:12px; }
@media(max-width:700px) { .live-preorder-buckets { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:400px) { .live-preorder-plan { padding:10px; } .live-preorder-buckets { gap:6px; } .live-preorder-buckets article { padding:8px; } }
@media (max-width:480px) { .live-kitchen-canvas { height:240px; } .live-kitchen-chart-heading { align-items:flex-start; } }

/* Ежедневная финансовая сверка */
.daily-finance-page { display:grid; gap:18px; min-width:0; }
.daily-finance-page > * { min-width:0; }
.daily-finance-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.daily-finance-heading h1 { margin:3px 0 5px; color:#0f172a; font-size:clamp(26px,3vw,38px); font-weight: 700; letter-spacing:-.035em; }
.daily-finance-heading p { margin:0; color:#64748b; font-size:13px; }
.daily-finance-eyebrow { color:#176b4e !important; font-size: 12px !important; font-weight: 700; letter-spacing:.12em; text-transform:uppercase; }
.daily-finance-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.daily-finance-summary article { min-width:0; padding:16px 18px; }
.daily-finance-summary span { display:block; color:#64748b; font-size:12px; font-weight:650; }
.daily-finance-summary strong { display:block; margin-top:6px; color:#0f172a; font-size:clamp(18px,2vw,25px); font-variant-numeric:tabular-nums; }
.daily-finance-summary .is-loss strong { color:#be123c; }
.daily-finance-notice { display:flex; flex-wrap:wrap; gap:7px 16px; padding:13px 16px; border:1px solid #c7ddd2; border-radius:14px; background:#f2f8f5; color:#3f6152; font-size:12px; line-height:1.45; }
.daily-finance-notice strong { color:#174f39; }
.daily-finance-notice.is-error { border-color:#fecdd3; background:#fff1f2; color:#9f1239; }
.daily-finance-panel { overflow:hidden; padding:0; }
.daily-finance-panel > header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:18px 20px; border-bottom:1px solid #e2e8f0; }
.daily-finance-panel h2 { margin:0; color:#0f172a; font-size:17px; font-weight: 700; }
.daily-finance-panel header p { max-width:820px; margin:5px 0 0; color:#64748b; font-size:12px; line-height:1.5; }
.daily-finance-row-count { flex:none; padding:5px 9px; border-radius:999px; background:#eef5f1; color:#176b4e; font-size: 12px; font-weight: 700; }
.daily-finance-table-wrap { max-height:68vh; overflow:auto; overscroll-behavior:contain; }
.daily-finance-table small.daily-finance-cost-partial { color:#92400e; }
.daily-finance-cost-gap { margin-top:5px; max-width:260px; white-space:normal; font-size: 12px; color:#64748b; }
.daily-finance-cost-gap summary { cursor:pointer; }
.daily-finance-cost-gap span { display:block; margin-top:5px; text-align:left; overflow-wrap:anywhere; }
.daily-finance-table { width:100%; min-width:1480px; border-collapse:separate; border-spacing:0; color:#334155; font-size:12px; white-space:nowrap; }
.daily-finance-table th { position:sticky; z-index:3; top:0; padding:11px 12px; border-bottom:1px solid #cbd5e1; background:#f8fafc; color:#64748b; font-size: 12px; font-weight: 700; letter-spacing:.045em; text-align:right; text-transform:uppercase; }
.daily-finance-table th:first-child, .daily-finance-table td:first-child, .daily-finance-table th:nth-child(3), .daily-finance-table td:nth-child(3), .daily-finance-table th:nth-child(4), .daily-finance-table td:nth-child(4) { text-align:left; }
.daily-finance-table td { padding:10px 12px; border-bottom:1px solid #eef2f7; background:#fff; text-align:right; font-variant-numeric:tabular-nums; }
.daily-finance-table tr:hover td { background:#f8fbf9; }
.daily-finance-table tr.is-total td { border-bottom-color:#cadbd2; background:#f3f8f5; color:#163f30; font-weight: 700; }
.daily-finance-table tr.is-total:hover td { background:#eaf4ee; }
.daily-finance-table tr.is-loss .is-result { color:#be123c; }
.daily-finance-table .is-date { position:sticky; z-index:2; left:0; width:104px; min-width:104px; background:#fff; box-shadow:1px 0 0 #e2e8f0; }
.daily-finance-table th.is-date { z-index:5; }
.daily-finance-table .is-restaurant { width:240px; min-width:240px; max-width:240px; overflow:hidden; text-overflow:ellipsis; color:#64748b; }
.daily-finance-table small { display:block; margin-top:3px; color:#64748b; font-size: 12px; font-weight:500; white-space:normal; }
.daily-finance-table .is-channel { text-align:left; min-width:190px; max-width:230px; white-space:normal; }
.daily-finance-table .is-channel button { border:0; background:transparent; color:#176b4e; padding:8px 0; font:inherit; font-weight:700; cursor:pointer; text-align:left; }
.daily-finance-table .is-channel button:focus-visible { outline:2px solid #176b4e; outline-offset:3px; }
.daily-finance-order td { background:#f8fbf9; }
.daily-finance-order-actions { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:10px; white-space:normal; text-align:left; max-width:700px; }
.daily-finance-table tr.is-yandex-card { background:rgba(255,244,223,.32); }
.daily-finance-table tr.is-yandex-unallocated { background:rgba(254,226,226,.35); }
.daily-finance-table tr.is-total .is-date { background:#eff7f3; }
.daily-finance-table .is-result { color:#0f5138; font-weight: 700; }
.daily-finance-table .is-unknown { color:#94a3b8; }
.daily-finance-channel { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; background:#eef2f7; color:#475569; font-size: 12px; font-weight: 700; }
.daily-finance-channel.is-own { background:#e7f6ef; color:#176b4e; }
.daily-finance-channel.is-aggregator { background:#fff4df; color:#925d12; }
.daily-finance-channel.is-yandex { background:#fff1b8; color:#7a4b00; }
.daily-finance-channel.is-yandex-unallocated { background:#fee2e2; color:#991b1b; }
.daily-finance-channel.is-total { background:#dfece5; color:#174f39; }
.daily-finance-status { display:block; margin-top:5px; color:#64748b; font-size: 12px; font-weight:700; line-height:1.2; }
.daily-finance-status.is-confirmed { color:#176b4e; }
.daily-finance-status.is-preliminary { color:#925d12; }
.daily-finance-status.is-missing,
.daily-finance-status.is-mismatch { color:#b42318; }
@media (min-width: 760px) {
    .daily-finance-table .is-restaurant { position:sticky; z-index:2; left:104px; background:#fff; }
    .daily-finance-table .is-channel { position:sticky; z-index:2; left:104px; min-width:190px; background:#fff; box-shadow:1px 0 0 #e2e8f0; }
    .daily-finance-table th.is-restaurant, .daily-finance-table th.is-channel { z-index:5; background:#f8fafc; }
    .daily-finance-table tr.is-yandex-card .is-date,
    .daily-finance-table tr.is-yandex-card .is-restaurant,
    .daily-finance-table tr.is-yandex-card .is-channel { background:#fffaf0; }
    .daily-finance-table tr.is-yandex-unallocated .is-date,
    .daily-finance-table tr.is-yandex-unallocated .is-restaurant,
    .daily-finance-table tr.is-yandex-unallocated .is-channel { background:#fff4f4; }
    .daily-finance-table tr.is-total .is-restaurant,
    .daily-finance-table tr.is-total .is-channel { background:#eff7f3; }
}
.daily-finance-state { display:flex; min-height:180px; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:28px; color:#64748b; text-align:center; }
.daily-finance-state.is-error { color:#9f1239; }
.daily-finance-unallocated { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; padding:16px 20px 20px; }
.daily-finance-unallocated article { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px; border:1px solid #e2e8f0; border-radius:12px; background:#f8fafc; }
.daily-finance-unallocated span, .daily-finance-unallocated small { display:block; }
.daily-finance-unallocated span { color:#334155; font-size:12px; font-weight: 700; }
.daily-finance-unallocated small { margin-top:3px; color:#94a3b8; font-size: 12px; font-weight:600; }
.daily-finance-unallocated strong { color:#0f172a; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.daily-finance-issues { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:16px 20px 20px; list-style:none; }
.daily-finance-issues li { padding:7px 10px; border-radius:9px; background:#fff7ed; color:#9a4f13; font-size: 12px; font-weight:700; }
@media (max-width:980px) { .daily-finance-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) {
    .daily-finance-page { gap:13px; }
    .daily-finance-heading { align-items:stretch; flex-direction:column; }
    .daily-finance-heading .btn-secondary { width:100%; }
    .daily-finance-summary { gap:8px; }
    .daily-finance-summary article { padding:13px; }
    .daily-finance-panel > header { padding:15px; }
    .daily-finance-notice { align-items:flex-start; flex-direction:column; }
}

/* ИИ-аналитика: единый недельный центр решений. */
.diagnostics-decision-center { display:grid; gap:14px; max-width:1240px; margin-inline:auto; }
.decision-center-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:14px 16px; border:1px solid var(--ui-border); border-radius:12px; background:var(--ui-surface); }
.decision-center-toolbar > div,.decision-center-toolbar label { display:grid; gap:4px; }
.decision-center-toolbar span,.decision-center-toolbar label { color:var(--ui-muted); font-size: 12px; font-weight: 700; letter-spacing:.08em; text-transform:uppercase; }
.decision-center-toolbar strong { color:var(--ui-ink); font-size:16px; }
.decision-center-toolbar small { color:var(--ui-subtle); font-size: 12px; }
.decision-center-toolbar select { min-height:36px; min-width:160px; padding:6px 28px 6px 10px; border:1px solid var(--ui-border); border-radius:8px; background:#fff; color:var(--ui-ink); font-size:12px; text-transform:none; }
.decision-center-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:24px; padding:22px 24px; border-left:4px solid var(--ui-primary); }
.decision-center-hero > div:first-child { display:grid; gap:7px; }
.decision-center-hero > div:first-child > span,.decision-center-priorities > header span,.decision-center-changes > header span { color:var(--ui-primary); font-size: 12px; font-weight: 700; letter-spacing:.1em; text-transform:uppercase; }
.decision-center-hero h2 { max-width:980px; color:var(--ui-ink); font-size:clamp(18px,2vw,25px); font-weight: 700; line-height:1.4; }
.decision-center-hero > div:first-child > small { color:var(--ui-muted); font-size: 12px; }
.decision-center-money-opportunities { display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; margin-top:7px; }
.decision-center-money-opportunities button { min-width:210px; max-width:330px; display:grid; gap:3px; padding:12px 14px; border:1px solid color-mix(in srgb,var(--ui-primary) 22%,transparent); border-radius:14px; background:color-mix(in srgb,var(--ui-primary) 6%,var(--ui-surface)); text-align:left; cursor:pointer; }
.decision-center-money-opportunities button:hover { border-color:color-mix(in srgb,var(--ui-primary) 48%,transparent); transform:translateY(-1px); }
.decision-center-money-opportunities button small { color:var(--ui-primary); font-size: 12px; font-weight: 700; letter-spacing:.04em; text-transform:uppercase; }
.decision-center-money-opportunities button strong { color:var(--ui-ink); font-size:20px; font-weight: 700; }
.decision-center-money-opportunities button em { color:var(--ui-muted); font-size: 12px; font-style:normal; line-height:1.35; }
.decision-center-money-opportunities > p { flex-basis:100%; color:var(--ui-subtle); font-size: 12px; }
.decision-center-feedback { display:grid; grid-template-columns:auto auto; gap:6px; min-width:142px; }
.decision-center-feedback > span,.decision-center-feedback > small { grid-column:1/-1; color:var(--ui-muted); font-size: 12px; font-weight:700; }
.decision-center-feedback button { min-height:34px; border:1px solid var(--ui-border); border-radius:8px; background:#fff; color:var(--ui-muted); font-size: 12px; font-weight: 700; cursor:pointer; }
.decision-center-feedback button:hover,.decision-center-feedback button.is-active { border-color:#86b09c; background:var(--ui-primary-soft); color:var(--ui-primary); }
.decision-center-priorities { display:grid; gap:11px; }
.decision-center-priorities > header,.decision-center-changes > header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:2px 2px 0; }
.decision-center-priorities > header h2,.decision-center-changes > header h2 { margin-top:3px; color:var(--ui-ink); font-size:19px; font-weight: 700; }
.decision-center-priorities > header > small,.decision-center-changes > header > small { max-width:460px; color:var(--ui-muted); font-size: 12px; text-align:right; }
.decision-priority-list { display:grid; gap:10px; }
.decision-priority-card { overflow:hidden; border-left:4px solid #cbd5d0; box-shadow:none; }
.decision-priority-card.is-loss { border-left-color:#be4b49; }
.decision-priority-card.is-problem { border-left-color:#d28b2c; }
.decision-priority-card.is-opportunity { border-left-color:#25835f; }
.decision-priority-card.is-pattern { border-left-color:#5968b7; }
.decision-priority-summary { width:100%; min-height:104px; display:grid; grid-template-columns:34px minmax(0,1fr) minmax(150px,230px) 24px; align-items:center; gap:13px; padding:15px 17px; border:0; background:#fff; text-align:left; cursor:pointer; }
.decision-priority-summary:hover { background:#f8fbf9; }
.decision-priority-summary:focus-visible,.decision-priority-actions button:focus-visible,.decision-status-actions button:focus-visible,.decision-center-feedback button:focus-visible,.decision-change-list button:focus-visible { outline:3px solid rgba(23,107,78,.2); outline-offset:2px; }
.decision-priority-summary > b { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:#eef4f1; color:var(--ui-primary); font-size:12px; }
.decision-priority-copy { min-width:0; display:grid; gap:4px; }
.decision-priority-copy > small { display:flex; flex-wrap:wrap; align-items:center; gap:7px; color:var(--ui-muted); font-size: 12px; font-weight: 700; text-transform:uppercase; }
.decision-priority-copy > small i { padding:3px 6px; border-radius:999px; background:#f1f5f3; color:#53645c; font-style:normal; }
.decision-priority-copy > small i.is-loss { background:#fff0ef; color:#a33a38; }
.decision-priority-copy > small i.is-opportunity { background:#e9f6ef; color:#176b4e; }
.decision-priority-copy > small i.is-pattern { background:#eef0ff; color:#4d5ca6; }
.decision-priority-copy strong { color:var(--ui-ink); font-size:16px; line-height:1.35; }
.decision-priority-copy em { color:var(--ui-muted); font-size:13px; font-style:normal; line-height:1.45; }
.decision-priority-effect { min-width:0; display:grid; gap:3px; justify-items:end; text-align:right; }
.decision-priority-effect strong { max-width:230px; color:#294338; font-size:13px; line-height:1.35; overflow-wrap:anywhere; }
.decision-priority-effect small { color:var(--ui-subtle); font-size: 12px; text-transform:uppercase; }
.decision-priority-summary > i { color:var(--ui-muted); font-size:18px; font-style:normal; }
.decision-priority-detail { display:grid; gap:12px; padding:15px 17px 17px 64px; border-top:1px solid var(--ui-border); background:#fbfcfb; }
.decision-priority-explanation { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.decision-priority-explanation section { padding:11px 12px; border-radius:9px; background:#f1f5f3; }
.decision-priority-explanation span,.decision-first-step > span { color:var(--ui-primary); font-size: 12px; font-weight: 700; letter-spacing:.06em; text-transform:uppercase; }
.decision-priority-explanation p { margin-top:4px; color:#4f6258; font-size:12px; line-height:1.5; }
.decision-first-step { display:grid; gap:4px; padding:12px 13px; border-left:3px solid #d49a32; border-radius:8px; background:#fffaf0; }
.decision-first-step strong { color:#5e4a27; font-size:13px; }
.decision-first-step small { color:#826d46; font-size: 12px; }
.decision-source-line { color:var(--ui-muted); font-size: 12px; }
.decision-priority-actions,.decision-status-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.decision-priority-actions button,.decision-status-actions button { min-height:36px; padding:7px 11px; border:1px solid var(--ui-border); border-radius:8px; background:#fff; color:#40574c; font-size: 12px; font-weight: 700; cursor:pointer; }
.decision-priority-actions button.is-ai { border-color:#a9c7b8; background:var(--ui-primary-soft); color:var(--ui-primary); }
.decision-status-actions { padding-top:10px; border-top:1px solid var(--ui-border); }
.decision-status-actions > span { margin-right:2px; color:var(--ui-muted); font-size: 12px; font-weight: 700; }
.decision-center-changes { display:grid; gap:12px; padding:17px; }
.decision-change-list { display:grid; gap:6px; }
.decision-change-list button { width:100%; display:grid; grid-template-columns:8px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px 11px; border:1px solid var(--ui-border); border-radius:9px; background:#fff; text-align:left; cursor:pointer; }
.decision-change-list button > i { width:7px; height:34px; border-radius:999px; background:#8ca197; }
.decision-change-list button > i.is-warning { background:#d49a32; }
.decision-change-list button > i.is-critical { background:#be4b49; }
.decision-change-list button > span { min-width:0; display:grid; gap:2px; }
.decision-change-list small { color:var(--ui-subtle); font-size: 12px; text-transform:uppercase; }
.decision-change-list strong { color:var(--ui-ink); font-size:12px; }
.decision-change-list em { overflow:hidden; color:var(--ui-muted); font-size: 12px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.decision-change-list button > b { color:var(--ui-primary); font-size: 12px; white-space:nowrap; }
.decision-center-changes > p { color:var(--ui-muted); font-size: 12px; }
.decision-center-evidence { overflow:hidden; padding:0; }
.decision-center-loading { min-height:180px; display:grid; align-content:center; gap:10px; padding:24px; }
.decision-center-loading span { height:18px; border-radius:8px; background:linear-gradient(90deg,#edf2ef,#f8faf9,#edf2ef); background-size:220% 100%; animation:pulse 1.4s infinite; }

@media (max-width:760px) {
    .v2-app-shell,
    .v2-app-shell:has(.primary-navigation.is-collapsed),
    .v2-app-shell:has(.primary-navigation:not(.is-collapsed)) { padding-left:0 !important; }
    .v2-app-shell .app-shell-header { position:relative; }
    .v2-app-shell .app-header-context { width:100%; max-width:none; flex:1 0 100%; order:3; }
    .v2-app-shell .app-header-account { order:2; }
    .v2-app-shell .header-period { width:100%; min-width:0; flex-wrap:wrap; }
    .v2-app-shell .header-period-presets { width:100%; min-width:0; flex:1 1 100%; flex-wrap:wrap; }
    .v2-app-shell .header-period-presets button { flex:1 1 56px; min-width:0; }
    .v2-app-shell .header-period-custom { width:100%; min-width:0; }
    .v2-app-shell .header-period-custom > summary { width:100%; min-width:0; }
    .decision-center-toolbar,.decision-center-priorities > header,.decision-center-changes > header { align-items:stretch; flex-direction:column; gap:8px; }
    .decision-center-toolbar select { width:100%; }
    .decision-center-hero { grid-template-columns:1fr; gap:14px; padding:16px; }
    .decision-center-money-opportunities { display:grid; grid-template-columns:1fr; }
    .decision-center-money-opportunities button { width:100%; min-width:0; max-width:none; }
    .decision-center-feedback { grid-template-columns:1fr 1fr; width:100%; }
    .decision-center-priorities > header > small,.decision-center-changes > header > small { text-align:left; }
    .decision-priority-summary { grid-template-columns:28px minmax(0,1fr) 20px; gap:9px; padding:13px 12px; }
    .decision-priority-effect { grid-column:2; justify-items:start; text-align:left; }
    .decision-priority-summary > i { grid-column:3; grid-row:1/3; }
    .decision-priority-detail { padding:12px; }
    .decision-priority-explanation { grid-template-columns:1fr; }
    .decision-change-list button { grid-template-columns:7px minmax(0,1fr); }
    .decision-change-list button > b { grid-column:2; }
    .decision-change-list em { white-space:normal; }
}


/* Сверка: все суммы помещаются в ширину рабочего экрана. */
.daily-finance-reconciliation-table { min-width:1180px; table-layout:fixed; font-size: 12px; white-space:normal; }
.daily-finance-reconciliation-table th { padding:10px 5px; font-size: 12px; letter-spacing:0; overflow-wrap:anywhere; word-break:normal; vertical-align:bottom; }
.daily-finance-reconciliation-table td { padding:10px 5px; white-space:nowrap; }
.daily-finance-reconciliation-table td.is-channel { white-space:normal; }
.daily-finance-reconciliation-table .is-date { width:76px; min-width:76px; }
.daily-finance-reconciliation-table .is-channel { width:155px; min-width:155px; max-width:155px; }
.daily-finance-reconciliation-table th:not(.is-date):not(.is-channel),
.daily-finance-reconciliation-table td:not(.is-date):not(.is-channel) { text-align:right; }
.daily-finance-order-count { display:inline-block; margin-left:4px; padding:2px 5px; border-radius:5px; background:#e7f3ec; color:#176b4e; font-size: 12px; font-weight:700; white-space:nowrap; }
@media (min-width:760px) { .daily-finance-reconciliation-table .is-channel { left:76px; } }

/* ИИ-аналитика: короткий список проблем и отдельное представление решения. */
.diagnostic-workspace { --diagnostic-green: #087b57; color: #172c27; min-width: 0; }
.diagnostic-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.diagnostic-kpi { min-width:0; padding:18px 20px; display:grid; gap:5px; }
.diagnostic-kpi small { color:#687970; font-size:12px; font-weight:650; }
.diagnostic-kpi strong { color:#182f27; font-size:26px; line-height:1.1; font-variant-numeric:tabular-nums; }
.diagnostic-kpi span { color:#87948d; font-size: 12px; }
.diagnostic-kpi-potential { background:#effaf4 !important; border-color:#ccebd9 !important; }.diagnostic-kpi-potential strong,.diagnostic-kpi-good strong { color:#087b57; }.diagnostic-kpi-good { background:#f7fcf9 !important; }
.diagnostic-toolbar,.diagnostic-toolbar > div,.diagnostic-toolbar label { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.diagnostic-toolbar { justify-content: space-between; }.diagnostic-toolbar strong { font-size: 14px; }.diagnostic-toolbar small,.diagnostic-toolbar label { font-size: 12px; color: #6d7d77; }
.diagnostic-toolbar select { padding: 9px 12px; background: white; border: 1px solid #dce7e1; border-radius: 9px; color: #243d33; }
.diagnostic-period-note { font-size: 12px; color: #6d7d77; margin: 10px 0 22px; }
.diagnostic-overview { display: grid; gap: 24px; }.diagnostic-workspace .glass-panel { background: #fff; border: 1px solid #e0e9e4; border-radius: 15px; box-shadow: 0 3px 12px rgba(26,61,42,.025); }
.diagnostic-workspace .diagnostic-summary { display: flex; gap: 16px; padding: 23px 25px; background: #f0faf5; border-color: #d5eee1; }
.diagnostic-summary-icon { display: grid; place-items: center; align-self: start; flex: 0 0 42px; height: 42px; background: #dff3e8; color: #087b57; border-radius: 12px; font-size: 25px; }
.diagnostic-summary h2,.diagnostic-daily h2 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }.diagnostic-summary p { font-size: 15px; line-height: 1.65; margin: 0; max-width: 1000px; }
.diagnostic-section-title { font-size: 18px; font-weight: 700; margin: 0 0 15px; }
.diagnostic-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.diagnostic-card { overflow: hidden; min-width: 0; border-left: 3px solid #8cbba4 !important; }.diagnostic-card.tone-warning { border-left-color: #e5a344 !important; }.diagnostic-card.tone-critical { border-left-color: #db6470 !important; }
.diagnostic-card > button { width: 100%; height: 100%; display: flex; flex-direction: column; padding: 22px; text-align: left; background: transparent; color: inherit; border: 0; cursor: pointer; }
.diagnostic-card:hover { border-color: #b5d8c5; box-shadow: 0 5px 18px rgba(26,61,42,.07); }.diagnostic-card-meta { display: flex; width: 100%; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 650; color: #38715b; }
.diagnostic-status { padding: 4px 9px; border-radius: 7px; background: #f1f5f3; color: #6c7e75; font-size: 12px; font-weight: 500; }
.diagnostic-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -.025em; line-height: 1.35; margin: 15px 0 9px; }.diagnostic-card p { color: #6b7b74; font-size: 13px; line-height: 1.6; margin: 0 0 18px; }
.diagnostic-card-object { color: #294338 !important; font-size: 12px !important; margin: 0 0 8px !important; }.diagnostic-card-object b { color: #176b4e; font-weight: 700; }
.diagnostic-card-relation { color: #687970 !important; font-size: 12px !important; margin: -3px 0 9px !important; }.diagnostic-card-relation b { color: #52675d; font-weight: 700; }
.diagnostic-card-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; margin: 0 0 4px; padding: 9px 10px; border: 1px solid #e5eee9; border-radius: 9px; background: #fbfdfc; }
.diagnostic-card-metrics > div { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; align-items: baseline; }.diagnostic-card-metrics dt { overflow: hidden; color: #718078; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.diagnostic-card-metrics dd { margin: 0; color: #294338; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }.diagnostic-card-metrics small { grid-column: 1/-1; overflow: hidden; color: #9aa7a0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.diagnostic-card-money { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }.diagnostic-card-money strong { font-size: 25px; letter-spacing: -.035em; color: #087b57; font-variant-numeric: tabular-nums; }.diagnostic-card-money small { font-size: 12px; color: #6d7d77; }.diagnostic-no-estimate { margin-top: auto; color: #8a9690; font-size: 12px; }
.diagnostic-card-step { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #edf1ee; margin-top: 17px; padding-top: 14px; font-size: 13px; line-height: 1.55; }.diagnostic-card-step small { display: block; font-size: 12px; color: #809087; margin-bottom: 3px; }.diagnostic-card-step > span:last-child { color: #087b57; font-size: 19px; }
.diagnostic-daily { padding: 22px; }.diagnostic-daily button { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 15px; text-align: left; color: inherit; background: transparent; border: 0; border-top: 1px solid #edf1ee; padding: 14px 0; }.diagnostic-daily button small,.diagnostic-daily button strong { display: block; }.diagnostic-daily button small { font-size: 12px; color: #7e8c85; margin-bottom: 5px; }.diagnostic-daily button strong { font-size: 14px; font-weight: 600; }
.diagnostic-footer { display: grid; gap: 15px; }.diagnostic-sources { padding: 18px 22px; }.diagnostic-sources summary { font-size: 14px; cursor: pointer; }.diagnostic-sources summary small { margin-left: 10px; font-size: 12px; color: #819087; }.diagnostic-sources h3 { margin-top: 18px; font-size: 14px; font-weight: 650; }.diagnostic-sources p { font-size: 13px; margin: 10px 0; line-height: 1.6; color: #687970; }
.diagnostic-feedback { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; color: #7c8b83; font-size: 12px; }.diagnostic-feedback button { min-height: 36px; padding: 7px 13px; background: white; border: 1px solid #e0e9e4; border-radius: 8px; color: #477361; }.diagnostic-feedback button[aria-pressed=true] { background: #e4f6ec; border-color: #80baa0; }
.diagnostic-detail { display: grid; gap: 18px; min-width: 0; }.diagnostic-back { justify-self: start; min-height: 40px; color: #507164; font-size: 13px; background: none; border: 0; padding: 4px 0; }.diagnostic-detail-heading { padding: 26px; }.diagnostic-detail-heading h2 { font-size: clamp(23px,2.5vw,32px); line-height: 1.25; font-weight: 700; letter-spacing: -.03em; margin: 18px 0 14px; }.diagnostic-detail-heading h2:focus { outline: none; }.diagnostic-detail-heading p { font-size: 14px; line-height: 1.65; margin-top: 8px; }
.diagnostic-detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }.diagnostic-detail-section { min-width: 0; padding: 24px; }.diagnostic-detail-section h3 { font-size: 17px; font-weight: 700; margin-bottom: 18px; }.diagnostic-metrics { margin: 0; }.diagnostic-metrics > div { display: flex; justify-content: space-between; align-items: start; gap: 18px; padding: 12px 0; border-bottom: 1px solid #edf1ee; }.diagnostic-metrics dt { font-size: 13px; color: #6d7d77; }.diagnostic-metrics dt small { display: block; font-size: 12px; margin-top: 3px; }.diagnostic-metrics dd { margin: 0; font-weight: 700; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }.diagnostic-facts p { font-size: 14px; line-height: 1.65; margin: 12px 0; }
.diagnostic-effect { display: flex; flex-direction: column; align-items: start; }.diagnostic-effect-amount { font-size: clamp(28px,3.2vw,42px); font-weight: 700; color: #087b57; letter-spacing: -.04em; }.diagnostic-effect > span { font-size: 12px; color: #7e8c85; }.diagnostic-effect p { font-size: 13px; line-height: 1.65; margin-top: 15px; }.diagnostic-formula { padding: 14px; background: #f0faf5; border-radius: 10px; width: 100%; }.diagnostic-evidence-more { width: 100%; margin-top: 18px; font-size: 13px; line-height: 1.6; }.diagnostic-evidence-more summary { cursor: pointer; color: #38715b; padding: 8px 0; }.diagnostic-calculation { padding: 12px 0; border-top: 1px solid #edf1ee; }.diagnostic-calculation small { display: block; color: #87938c; }
.diagnostic-muted { font-size: 13px; line-height: 1.6; color: #7d8a83; }.diagnostic-first-action { padding: 14px 17px; background: #f0faf5; border-radius: 10px; font-size: 15px; line-height: 1.6; }.diagnostic-action-list { padding-left: 22px; margin: 18px 0; }.diagnostic-action-list li { padding: 6px 0 10px 5px; font-size: 14px; line-height: 1.6; }.diagnostic-action-list li::marker { color: #087b57; font-weight: 700; }.diagnostic-action-list small { display: block; font-size: 12px; color: #7d8a83; }.diagnostic-verification { font-size: 13px; padding-top: 12px; border-top: 1px solid #edf1ee; margin-bottom: 12px; }
.diagnostic-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 22px; }.diagnostic-actions button { min-height: 42px; padding: 10px 15px; border: 1px solid #dce7e1; border-radius: 9px; background: #fff; font-size: 12px; color: #416c58; }.diagnostic-actions .is-primary { background: #087b57; color: white; border-color: #087b57; }.diagnostic-workspace button:disabled { opacity: .5; cursor: default; }.diagnostic-workspace button:focus-visible,.diagnostic-workspace summary:focus-visible,.diagnostic-workspace select:focus-visible { outline: 2px solid #148357; outline-offset: 3px; }
.diagnostic-workspace p,.diagnostic-workspace h2,.diagnostic-workspace h3,.diagnostic-workspace dd,.diagnostic-workspace span { overflow-wrap: anywhere; }
@media(max-width: 720px) { .diagnostic-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.diagnostic-kpi { padding:13px; }.diagnostic-kpi strong { font-size:20px; }.diagnostic-card-grid,.diagnostic-detail-grid { grid-template-columns: minmax(0,1fr); }.diagnostic-workspace .diagnostic-summary { padding: 17px; gap: 12px; }.diagnostic-summary-icon { flex-basis: 32px; height: 32px; font-size: 21px; }.diagnostic-summary p { font-size: 14px; }.diagnostic-card > button,.diagnostic-detail-section,.diagnostic-detail-heading { padding: 18px; }.diagnostic-card h3 { font-size: 18px; }.diagnostic-toolbar { align-items: start; gap: 12px; }.diagnostic-toolbar > div { align-items: start; flex-direction: column; gap: 4px; }.diagnostic-sources summary small { display: block; margin: 7px 0 0; }.diagnostic-actions button { flex: 1 1 auto; }.diagnostic-metrics > div { gap: 10px; }.diagnostic-metrics dd { font-size: 15px; }.diagnostic-card-metrics { grid-template-columns: 1fr; } }
.diagnostic-detail { scroll-margin-top: 88px; }
.diagnostic-direction-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.diagnostic-direction { padding:18px 20px; border-left:3px solid #e7a339; }
.diagnostic-direction h3 { font-size:16px; font-weight: 700; display:inline; margin-right:12px; }
.diagnostic-direction small { color:#8a641c; font-size: 12px; }
.diagnostic-direction p { margin:10px 0; font-size:13px; line-height:1.5; color:#334d40; }
.diagnostic-direction button { border:0; background:none; color:#087b57; font-size:12px; min-height:36px; }
.management-report .diagnostic-direction { border-left:3px solid #0b8b61; background:#fff; transition:box-shadow .2s,transform .2s; }
.management-report .diagnostic-direction:hover { box-shadow:0 8px 24px rgba(22,75,55,.12); transform:translateY(-1px); }
.management-report .diagnostic-direction p b { color:#173e31; }
.management-report nav button { border:1px solid #d9e7e0; background:#fff; border-radius:9px; padding:8px 12px; color:#38584b; font-weight:650; cursor:pointer; }
.management-report nav button[aria-pressed="true"] { background:#087b57; border-color:#087b57; color:#fff; }
.management-report dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 24px; margin:12px 0 20px; }
.management-report dt { color:#788b83; font-size:12px; text-transform:uppercase; }
.management-report dd { margin:0; color:#183b2f; font-weight:700; }
.management-action-effect { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:10px 12px; background:#effaf4; border-radius:8px; color:#27624b; }
.management-action-effect strong { color:#087b57; font-size:20px; white-space:nowrap; }
.management-priority-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.management-priority-card { padding:16px; border:1px solid #d9e7e0; border-radius:12px; background:#fff; }
.management-priority-card h3 { margin:0 0 8px; font-size:15px; }
.management-priority-card p { font-size:13px; line-height:1.5; }
.management-decision-screen { border-top:4px solid #087f5b; }
.management-decision-screen h2 { margin:8px 0 12px; font-size:26px; }
.management-eyebrow { color:#087f5b; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.management-decision-finding { font-size:17px; line-height:1.55; max-width:900px; }
.management-formula-panel { margin:18px 0; padding:16px 18px; border-radius:12px; background:#f0faf5; border:1px solid #cfeee0; }
.management-formula-panel p { margin:8px 0 0; font-family:ui-monospace,SFMono-Regular,monospace; font-size:13px; }
.management-source { color:#61756d; font-size:13px; }
.management-detail-button { width:100%; text-align:left; cursor:pointer; background:#fff; font:inherit; border:0; border-bottom:1px solid #e6eee9; }
.management-detail-button:hover { background:#f5fbf8; }
@media(max-width:800px){.management-priority-grid{grid-template-columns:1fr;}}
@media(max-width:560px){.management-decision-screen h2{font-size:21px}.management-detail-table{overflow-x:auto}.management-detail-row{min-width:620px}.management-decision-screen .management-detail-table{margin-inline:-4px}.management-decision-screen .management-status-control{display:flex;flex-direction:column;align-items:flex-start;gap:6px}}
.management-detail-table{overflow:auto;border:1px solid #dbe8e1;border-radius:10px;margin:12px 0 20px}.management-detail-row{display:grid;grid-template-columns:1.1fr 2fr .8fr 1.7fr;gap:12px;padding:12px;border-top:1px solid #e7efeb;min-width:760px;font-size:12px;line-height:1.45}.management-detail-head{border-top:0;background:#f3faf6;color:#49685a;font-size: 12px}.management-detail-row strong{color:#087b57;font-size:15px}.management-detail-row em{color:#8c6d31;font-style:normal}.management-detail-row span{color:#40594d}
.diagnostic-priorities { padding:18px; }.diagnostic-priorities h2 { font-size:18px; font-weight: 700; margin-bottom:12px; }
.diagnostic-priorities > div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.diagnostic-priorities button { display:flex; gap:10px; text-align:left; padding:12px; border:1px solid #e3ece7; border-radius:10px; background:#fff; font-size:12px; }
.diagnostic-priorities b { color:#087b57; }.diagnostic-priorities small { display:block; color:#738278; margin-top:8px; }
.diagnostic-table-scroll { overflow-x:auto; max-width:100%; }.diagnostic-comparison { width:100%; border-collapse:collapse; font-size:13px; }
.diagnostic-comparison th,.diagnostic-comparison td { padding:11px 8px; border-bottom:1px solid #e7ede9; text-align:right; font-variant-numeric:tabular-nums; }
.diagnostic-comparison th:first-child { text-align:left; }.diagnostic-comparison thead { background:#f3f7f5; }
.diagnostic-card-money.is-negative strong { color:#ad3c31; }
.diagnostic-card > button { padding:18px; }.diagnostic-card h3 { font-size:17px; margin:10px 0 8px; }
.diagnostic-card p { margin-bottom:12px; }.diagnostic-overview { gap:18px; }
@media(max-width:720px) { .diagnostic-direction-grid,.diagnostic-priorities > div { grid-template-columns:minmax(0,1fr); }.diagnostic-comparison { font-size: 12px; }.diagnostic-comparison th,.diagnostic-comparison td { padding:8px 4px; } }
@media(max-width:720px) { .diagnostic-detail { scroll-margin-top: 210px; } }

.diagnostic-expand { margin-top: 16px; padding: 10px 16px; border: 1px solid #b8d6c9; border-radius: 10px; color: #166747; background: #f4fbf7; max-width: 100%; }
.diagnostic-expand:focus-visible { outline: 2px solid #15805c; outline-offset: 3px; }
.diagnostic-coverage-row { padding: 12px 0; border-bottom: 1px solid #e4ebe7; overflow-wrap: anywhere; }
.diagnostic-coverage-row:last-child { border-bottom: 0; }
.diagnostic-profit-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.diagnostic-profit-action{background:#fff;border:1px solid #d5eee3;border-radius:10px;padding:9px 12px;font-size:13px;color:#23483a}.diagnostic-profit-action b{color:#087f55;margin-right:4px}.diagnostic-profit-action strong{color:#07814f;margin-left:6px}

.management-status-control{display:flex;align-items:center;gap:8px;margin-top:10px;color:#49685a;font-size:12px}.management-status-control select{border:1px solid #cfe0d6;border-radius:7px;padding:5px 8px;background:#fff;color:#214b39}
/* Аналитика меню: стили ограничены экраном, общая оболочка не меняется. */
.menu-analysis { color: #172b25; font-size: 14px; line-height: 1.55; width:100%; max-width:1280px; margin-inline:auto; }
.menu-analysis .menu-signal-filters { display:flex; flex-wrap:wrap; gap:8px; }
.menu-analysis .menu-signal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.menu-analysis .menu-signal-grid > article { min-width:0; }
.menu-analysis .menu-signal-metrics { display:grid; gap:10px; padding-block:12px; }
.menu-analysis .menu-signal-metrics dt { font-size:12px; color:#60716a; }
.menu-analysis .menu-signal-metrics dd { font-weight:650; }
.menu-analysis .glass-panel { background: #fff; border: 1px solid #e2e9e6; border-radius: 12px; box-shadow: none; }
.menu-analysis h1 { font-size: 28px; font-weight: 700; letter-spacing: -.6px; }
.menu-analysis h2 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.menu-analysis h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }
.menu-analysis p { overflow-wrap: anywhere; }
.menu-analysis .menu-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.menu-analysis .menu-eyebrow { color:#27705a; font-size: 12px; font-weight: 700; letter-spacing:1.4px; margin-bottom:8px; }
.menu-analysis .menu-muted { color:#60716a; }
.menu-analysis .menu-small { font-size:12px; }
.menu-analysis .menu-archive { display:grid; gap:6px; font-size:12px; color:#60716a; max-width:100%; }
.menu-analysis select { border:1px solid #dce5e0; border-radius:8px; padding:10px 12px; color:#243c32; background:#fff; max-width:100%; }
.menu-analysis .menu-button { border:1px solid #dce5e0; background:#fff; border-radius:8px; padding:10px 16px; font-weight:600; min-height:44px; }
.menu-analysis .menu-button:hover { background:#f0f7f3; }
.menu-analysis .menu-primary { background:#126247; color:white; border-color:#126247; }
.menu-analysis .menu-primary:hover { background:#0c513a; }
.menu-analysis button:disabled,.menu-analysis input:disabled,.menu-analysis select:disabled { opacity:.55; cursor:wait; }
.menu-analysis :is(button,input,select,summary):focus-visible { outline:3px solid #37a77b; outline-offset:3px; }
.menu-analysis .menu-overview { display:grid; grid-template-columns:1.5fr 1fr; gap:20px; padding:28px; }
.menu-analysis .menu-overview h2 { margin-bottom:12px; }
.menu-analysis .menu-amount-panel { background:#eef9f3; border-radius:10px; padding:20px; color:#225c43; }
.menu-analysis .menu-amount { display:block; font-size:clamp(30px,3vw,42px); color:#087344; line-height:1.25; font-weight: 700; letter-spacing:-1px; margin:8px 0; }
#app .menu-analysis .analysis-intro h2 { font-size: 20px; line-height: 1.3; }
.menu-analysis .menu-money-note { grid-column:1/-1; font-size:12px; color:#687b71; }
.menu-analysis .menu-opportunities { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.menu-analysis .menu-card { display:flex; flex-direction:column; gap:16px; padding:22px; min-width:0; }
.menu-analysis .menu-card h2 { font-size:20px; }
.menu-analysis .menu-card-title { text-align:left; }
.menu-analysis .menu-card-title:hover,.menu-analysis .menu-link:hover { color:#087344; text-decoration:underline; }
.menu-analysis .menu-badges { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.menu-analysis .menu-badge { display:inline-block; padding:4px 10px; border-radius:20px; background:#f0f3f2; color:#53645b; font-size: 12px; font-weight:650; }
.menu-analysis .menu-badge-high { background:#fff0ed; color:#a94632; }
.menu-analysis .menu-card-bottom { margin-top:auto; display:grid; gap:2px; }
.menu-analysis .menu-card-amount { color:#087344; font-size:28px; }
.menu-analysis .menu-check { display:flex; align-items:center; gap:10px; font-size:12px; min-height:36px; }
.menu-analysis input { accent-color:#087344; flex-shrink:0; width:16px; height:16px; }
.menu-analysis .menu-detail-hero { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr); gap:20px; padding:24px; }
.menu-analysis .menu-detail-hero h2 { font-size:28px; margin-bottom:12px; }
.menu-analysis .menu-detail-grid { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:16px; }
.menu-analysis .menu-next-grid { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:16px; }
.menu-analysis .menu-next-grid > * { min-width:0; }
.menu-analysis .menu-key-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
.menu-analysis .menu-key-table th { background:#f6f8f7; font-weight:500; color:#60716a; text-align:left; }
.menu-analysis .menu-key-table :is(th,td) { padding:12px 8px; border-bottom:1px solid #e7ede9; overflow-wrap:anywhere; vertical-align:top; }
.menu-analysis .menu-key-table th:first-child { width:25%; }
.menu-analysis .menu-link { text-align:left; font-weight:650; }
.menu-analysis .menu-option { display:flex; gap:10px; align-items:flex-start; padding:14px; border:1px solid #e0e8e3; border-radius:9px; cursor:pointer; }
.menu-analysis .menu-option input { margin-top:4px; }
.menu-analysis .menu-option > span { flex:1; min-width:0; }
.menu-analysis .menu-option > span > span { display:block; margin-top:5px; }
.menu-analysis .menu-option.is-selected { border-color:#69ad8d; background:#f2faf5; }
.menu-analysis .menu-promotion-detail { display:grid; gap:16px; }
.menu-analysis .menu-approaches { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.menu-analysis .menu-approaches .menu-button { height:auto; min-height:42px; white-space:normal; }
.menu-analysis .menu-approaches span { opacity:.7; margin-left:6px; }
.menu-analysis .menu-promotion-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; padding:16px 0; }
.menu-analysis .menu-promotion-facts dt { font-size:14px; color:#60716a; }
.menu-analysis .menu-promotion-facts dd { font-size:26px; font-weight:650; margin-top:8px; }
.menu-analysis .menu-promotion-result { background:#f2faf5; border-radius:12px; padding:20px; }
.menu-analysis .menu-promotion-result h4 { font-weight:650; }
.menu-analysis .menu-promotion-result p { margin-top:12px; }
.menu-analysis .menu-promotion-breakdown { display:grid; gap:12px; margin-top:16px; }
.menu-analysis .menu-promotion-breakdown > div { display:flex; justify-content:space-between; gap:20px; }
.menu-analysis .menu-promotion-breakdown dd { font-weight:650; white-space:nowrap; }
.menu-analysis .menu-promotion-net { border-top:1px solid #cfe0d4; padding-top:12px; color:#087344; font-weight:650; }
.menu-analysis .menu-promotion-net dd.menu-negative { color:#ad3a29; }
@media(max-width:600px) {
 .menu-analysis .menu-promotion-facts { grid-template-columns:1fr; gap:16px; }
 .menu-analysis .menu-promotion-facts dd { font-size:24px; margin-top:3px; }
 .menu-analysis .menu-promotion-result { padding:16px; }
 .menu-analysis .menu-promotion-breakdown > div { flex-direction:column; gap:3px; }
}
.menu-analysis .menu-green { color:#087344; white-space:nowrap; }
.menu-analysis .menu-change { display:flex; justify-content:space-between; gap:12px; border-top:1px solid #e7ede9; padding-top:12px; }
.menu-analysis .menu-disclosure { border-top:1px solid #e7ede9; padding-top:12px; }
.menu-analysis summary { cursor:pointer; font-weight:600; min-height:32px; }
.menu-analysis .menu-disclosure p { margin-top:8px; }
.menu-analysis .menu-steps { list-style:none; counter-reset:menu-step; margin-top:16px; display:grid; gap:14px; }
.menu-analysis .menu-steps li { counter-increment:menu-step; position:relative; padding-left:38px; }
.menu-analysis .menu-steps li::before { content:counter(menu-step); position:absolute; left:0; top:0; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#e6f5eb; color:#17734c; font-weight:700; }
.menu-analysis .menu-source-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; background:#f0f6fc; border:1px solid #e0eaf6; border-radius:10px; color:#45627a; font-size:12px; }
.menu-analysis .menu-notice { position:sticky; bottom:16px; z-index:10; background:#173f2f; color:white; border-radius:8px; padding:12px 18px; }
@media(max-width:1100px) { .menu-analysis .menu-opportunities { grid-template-columns:repeat(2,minmax(0,1fr)); } .menu-analysis .menu-detail-grid { grid-template-columns:1fr; } }
@media(max-width:700px) {
 .menu-analysis .menu-signal-grid { grid-template-columns:1fr; }
 .menu-analysis .menu-opportunities,.menu-analysis .menu-overview,.menu-analysis .menu-detail-hero,.menu-analysis .menu-next-grid { grid-template-columns:1fr; }
 .menu-analysis .menu-overview,.menu-analysis .menu-detail-hero,.menu-analysis .menu-card { padding:18px; }
 .menu-analysis h1,.menu-analysis .menu-detail-hero h2 { font-size:24px; }
 .menu-analysis .menu-source-bar { align-items:stretch; flex-direction:column; }
 .menu-analysis .menu-option { flex-wrap:wrap; }
 .menu-analysis .menu-option > .menu-green { margin-left:26px; }
 .menu-analysis .menu-key-table,.menu-analysis .menu-key-table tbody { display:block; }
 .menu-analysis .menu-key-table thead { display:none; }
 .menu-analysis .menu-key-table tr { display:block; margin-bottom:14px; border:1px solid #e2e9e6; border-radius:8px; padding:10px; }
 .menu-analysis .menu-key-table td { display:flex; justify-content:space-between; gap:12px; border:0; padding:6px 0; flex-wrap:wrap; }
 .menu-analysis .menu-key-table td::before { content:attr(data-label); color:#60716a; max-width:52%; }
 .menu-analysis .menu-key-table td:first-child { display:block; font-size:15px; border-bottom:1px solid #e7ede9; padding-bottom:10px; margin-bottom:6px; }
 .menu-analysis .menu-key-table td:first-child::before { display:none; }
 .menu-analysis .menu-key-table td:last-child p { width:100%; text-align:right; }
}

/* Компактный обзор решений меню; подробности доступны по раскрытию. */
.menu-analysis .menu-overview { padding:16px; gap:8px 20px; align-items:center; }
.menu-analysis .menu-overview h2 { font-size:20px; margin-bottom:4px; }
.menu-analysis .menu-overview .menu-amount-panel { padding:10px 14px; }
.menu-analysis .menu-overview .menu-amount { font-size:32px; margin:0; }
.menu-analysis .menu-overview .menu-disclosure { padding-top:6px; }
.menu-analysis .menu-card { padding:16px; gap:10px; }
.menu-analysis .menu-card h2 { font-size:18px; }
.menu-analysis .menu-card-bottom { margin-top:0; }
.menu-analysis .menu-opportunities { align-items:start; gap:12px; }
.menu-analysis .menu-aux-row,.menu-analysis .menu-tools { padding:8px 0; border-top:1px solid #e2e9e6; }

/* Спокойный обзор ИИ-аналитики: суммы, действие, затем подробности. */
.menu-analysis-clean .menu-toolbar { gap:12px; }
.menu-analysis-clean > .menu-toolbar h1 { font-size:26px; }
.menu-analysis-clean .menu-overview-clean { grid-template-columns:minmax(0,1fr) auto; padding:20px 24px; gap:14px 28px; }
.menu-analysis-clean .menu-summary-label { color:#617269; font-size:13px; margin-bottom:5px; }
.menu-analysis-clean .menu-summary-amount { display:block; color:#087344; font-size:36px; line-height:1.2; letter-spacing:-.7px; margin-bottom:7px; }
.menu-analysis-clean .menu-selected-summary { padding-left:28px; border-left:1px solid #e7ede9; min-width:230px; }
.menu-analysis-clean .menu-selected-summary > strong { display:block; font-size:24px; line-height:1.3; color:#243c32; margin-bottom:5px; }
.menu-analysis-clean .menu-summary-details { grid-column:1/-1; }
.menu-analysis-clean .menu-summary-details > summary { color:#64776b; font-size:12px; font-weight:500; min-height:24px; }
.menu-analysis-clean .menu-summary-explanation { padding-top:10px; display:grid; gap:8px; max-width:850px; }
.menu-analysis-clean .menu-clean-filters { gap:4px; border-bottom:1px solid #e2e9e6; padding-bottom:6px; }
.menu-analysis-clean .menu-clean-filters button { min-height:40px; padding:8px 12px; border:0; border-radius:7px; color:#62746a; font-size:13px; background:transparent; }
.menu-analysis-clean .menu-clean-filters button:not(.is-active):hover { background:#edf3ef; }
.menu-analysis-clean .menu-clean-filters button.is-active { background:#126247; color:#fff; font-weight:650; }
.menu-analysis-clean .menu-clean-filters button:focus-visible { outline:2px solid #126247; outline-offset:2px; }
.menu-analysis-clean .menu-clean-filters button span { font-size: 12px; margin-left:4px; opacity:.7; }
.menu-analysis-clean .menu-direction-summary { margin-top:8px; color:#50665a; }
.menu-analysis-clean .menu-card-clean { gap:9px; padding:18px; height:100%; }
.menu-analysis-clean .menu-opportunities { align-items:stretch; }
.menu-analysis-clean .menu-card-meta { display:flex; justify-content:space-between; gap:8px; font-size: 12px; color:#7a8b81; min-height:17px; }
.menu-analysis-clean .menu-card-clean h2 { font-size:17px; font-weight:700; line-height:1.35; }
.menu-analysis-clean .menu-card-action { color:#617269; font-size:13px; line-height:1.5; margin-bottom:5px; }
.menu-analysis-clean .menu-card-clean .menu-card-bottom { margin-top:auto; gap:3px; }
.menu-analysis-clean .menu-card-clean .menu-card-amount { font-size:24px; font-weight:700; line-height:1.25; }
.menu-analysis-clean .menu-card-period { color:#8a998f; font-size: 12px; margin-left:7px; white-space:nowrap; }
.menu-analysis-clean .menu-card-footer { display:flex; justify-content:space-between; gap:12px; align-items:center; padding-top:4px; }
.menu-analysis-clean .menu-detail-link { color:#355e49; font-size:12px; font-weight:600; min-height:36px; text-align:left; }
.menu-analysis-clean .menu-detail-link:hover { text-decoration:underline; }
.menu-analysis-clean .menu-card-footer .menu-check { color:#6d8074; font-size:12px; gap:7px; }
.menu-analysis-clean .menu-notice { width:max-content; max-width:100%; margin-inline:auto; font-size:13px; padding:8px 14px; }
.menu-analysis-clean .menu-observations-group > summary,.menu-analysis-clean .menu-tools > summary { font-size:13px; color:#617269; font-weight:500; }
@media(max-width:700px) {
 .menu-analysis-clean .menu-overview-clean { grid-template-columns:1fr; padding:18px; gap:12px; }
 .menu-analysis-clean .menu-summary-amount { font-size:32px; }
 .menu-analysis-clean .menu-selected-summary { padding:12px 0 0; border-left:0; border-top:1px solid #e7ede9; min-width:0; display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px; }
 .menu-analysis-clean .menu-selected-summary .menu-summary-label { margin:0; }
 .menu-analysis-clean .menu-selected-summary > strong { font-size:20px; margin:0; }
 .menu-analysis-clean .menu-selected-summary .menu-small { flex-basis:100%; }
 .menu-analysis-clean .menu-clean-filters { gap:2px; }
 .menu-analysis-clean .menu-clean-filters button { padding:8px 9px; }
 .menu-analysis-clean .menu-card-clean { padding:16px; }
}
.menu-analysis .menu-tools > summary,.menu-analysis .menu-aux-row > summary { min-height:32px; font-size:13px; }
.menu-analysis [data-assistant-target="menu_analysis.signals"] > details { padding:8px 0; border:0; border-top:1px solid #e2e9e6; border-radius:0; background:transparent; }
.menu-analysis .menu-tools .menu-source-bar { padding:6px 0; background:transparent; border:0; }
.menu-analysis .menu-tools > .glass-panel { padding:8px 0; border:0; background:transparent; }

/* Сверка v3: компактные дни и отдельная область подробностей. */
.recon-page { min-width:0; }
.recon-section { overflow:hidden; margin-bottom:20px; }
.recon-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; border-bottom:1px solid #e2e8f0; }
.recon-header h1 { margin:0; font-size:20px; font-weight: 700; color:#163f30; }
.recon-header p,.recon-caption { color:#64748b; font-size:13px; margin:6px 0; line-height:1.5; }
.recon-section > .recon-caption { padding:0 24px 14px; }
.recon-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.recon-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:20px 24px; }
.recon-kpis article { border:1px solid #e2e8f0; border-radius:12px; padding:14px; min-width:0; }
.recon-kpis span { display:block; font-size:12px; color:#64748b; }
.recon-kpis strong { display:block; font-size:22px; margin-top:5px; font-variant-numeric:tabular-nums; }
.recon-days { width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
.recon-days th { text-align:right; padding:12px 16px; background:#f8fafc; color:#64748b; font-size:12px; font-weight:650; }
.recon-days td { text-align:right; padding:14px 16px; border-top:1px solid #edf1f3; white-space:nowrap; }
.recon-days th:first-child,.recon-days td:first-child,.recon-days th:last-child,.recon-days td:last-child { text-align:left; }
.recon-days tbody tr:hover,.recon-selected { background:#f0f8f4; }
.recon-link { color:#176b4e; background:transparent; border:0; cursor:pointer; font:inherit; font-weight:650; padding:4px 0; text-align:left; }
.recon-link:hover { text-decoration:underline; }
.recon-link:focus-visible,.recon-tabs button:focus-visible { outline:2px solid #176b4e; outline-offset:3px; }
.recon-badge { display:inline-block; font-size:12px; border-radius:6px; padding:4px 7px; background:#f1f5f9; color:#475569; white-space:normal; }
.recon-ready { color:#166534; background:#e9f7ee; }.recon-missing,.recon-review { color:#92400e; background:#fff4df; }
.recon-tabs { display:flex; gap:8px; padding:14px 24px; border-bottom:1px solid #e2e8f0; }
.recon-tabs button { border:0; background:transparent; padding:9px 14px; border-radius:8px; color:#64748b; cursor:pointer; font-weight:650; }
.recon-tabs button[aria-selected=true] { background:#e9f4ee; color:#166534; }
.recon-content,.recon-message { padding:20px 24px; }
.recon-content h3 { margin:22px 0 12px; font-size:17px; font-weight:700; }
.recon-content p { margin:10px 0; line-height:1.5; }
.recon-filters { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.recon-filters label { display:grid; gap:5px; color:#64748b; font-size:12px; }
.recon-filters input,.recon-filters select { border:1px solid #cbd5e1; border-radius:8px; padding:9px 12px; background:white; color:#334155; font-size:14px; min-height:42px; }
.recon-scroll { max-width:100%; overflow-x:auto; margin:12px 0; }
.recon-detail-table { border-collapse:collapse; width:100%; min-width:650px; font-size:13px; font-variant-numeric:tabular-nums; }
.recon-detail-table th { font-weight:650; color:#64748b; background:#f8fafc; text-align:left; padding:11px 12px; white-space:nowrap; }
.recon-detail-table td { padding:12px; border-bottom:1px solid #edf1f3; text-align:left; vertical-align:top; }
.recon-detail-table td:not(:first-child) { min-width:75px; }
.recon-detail-table small,.recon-profit small { display:block; color:#64748b; font-size: 12px; margin-top:4px; }
.recon-problems { padding:16px 24px; border-top:1px solid #e2e8f0; color:#475569; font-size:13px; }
.recon-problems summary { cursor:pointer; font-weight:650; }.recon-problems li { padding:8px 0; }
.recon-issues-heading { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 16px; margin-bottom:14px; }
.recon-issues-heading h3 { margin:0; font-size:16px; color:#243b37; }
.recon-issues-heading > span { font-size:12px; color:#64748b; }
.recon-issue-groups { display:grid; gap:10px; }
.recon-issue-group { min-width:0; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; }
.recon-issue-group > summary { display:flex; align-items:center; gap:10px; padding:14px 16px; list-style:none; }
.recon-issue-group > summary::-webkit-details-marker { display:none; }
.recon-issue-group > summary::before { content:'›'; font-size:20px; color:#64748b; flex:none; transition:transform .15s; }
.recon-issue-group[open] > summary::before { transform:rotate(90deg); }
.recon-issue-group > summary:hover { background:#f8fafb; }
.recon-issue-group > summary:focus-visible,.recon-source-coverage > summary:focus-visible { outline:2px solid #176b4e; outline-offset:-3px; }
.recon-issue-title { flex:1; min-width:0; overflow-wrap:anywhere; color:#243b37; line-height:1.45; }
.recon-issue-group .recon-badge { flex:none; font-size:11px; }
.recon-issue-body { padding:0 16px 12px; }
.recon-issue-action { margin:0 0 8px; padding:12px; border-radius:8px; background:#f5f8f7; line-height:1.6; }
.recon-issue-list { margin:0; padding:0; list-style:none; }
.recon-issue-list li { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; border-top:1px solid #edf1f3; line-height:1.55; overflow-wrap:anywhere; }
.recon-issue-list li .recon-link { flex:none; }
.recon-issue-list li > span { flex:1 1 260px; min-width:0; }
.recon-source-coverage { margin-top:18px; overflow-wrap:anywhere; }
.staff-attendance-table { min-width:820px; font-variant-numeric:tabular-nums; }
.staff-attendance-table td { vertical-align:top; word-break:normal; overflow-wrap:break-word; }
.staff-attendance-table td:nth-child(n+3) { white-space:nowrap; }
.staff-sort { display:inline-flex; align-items:center; gap:4px; text-align:inherit; background:transparent; border:0; color:inherit; font:inherit; cursor:pointer; }
.staff-sort span { flex:none; }
.staff-sort:focus-visible { outline:2px solid #176b4e; outline-offset:4px; border-radius:3px; }
.staff-table-hint { display:none; }
@media(max-width:900px) { .staff-table-hint { display:block; } }
.home-widget-cohort-state { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; text-align:left; }
.home-widget-cohort-state > strong { font-size:18px; line-height:1.35; font-weight:650; color:var(--ui-text,#243b37); white-space:normal; }
.home-widget-cohort-state > small { font-size:12px; line-height:1.5; color:var(--ui-muted,#61756b); white-space:normal; overflow-wrap:anywhere; }
.home-widget-cohort-action { margin-top:3px; font-size:12px; font-weight:650; color:var(--brand-primary,#176b4e); }
.home-dashboard-widget.is-rows-1.has-cohort-explanation { grid-row:span 2; }
@media(max-width:640px) { .home-dashboard[class*="is-columns-"] .home-dashboard-widget.has-cohort-explanation { grid-column:span 12; } }
.recon-profit { max-width:720px; }.recon-profit > div { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid #edf1f3; }.recon-profit dd { font-weight:700; white-space:nowrap; }
.recon-error { color:#b91c1c; }
.recon-overlay { position:fixed; inset:0; z-index:10000; background:rgba(15,23,42,.45); display:flex; justify-content:flex-end; }
.recon-order-panel { background:#fff; width:min(980px,94vw); height:100%; overflow-y:auto; box-shadow:-8px 0 40px #0f172a22; }
.recon-order-panel > .recon-header { position:sticky; top:0; background:#fff; z-index:1; }
.recon-order-panel .recon-kpis { padding:0; grid-template-columns:repeat(3,minmax(0,1fr)); }
.recon-vendor-match { background:#f8fafc; border-radius:10px; padding:14px; margin-bottom:10px; }
@media(max-width:760px) {
 .recon-header { align-items:flex-start; flex-direction:column; padding:16px; }.recon-header h1 { font-size:18px; }
 .recon-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); padding:16px; gap:8px; }.recon-kpis article { padding:10px; }.recon-kpis strong { font-size:18px; }
 .recon-days thead { display:none; }.recon-days,.recon-days tbody { display:block; }
 .recon-days tr { display:grid; grid-template-columns:1fr 1fr; padding:12px 16px; gap:10px; border-top:1px solid #e2e8f0; }
 .recon-days td { display:flex; flex-direction:column; align-items:flex-start; text-align:left; padding:0; border:0; min-width:0; white-space:normal; }
 .recon-days td::before { content:attr(data-label); font-size: 12px; color:#64748b; margin-bottom:3px; }
 .recon-days td:first-child::before { display:none; }.recon-days td:first-child { justify-content:center; font-size:15px; }
 .recon-tabs { padding:10px; gap:2px; }.recon-tabs button { flex:1; padding:10px 4px; font-size:13px; }
 .recon-content,.recon-message,.recon-problems { padding:16px; }.recon-section > .recon-caption { padding:0 16px 12px; }
 .recon-filters label { width:100%; }.recon-filters input,.recon-filters select { width:100%; }
 .recon-order-panel { width:100vw; }.recon-order-panel > .recon-header { flex-direction:row; }.recon-order-panel .recon-kpis { grid-template-columns:1fr; }
}

/* Компактная сводка: графики кухни видны сразу под состоянием. */
.live-kitchen-title { font-size:20px; font-weight: 700; line-height:1.2; margin:0 0 5px; color:var(--ui-ink); }
.live-kitchen-presence > strong { display:inline; font-size:13px; margin-right:8px; }
.live-kitchen-presence > small { display:inline; }
.live-kitchen-date-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.live-kitchen-status--compact { display:flex; flex-wrap:wrap; gap:8px 20px; padding:9px 12px; margin-top:12px; }
.live-kitchen-status--compact > strong { font-size:13px; color:var(--ui-ink); }
.live-kitchen-status--compact > span { font-size:12px; color:var(--ui-ink); }
.live-kitchen-status--compact > time { margin-left:auto; }
.live-kitchen-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.live-kitchen-summary article { min-height:0; padding:10px 12px; border-radius:10px; }
.live-kitchen-summary-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 10px; }
.live-kitchen-summary-heading strong { font-size:20px; margin:0; }
.live-kitchen-summary span { font-size: 12px; line-height:1.5; margin-top:5px; }
.live-kitchen-summary-help { color:var(--ui-muted); font-size: 12px; margin:7px 0 0; }
@media (max-width:640px) {
    .live-kitchen-toolbar { gap:10px; }
    .live-kitchen-date-actions { width:100%; }
    .live-kitchen-status--compact > time { margin-left:0; }
    .live-kitchen-summary { grid-template-columns:1fr; gap:5px; }
    .live-kitchen-summary article { padding:7px 10px; }
    .live-kitchen-summary-heading strong { font-size:17px; }
    .live-kitchen-summary span { margin-top:2px; }
}

.live-kitchen-panel .live-kitchen-layers { margin-bottom:4px; }
.live-kitchen-panel .live-kitchen-layers label { min-height:28px; }
.live-kitchen-panel .live-kitchen-chart-note { margin:4px 0; }
.live-kitchen-panel .live-kitchen-station-chart { margin-top:8px; padding-top:8px; }
.live-kitchen-panel .live-kitchen-chart-heading { margin-bottom:6px; }
@media (max-width:640px) {
    .live-kitchen-date-actions input[type="date"] { width:7.4rem; padding-left:2px; padding-right:2px; }
    .live-kitchen-date-actions { gap:5px; }
    .live-kitchen-date-actions > div button { padding-left:6px; padding-right:6px; }
    .live-kitchen-chart-heading span { gap:4px; }
    .live-kitchen-legend-button { font-size: 12px; }
}

.menu-analysis-clean .menu-detail-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; min-height:44px; }
@media(max-width:700px){ .menu-analysis-clean .menu-detail-toolbar { align-items:stretch; flex-direction:column; } .menu-analysis-clean .menu-detail-toolbar .menu-primary { width:100%; } }

.menu-analysis-clean .menu-card-clean { display:flex; flex-direction:column; min-height:286px; }
.menu-analysis-clean .menu-card-clean .menu-card-object { margin-top:0; min-height:18px; }
.menu-analysis-clean .menu-card-clean .menu-card-footer { margin-top:auto; }


/* Первый вход: один понятный следующий шаг вместо сетки одинаковых заглушек. */
.workspace-empty-start { max-width: 760px; margin: 12px auto; padding: clamp(24px, 4vw, 44px); }
.workspace-empty-mark { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; color: var(--ui-accent, #4f46e5); background: #eef2ff; font-size: 26px; margin-bottom: 18px; }
.workspace-empty-start h2 { font-size: clamp(21px, 3vw, 28px); font-weight: 700; line-height: 1.25; }
.workspace-empty-start > p { color: var(--ui-muted, #64748b); margin: 14px 0 24px; line-height: 1.6; }
.workspace-empty-start ol { display: grid; gap: 18px; list-style: decimal; padding-left: 22px; margin-bottom: 28px; }
.workspace-empty-start li { padding-left: 6px; }
.workspace-empty-start li strong, .workspace-empty-start li span { display: block; }
.workspace-empty-start li span { color: var(--ui-muted, #64748b); margin-top: 4px; line-height: 1.5; font-size: 14px; }
.sidebar-brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.login-brand-mark img { width:100%; height:100%; object-fit:contain; background:var(--ui-surface); }
.login-field-label { display:block; color:var(--ui-ink); font-size:13px; font-weight:650; }
.login-field { width:100%; min-height:44px; border:1px solid var(--ui-border-strong); border-radius:var(--ui-radius-sm); padding:10px 12px; color:var(--ui-ink); background:var(--ui-surface); font-size:15px; }
.login-field:focus { outline:3px solid var(--ui-primary-soft); border-color:var(--ui-primary); }
.login-password-control { position:relative; }
.login-password-control .login-field { padding-right:84px; }
.login-password-toggle { position:absolute; right:4px; top:0; min-height:44px; padding:0 9px; color:var(--ui-primary); font-size:12px; font-weight:650; border-radius:6px; }
.login-access-note { padding-top:16px; border-top:1px solid var(--ui-border); color:var(--ui-muted); font-size:12px; line-height:1.6; }
.auth-spinner { width:36px; height:36px; border:3px solid var(--ui-border); border-top-color:var(--ui-primary); border-radius:50%; animation:spin 1s linear infinite; }
.sidebar-secondary-toggle { display:block; width:100%; min-height:36px; margin:6px 0 0; padding:8px 10px; border-radius:6px; color:#c3d9cf; font-size:12px; text-align:left; }
.sidebar-secondary-toggle:hover { background:rgba(255,255,255,.07); color:#fff; }
.mobile-secondary-toggle { width:100%; min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; color:var(--ui-primary); font-size:12px; text-align:left; border-radius:6px; }
.mobile-secondary-toggle:hover { background:var(--ui-primary-soft); }
.mobile-secondary-items { border-top:1px solid var(--ui-border); padding-top:4px; }
.sidebar-group-items--secondary { margin-left:0; padding-left:0; border-left:0; }
.all-sections-secondary { margin-top:6px; padding-top:6px; border-top:1px solid var(--ui-border); }
.all-sections-secondary > summary { min-height:44px; display:flex; align-items:center; gap:8px; padding:8px 10px; color:var(--ui-primary); font-size:13px; font-weight:650; cursor:pointer; list-style:none; }
.all-sections-secondary > summary::before { content:'+'; font-size:18px; }
.all-sections-secondary[open] > summary::before { content:'−'; }
.all-sections-secondary > button { width:100%; }
.home-attention-partial { margin:8px 0 0; font-size:12px; line-height:1.45; color:var(--ui-muted); }
.home-attention-widget .home-widget-error { gap:8px; }
.home-attention-widget .home-widget-error > button { align-self:flex-start; }
.home-attention-partial + .home-attention-widget-list { margin-top:8px; }
.home-attention-widget-list { overflow-y:auto; min-height:0; }
@media (max-width: 640px) { .workspace-empty-start .dashboard-primary-button { width: 100%; } }

.commission-toolbar { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
.workspace-task-context { display:flex; align-items:flex-start; gap:20px; margin:20px 24px 0; padding:16px 18px; border:1px solid var(--ui-border); border-left:3px solid var(--ui-primary); border-radius:10px; background:var(--ui-surface, #fff); }
.workspace-task-context-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.workspace-task-context-meta { margin-bottom:5px; font-size:11px; color:var(--ui-muted); }
.workspace-task-context-copy > strong { display:block; font-size:14px; line-height:1.5; font-weight:650; }
.workspace-task-context-details { margin-top:8px; font-size:13px; line-height:1.6; }
.workspace-task-context-details > summary { width:fit-content; cursor:pointer; color:var(--ui-primary); font-weight:600; }
.workspace-task-context-details > p { margin-top:8px; color:var(--ui-muted); white-space:pre-line; }
.workspace-task-context-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.workspace-task-context-back, .workspace-task-context-close { min-height:40px; border-radius:6px; color:var(--ui-primary); }
.workspace-task-context-back { padding:8px 12px; border:1px solid var(--ui-border); font-size:12px; font-weight:600; }
.workspace-task-context-close { min-width:40px; font-size:22px; color:var(--ui-muted); }
.workspace-task-context-actions button:hover { background:var(--ui-primary-soft); }
@media (max-width:640px) {
    .workspace-task-context { margin:12px 12px 0; padding:12px; gap:8px; flex-wrap:wrap; }
    .workspace-task-context-copy { flex-basis:100%; }
    .workspace-task-context-actions { width:100%; justify-content:space-between; }
    .workspace-task-context-back, .workspace-task-context-close { min-height:44px; }
}
.commission-page .finance-expenses-heading { flex-wrap:wrap; }
.commission-toolbar > * { white-space:normal; }
.commission-toolbar label:focus-within { outline:2px solid #4f46e5; outline-offset:3px; }
.commission-allocation-line { display:grid; grid-template-columns:minmax(0,1fr) 140px auto; gap:8px; }
@media (max-width:640px) {
  .commission-page .finance-expenses-heading { flex-direction:column; }
  .commission-toolbar { width:100%; }
  .commission-toolbar > * { width:100%; justify-content:center; text-align:center; }
  .commission-allocation-line { grid-template-columns:minmax(0,1fr) auto; }
  .commission-allocation-line > :first-child { grid-column:1 / -1; }
}

/* Отчёт: результат → действия → доказательства. Отступ задаёт сам рабочий экран. */
.menu-analysis { padding: 24px 32px 64px; }
.menu-analysis .analysis-header { align-items:flex-start; margin-bottom:24px; }
.menu-analysis .analysis-overline { margin:0 0 8px; font-size:11px; line-height:1.4; font-weight:650; letter-spacing:.08em; text-transform:uppercase; color:#65776e; }
.menu-analysis .analysis-header h1 { font-size:30px; margin-bottom:6px; }
.menu-analysis .analysis-archive { display:grid; gap:8px; min-width:230px; max-width:100%; }
.menu-analysis .analysis-history { display:flex; justify-content:flex-end; align-items:center; gap:8px; font-size:12px; color:#64756c; min-height:28px; cursor:pointer; }
.menu-analysis .analysis-update { display:flex; gap:10px; align-items:center; padding:12px 16px; border:1px solid #e2e7e4; border-radius:10px; background:#f8faf9; color:#617369; font-size:13px; margin-bottom:20px; }
.menu-analysis .analysis-update p { flex:1; }
.menu-analysis .analysis-status-dot { width:6px; height:6px; border-radius:50%; background:#a87729; flex-shrink:0; }
.menu-analysis .analysis-monthly { display:grid; gap:20px; }
.menu-analysis .analysis-result { overflow:hidden; }
.menu-analysis .analysis-result-main { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px; }
.menu-analysis .analysis-result h2 { font-size:20px; margin-bottom:6px; }
.menu-analysis .analysis-result-main p { margin:0; font-size:13px; }
.menu-analysis .analysis-result-main .analysis-overline { margin-bottom:8px; font-size:11px; }
.menu-analysis .analysis-result-value { flex-shrink:0; text-align:right; }
.menu-analysis .analysis-result-value span { display:block; color:#697a71; font-size:12px; }
.menu-analysis .analysis-result-value strong { display:block; font-size:26px; font-weight:650; font-variant-numeric:tabular-nums; margin-top:4px; color:#40554b; letter-spacing:-.6px; }
.menu-analysis .analysis-result-details { padding:12px 24px; background:#fafcfb; border-top:1px solid #edf1ee; font-size:13px; }
.menu-analysis .analysis-result-details summary { min-height:24px; font-size:12px; color:#536b5f; }
.menu-analysis .analysis-result-details p { margin:10px 0; max-width:80ch; }
.menu-analysis .analysis-sections { display:flex; align-items:center; gap:24px; border-bottom:1px solid #dce5df; }
.menu-analysis .analysis-sections button { display:flex; align-items:center; gap:8px; min-height:50px; padding:0 0 12px; margin-bottom:-1px; border-bottom:2px solid transparent; font-size:14px; color:#65756c; text-align:left; }
.menu-analysis .analysis-sections button.is-active { border-color:#1b644c; color:#164d3b; font-weight:650; }
.menu-analysis .analysis-sections button span { padding:2px 7px; background:#e9eeeb; border-radius:5px; font-size:11px; font-weight:600; }
.menu-analysis .analysis-section-note { margin:0; font-size:13px; color:#6a796f; }
.menu-analysis .analysis-scenario-search { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:18px 0; }
.menu-analysis .analysis-scenario-search label { display:grid; gap:6px; width:420px; max-width:100%; color:#53695b; }
.menu-analysis .analysis-scenario-search input { width:100%; min-width:0; min-height:44px; padding:10px 14px; border:1px solid #dce5df; border-radius:10px; background:white; color:#203a2c; }
.menu-analysis .analysis-scenario-search input:focus { outline:2px solid #348565; outline-offset:2px; }
.menu-analysis .analysis-scenario-search p { margin:0 0 10px; }
.menu-analysis :is(.menu-card-amount,.menu-amount,.menu-green).menu-negative { color:#ad3a29; }
.menu-analysis .analysis-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.menu-analysis .analysis-action { padding:22px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.menu-analysis .analysis-action:hover { border-color:#baccc1; }
.menu-analysis .analysis-action-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.menu-analysis .analysis-action-top .analysis-overline { margin:0; }
.menu-analysis .analysis-action-effect { font-size:13px; font-weight:650; color:#1b694b; }
.menu-analysis .analysis-action h2 { font-size:17px; line-height:1.4; margin:0; }
.menu-analysis .analysis-action h2 button { text-align:left; }
.menu-analysis .analysis-action h2 button:hover { color:#1d694e; }
.menu-analysis .analysis-action > p { color:#52675b; font-size:14px; margin:0; }
.menu-analysis .analysis-action-target { padding-top:4px; display:grid; gap:3px; }
.menu-analysis .analysis-action-target span { font-size:11px; color:#748078; }
.menu-analysis .analysis-action-target strong { font-size:13px; color:#3b5547; font-weight:500; }
.menu-analysis .analysis-action footer { margin-top:auto; padding-top:12px; border-top:1px solid #edf1ee; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.menu-analysis .analysis-owner { color:#718076; font-size:12px; }
.menu-analysis .analysis-detail-intro { padding:28px; }
.menu-analysis .analysis-detail-intro h2 { max-width:32ch; font-size:28px; margin-bottom:16px; }
.menu-analysis .analysis-finding { font-size:15px; color:#53695d; max-width:76ch; }
.menu-analysis .analysis-detail-meta { display:flex; flex-wrap:wrap; gap:32px; padding-top:22px; margin-top:22px; border-top:1px solid #e8eeea; }
.menu-analysis .analysis-detail-meta span { font-size:14px; font-weight:550; }
.menu-analysis .analysis-detail-meta small { display:block; font-size:11px; color:#748279; font-weight:400; margin-bottom:5px; }
.menu-analysis .analysis-detail-columns { display:grid; grid-template-columns:1.1fr 1fr; gap:16px; }
.menu-analysis .analysis-detail-columns > section { padding:24px; min-width:0; }
.menu-analysis .analysis-detail-columns h3 { font-size:17px; margin-bottom:16px; }
.menu-analysis .analysis-next-step { font-size:15px; }
.menu-analysis .analysis-target { display:grid; gap:8px; border-left:3px solid #37765b; padding:2px 0 2px 16px; margin:24px 0; }
.menu-analysis .analysis-target span { font-size:12px; color:#64786b; }
.menu-analysis .analysis-target strong { font-size:16px; font-weight:600; }
.menu-analysis .analysis-evidence > p { color:#627468; margin-bottom:14px; }
.menu-analysis .analysis-source { font-size:12px; padding-top:16px; border-top:1px solid #edf1ee; }
.menu-analysis .analysis-observation-list { border:1px solid #e0e8e3; border-radius:12px; background:#fff; overflow:hidden; }
.menu-analysis .analysis-observation { padding:24px 28px; border-bottom:1px solid #e7ede9; }
.menu-analysis .analysis-observation:last-child { border-bottom:0; }
.menu-analysis .analysis-observation-category { margin:0 0 6px; font-size:12px; color:#728176; }
#app .menu-analysis .analysis-observation-title { margin:0 0 10px; font-size:19px; line-height:1.4; font-weight:600; max-width:75ch; }
.menu-analysis .analysis-observation-brief { max-width:85ch; display:grid; gap:12px; line-height:1.6; }
.menu-analysis .analysis-observation-brief p { margin:0; }
.menu-analysis .analysis-observation-meaning { font-size:15px; color:#53695b; }
.menu-analysis .analysis-observation-next { display:grid; gap:3px; padding-left:14px; border-left:3px solid #72a68b; font-size:15px; color:#294737; }
.menu-analysis .analysis-observation-next strong { font-size:12px; font-weight:600; }
.menu-analysis .analysis-observation-caution { font-size:13px; color:#6b766e; }
.menu-analysis .analysis-observation-details > summary { margin-top:14px; padding:2px 0; width:fit-content; cursor:pointer; font-size:13px; font-weight:500; color:#22634a; }
.menu-analysis .analysis-observation-details > summary:focus-visible { outline:2px solid #22634a; outline-offset:4px; border-radius:2px; }
.menu-analysis .analysis-observation-body { max-width:85ch; margin-top:16px; padding-top:16px; border-top:1px solid #e7ede9; display:grid; gap:16px; font-size:14px; line-height:1.7; color:#53695b; overflow-wrap:anywhere; }
.menu-analysis .analysis-observation-body strong { color:#263f32; }
.menu-analysis .analysis-observation-body p { margin:0; }
.menu-analysis .analysis-observation-heading { display:flex; align-items:baseline; gap:12px; margin-bottom:14px; }
#app .menu-analysis .analysis-observation-heading h2 { font-size:17px; }
.menu-analysis .analysis-observation-heading p { font-size:12px; color:#718175; }
.menu-analysis .analysis-investigations { margin-top:28px; }
.menu-analysis .analysis-investigations-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px; margin-bottom:14px; }
#app .menu-analysis .analysis-investigations-heading h2 { font-size:18px; }
.menu-analysis .analysis-investigations-heading > span { font-size:13px; color:#687b6d; }
.menu-analysis .analysis-investigation-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; }
.menu-analysis .analysis-investigation { min-width:0; padding:20px; display:grid; align-content:start; gap:12px; overflow-wrap:anywhere; }
.menu-analysis .analysis-investigation p { margin:0; }
.menu-analysis .analysis-investigation-badge { justify-self:start; border-radius:6px; padding:4px 8px; background:#f5f0e4; color:#75612f; font-size:12px; }
#app .menu-analysis .analysis-investigation h3 { font-size:17px; line-height:1.4; font-weight:600; }
.menu-analysis .analysis-investigation-reason { color:#617269; font-size:14px; line-height:1.6; }
.menu-analysis .analysis-investigation-action { display:grid; gap:4px; font-size:14px; line-height:1.6; }
.menu-analysis .analysis-investigation-action strong { font-size:12px; color:#355444; }
.menu-analysis .analysis-investigation details { font-size:13px; line-height:1.6; }
.menu-analysis .analysis-investigation details > :not(summary) { margin-top:12px; }
.menu-analysis .analysis-investigation details ul { padding-left:18px; list-style:disc; }
.refund-coverage-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0 20px; }
.refund-coverage-item { padding:16px; border:1px solid #e3e9e6; border-radius:10px; background:#fafcfb; }
.refund-coverage-item dt { color:#334e3f; font-size:13px; font-weight:550; line-height:1.5; min-height:39px; }
.refund-coverage-item dd { margin-top:6px; font-size:12px; color:#6e8073; }
.refund-coverage-item dd:last-child { font-size:19px; font-weight:600; color:#314f3e; font-variant-numeric:tabular-nums; }
.recon-day-filter button[aria-pressed="true"] { color:#22634a; background:#e8f3ed; }
@media(max-width:1100px) { .menu-analysis { padding-inline:24px; } .menu-analysis .analysis-detail-columns { grid-template-columns:1fr; } }
@media(max-width:700px) {
 .menu-analysis { padding:20px 16px 48px; }
 .menu-analysis .analysis-header h1 { font-size:26px; }
 .menu-analysis .analysis-archive { width:100%; }
 .menu-analysis .analysis-update { flex-wrap:wrap; }
 .menu-analysis .analysis-update p { flex-basis:80%; }
 .menu-analysis .analysis-update button { margin-left:16px; }
 .menu-analysis .analysis-result-main { flex-direction:column; align-items:flex-start; padding:20px; gap:16px; }
 .menu-analysis .analysis-result-value { text-align:left; }
 .menu-analysis .analysis-result-details { padding:12px 20px; }
 .menu-analysis .analysis-sections { gap:16px; }
 .menu-analysis .analysis-sections button { font-size:13px; }
 .menu-analysis .analysis-actions { grid-template-columns:1fr; }
 .menu-analysis .analysis-action,.menu-analysis .analysis-detail-intro,.menu-analysis .analysis-detail-columns > section { padding:20px; }
 .menu-analysis .analysis-detail-intro h2 { font-size:23px; }
 .menu-analysis .analysis-detail-meta { gap:20px; }
 .menu-analysis .analysis-observation { padding:20px 16px; }
 #app .menu-analysis .analysis-observation-title { font-size:17px; }
 .refund-coverage-grid { grid-template-columns:1fr; }
 .refund-coverage-item { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; }
 .refund-coverage-item dt { min-height:0; grid-column:1; }
 .refund-coverage-item dd { grid-column:1; }
 .refund-coverage-item dd:last-child { grid-column:2; grid-row:1 / 3; align-self:center; margin:0; }
}

/* При программном переходе заголовок и возврат остаются ниже закреплённой шапки. */
.menu-analysis .menu-detail-toolbar, .menu-analysis h1[tabindex], .menu-analysis h2[tabindex] { scroll-margin-top:104px; }
.menu-analysis .menu-sources { scroll-margin-top:104px; }
@media(max-width:720px) { .menu-analysis .menu-sources { scroll-margin-top:220px; } }
#app .prep-workspace h2 { font-size:20px; line-height:1.35; }
#app .prep-workspace h3 { font-size:16px; line-height:1.4; }
@media(max-width:720px) { #app .prep-workspace h2 { font-size:18px; } }

/* Причины сверки финансов: отдельные статьи и обычный текст вместо жёлтого списка. */
.finance-review { border:1px solid #e0e8e3; border-radius:12px; background:#fff; overflow:hidden; }
.finance-review > summary { padding:18px 22px; cursor:pointer; color:#294737; font-size:15px; font-weight:600; line-height:1.45; }
.finance-review-content { display:grid; gap:16px; padding:0 22px 22px; }
.finance-review .finance-review-intro { margin:0; color:#728176; font-size:12px; line-height:1.6; }
.finance-review-card { display:grid; gap:12px; padding:18px 20px; border:1px solid #e3e9e6; border-radius:10px; background:#fafcfb; min-width:0; }
#app .finance-review-card h3 { margin:0; color:#294737; font-size:16px; font-weight:600; line-height:1.45; }
.finance-review-card p { margin:0; color:#53695b; font-size:14px; line-height:1.7; max-width:100ch; overflow-wrap:anywhere; }
.finance-review-coverage { background:#f4f7f5; }
@media(max-width:640px) {
 .finance-review > summary { padding:16px; }
 .finance-review-content { padding:0 12px 12px; gap:12px; }
 .finance-review-card { padding:16px; }
 #app .finance-review-card h3 { font-size:15px; }
}

/* Команда и выплаты: один ФОТ, отдельные раскрываемые источники и табель. */
.staff-payroll-summary, .staff-payroll-attendance { padding:24px; min-width:0; }
.staff-payroll-summary p, .staff-payroll-attendance p { margin:0; line-height:1.6; }
#app .staff-payroll-summary h2, #app .staff-payroll-attendance h2 { margin:0 0 8px; font-size:22px; line-height:1.3; }
.staff-payroll-total { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; }
.staff-payroll-total > div { min-width:0; }
.staff-payroll-total p { color:#65746b; font-size:14px; }
.staff-payroll-total .staff-payroll-eyebrow { margin-bottom:8px; color:#47715a; font-size:12px; }
.staff-payroll-total-value { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.staff-payroll-total-value strong { color:#244d36; font-size:32px; line-height:1.2; white-space:nowrap; }
.staff-payroll-total-value span { color:#65746b; font-size:12px; }
.staff-payroll-equation { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:20px; margin:22px 0 16px; padding:20px; border:1px solid #dce7df; border-radius:12px; background:#f7faf8; }
.staff-payroll-equation > div { display:flex; flex-direction:column; gap:6px; min-width:0; }
.staff-payroll-equation span { color:#536a5b; font-size:14px; }
.staff-payroll-equation strong { color:#294737; font-size:20px; }
.staff-payroll-equation small { color:#738278; font-size:12px; line-height:1.5; }
.staff-payroll-equation .staff-payroll-plus { color:#8a9d90; font-size:22px; }
.staff-payroll-note { color:#738278; font-size:13px; line-height:1.6; margin:0 0 12px; }
.staff-payroll-summary .staff-payroll-state { margin-top:12px; }
.staff-payroll-state { padding:12px 14px; border-radius:8px; background:#f3f6f4; color:#596d60; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.staff-payroll-disclosure { min-width:0; overflow:hidden; }
.staff-payroll-disclosure > summary { padding:20px 24px; cursor:pointer; color:#294737; font-size:16px; font-weight:600; line-height:1.5; }
.staff-payroll-body { display:grid; gap:24px; padding:0 24px 24px; min-width:0; }
#app .staff-payroll-body h3 { margin:0 0 8px; font-size:16px; line-height:1.45; color:#294737; }
.staff-payroll-people { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.staff-payroll-person { border:1px solid #e3e9e6; border-radius:8px; min-width:0; }
.staff-payroll-person > summary { display:flex; gap:12px; justify-content:space-between; padding:14px; font-size:14px; cursor:pointer; }
.staff-payroll-person > summary span { min-width:0; overflow-wrap:anywhere; }
.staff-payroll-person > summary strong { white-space:nowrap; }
.staff-payroll-person > summary::before { content:'+'; color:#738278; }
.staff-payroll-person[open] > summary::before { content:'−'; }
.staff-payroll-person dl, .staff-payroll-attendance-row dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0; padding:16px; background:#f7faf8; border-top:1px solid #e3e9e6; }
.staff-payroll-person dl { grid-template-columns:1fr; gap:8px; }
.staff-payroll-person dl > div { display:flex; justify-content:space-between; gap:16px; }
.staff-payroll-body dt, .staff-payroll-attendance-row dt { color:#738278; font-size:12px; line-height:1.5; }
.staff-payroll-body dd, .staff-payroll-attendance-row dd { margin:4px 0 0; color:#294737; font-size:14px; }
.staff-payroll-person dd { margin:0; }
.staff-payroll-manual-list { padding:0; list-style:none; display:grid; gap:10px; }
.staff-payroll-manual-list li { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:14px; }
.staff-payroll-manual-list li > span { flex:1; min-width:140px; }
.staff-payroll-manual-list small { display:block; color:#738278; margin-top:4px; }
.staff-payroll-manual-list button { color:#a75b55; text-decoration:underline; font-size:12px; }
.staff-payroll-add > summary { cursor:pointer; color:#47715a; font-size:14px; }
.staff-payroll-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; }
.staff-payroll-form label { display:flex; flex-direction:column; gap:7px; min-width:0; color:#65746b; font-size:13px; }
.staff-payroll-form input { width:100%; min-width:0; padding:10px 12px; border:1px solid #dce7df; border-radius:8px; }
.staff-payroll-form button { justify-self:start; padding:10px 16px; border-radius:8px; background:#e8f1eb; color:#294737; }
.staff-payroll-reconciliation { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0; }
.staff-payroll-reconciliation dd { font-size:18px; }
.staff-payroll-attendance header { display:flex; gap:24px; justify-content:space-between; margin-bottom:16px; }
.staff-payroll-attendance header > div:first-child { max-width:640px; min-width:0; }
.staff-payroll-attendance header p { color:#65746b; font-size:14px; }
.staff-payroll-attendance-stats { display:flex; flex-direction:column; gap:10px; min-width:170px; color:#738278; font-size:13px; }
.staff-payroll-attendance-stats strong { color:#294737; font-size:18px; }
.staff-payroll-attendance-columns, .staff-payroll-attendance-row > summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(110px,140px) minmax(100px,140px); align-items:center; gap:16px; }
.staff-payroll-attendance-columns { padding:18px 14px 12px; color:#738278; font-size:12px; }
.staff-payroll-attendance-columns button { text-align:right; }
.staff-payroll-attendance-columns button:first-child { text-align:left; }
.staff-payroll-attendance-row { border-top:1px solid #e3e9e6; }
.staff-payroll-attendance-row > summary { padding:16px 14px; cursor:pointer; list-style:none; }
.staff-payroll-attendance-row > summary::-webkit-details-marker { display:none; }
.staff-payroll-attendance-row > summary:hover { background:#f7faf8; }
.staff-payroll-employee { min-width:0; overflow-wrap:anywhere; }
.staff-payroll-employee strong { display:block; color:#294737; font-size:14px; line-height:1.5; }
.staff-payroll-employee small { display:block; color:#738278; font-size:12px; margin-top:4px; line-height:1.5; }
.staff-payroll-hours, .staff-payroll-row-amount { text-align:right; font-size:14px; color:#536a5b; white-space:nowrap; }
.staff-payroll-row-amount { color:#294737; font-weight:600; }
.staff-payroll-empty { margin-top:16px !important; color:#738278; font-size:14px; }
.staff-payroll-source-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.staff-payroll-source-grid article { min-width:0; padding:16px; border:1px solid #e3e9e6; border-radius:10px; background:#fafcfb; }
.staff-payroll-source-grid article.is-error { border-color:#e8c8c4; }
.staff-payroll-source-grid p { margin:0 0 10px; color:#65746b; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.staff-payroll-source-grid small { color:#839187; font-size:12px; line-height:1.5; }
@media(max-width:640px) {
 .staff-payroll-summary, .staff-payroll-attendance { padding:18px 14px; }
 #app .staff-payroll-summary h2, #app .staff-payroll-attendance h2 { font-size:20px; }
 .staff-payroll-total, .staff-payroll-attendance header { flex-direction:column; gap:16px; }
 .staff-payroll-total-value { align-items:flex-start; }
 .staff-payroll-total-value strong { font-size:30px; }
 .staff-payroll-equation { gap:10px; padding:14px 12px; }
 .staff-payroll-equation span { font-size:12px; }
 .staff-payroll-equation strong { font-size:17px; }
 .staff-payroll-equation small { font-size:11px; }
 .staff-payroll-disclosure > summary { padding:18px 14px; font-size:15px; }
 .staff-payroll-body { padding:0 14px 18px; gap:20px; }
 .staff-payroll-people, .staff-payroll-source-grid, .staff-payroll-form, .staff-payroll-reconciliation { grid-template-columns:1fr; }
 .staff-payroll-reconciliation > div { display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
 .staff-payroll-reconciliation dd { font-size:16px; white-space:nowrap; }
 .staff-payroll-attendance-stats { flex-direction:row; flex-wrap:wrap; min-width:0; gap:16px; }
 .staff-payroll-attendance-columns { grid-template-columns:minmax(0,1fr) 80px 90px; gap:6px; padding:16px 0 10px; font-size:11px; }
 .staff-payroll-attendance-row > summary { grid-template-columns:minmax(0,1fr) 90px; gap:8px 12px; padding:16px 0; }
 .staff-payroll-employee { grid-row:span 2; }
 .staff-payroll-hours, .staff-payroll-row-amount { font-size:13px; }
 .staff-payroll-attendance-row dl { grid-template-columns:repeat(2,minmax(0,1fr)); padding:14px 10px; gap:14px; }
}

/* Предупреждение о незаполненных специализациях кухни. */
.kitchen-assignment-notice {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 18px 20px; border: 1px solid #ead8b3; border-radius: 16px; background: #fffaf0;
}
.kitchen-assignment-notice-copy { min-width: 0; }
.kitchen-assignment-notice-copy strong { color: #73500f; font-size: 15px; line-height: 1.5; }
.kitchen-assignment-notice-copy p { margin: 5px 0 0; max-width: 720px; color: #786746; font-size: 13px; line-height: 1.55; }
.kitchen-assignment-notice-action { flex-shrink: 0; background: #fff; color: #73500f; border-color: #dfca9d; }
.kitchen-assignment-complete { margin: 0; padding: 0 4px; color: var(--brand, #16684f); font-size: 13px; line-height: 1.5; }
.kitchen-assignment-heading { scroll-margin-top: 112px; }
.kitchen-assignment-heading:focus-visible { outline: 2px solid var(--brand, #16684f); outline-offset: 4px; border-radius: 4px; }
.kitchen-assignment-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-bottom: 1px solid #e8eeee; }
.kitchen-assignment-filters button { min-height: 40px; border: 1px solid #dce6e1; border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 650; color: #66766f; background: #fff; }
.kitchen-assignment-filters button[aria-pressed="true"] { color: #16684f; border-color: #a8c9bd; background: #eff6f2; }
.kitchen-assignment-filters button:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) {
    .kitchen-assignment-notice { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
    .kitchen-assignment-notice-action { width: 100%; }
    .kitchen-assignment-filters { padding: 12px 16px; }
}

/* Автосверка: один статус и раскрываемый результат. */
.finance-auto-check { border:1px solid #dce6e0; border-radius:14px; background:#fff; padding:18px 20px; min-width:0; }
.finance-auto-check-summary { display:flex; align-items:flex-start; gap:12px; }
.finance-auto-check-icon { display:grid; place-items:center; flex:0 0 30px; height:30px; border-radius:50%; color:#587064; background:#eef3f0; font-size:17px; }
#app .finance-auto-check h3 { margin:1px 0 5px; color:#244535; font-size:15px; font-weight:650; line-height:1.4; }
.finance-auto-check p { margin:0; color:#66786c; font-size:13px; line-height:1.55; overflow-wrap:anywhere; }
.finance-auto-check-meta { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:9px; font-size:12px; color:#526a5b; }
.finance-auto-check.is-ready { border-color:#cbded1; background:#f7fbf8; }
.finance-auto-check.is-ready .finance-auto-check-icon { color:#176b4e; background:#e2f0e7; }
.finance-auto-check.is-decision .finance-auto-check-icon { color:#936421; background:#fbf1d9; }
.finance-auto-check.is-error .finance-auto-check-icon { color:#a54242; background:#fbe8e8; }
.finance-auto-check-details { margin-top:14px; border-top:1px solid #e9eeeb; }
.finance-auto-check-details > summary { padding-top:13px; font-size:13px; font-weight:600; color:#286448; cursor:pointer; }
.finance-auto-check-details > summary span { font-size:11px; color:#78867e; font-weight:400; }
.finance-auto-check-sections { display:grid; gap:18px; padding-top:18px; }
#app .finance-auto-check h4 { display:flex; align-items:center; gap:8px; margin:0 0 6px; font-size:12px; color:#75837b; font-weight:600; }
.finance-auto-check h4 span { background:#edf2ef; border-radius:5px; padding:1px 6px; }
.finance-auto-check-sections article { padding:12px 0; border-bottom:1px solid #edf1ee; min-width:0; }
.finance-auto-check-sections article:last-child { padding-bottom:0; border:0; }
.finance-auto-check-sections article > div { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:5px 16px; }
.finance-auto-check-sections strong { font-size:13px; color:#354f40; font-weight:600; }
.finance-auto-check-labels, .finance-auto-check-sections small { font-size:12px; color:#75857b; overflow-wrap:anywhere; }
.finance-auto-check-sections p, .finance-auto-check-sections small { display:block; margin-top:5px; }
.finance-auto-check-time { display:block; margin-top:12px; color:#78867e; font-size:11px; }
.finance-auto-check-link { display:inline-flex; gap:8px; align-items:center; margin:12px 0 0 42px; padding:5px 0; color:#176b4e; font-size:12px; font-weight:600; }
.finance-auto-check.is-compact { margin-bottom:16px; padding:14px; border-radius:10px; background:#f7faf8; }
.finance-auto-check.is-compact .finance-auto-check-meta { gap:5px 12px; font-size:11px; }
@media(max-width:600px) {
 .finance-auto-check { padding:16px; border-radius:12px; }
 .finance-auto-check-summary { gap:10px; }
 .finance-auto-check-icon { flex-basis:26px; height:26px; }
 .finance-auto-check-details > summary span { display:block; margin-top:4px; }
 .finance-auto-check-sections article > div { display:grid; gap:5px; }
 .finance-auto-check-link { margin-left:36px; min-height:36px; }
}

/* Общая база финансовых процентов доступна рядом с периодом на всех экранах. */
.header-finance-scenario {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    min-height:46px; padding:6px 10px; border:1px solid #d9e0dc; border-radius:8px;
    background:#fff; color:#53695b; text-align:left; cursor:pointer;
}
.header-finance-scenario:hover { border-color:#a8c9b8; background:#f7faf8; }
.header-finance-scenario:focus-visible { outline:3px solid rgba(23,107,78,.28); outline-offset:3px; }
.header-finance-scenario-copy { display:grid; gap:2px; white-space:nowrap; }
.header-finance-scenario-copy > span { font-size:11px; line-height:1.35; font-weight:600; }
.header-finance-scenario-copy > small { color:#7b6550; font-size:11px; line-height:1.3; }
.header-finance-scenario.is-after-commissions .header-finance-scenario-copy > small { color:#176b4e; }
.header-finance-scenario-track { display:block; flex:0 0 32px; height:19px; padding:3px; border-radius:12px; background:#a8afa9; transition:background .15s; }
.header-finance-scenario-track > span { display:block; width:13px; height:13px; border-radius:50%; background:#fff; transition:transform .15s; }
.header-finance-scenario.is-after-commissions .header-finance-scenario-track { background:#176b4e; }
.header-finance-scenario.is-after-commissions .header-finance-scenario-track > span { transform:translateX(13px); }
.v2-app-shell .app-header-main:has(.header-finance-scenario) { grid-template-columns:minmax(160px,1fr) max-content max-content max-content; }
.v2-app-shell .header-finance-scenario { grid-column:3; grid-row:1; }
.v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-account { grid-column:4; }
@container app-header (max-width:1300px) {
    .v2-app-shell .app-header-main:has(.header-finance-scenario) { grid-template-columns:minmax(46px,1fr) max-content max-content; }
    .v2-app-shell .header-finance-scenario { grid-column:2; grid-row:2; justify-self:end; }
    .v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-account { grid-column:3; grid-row:1; }
}
@container app-header (max-width:1100px) {
    .v2-app-shell .app-header-main:has(.header-finance-scenario) { grid-template-columns:46px minmax(0,1fr) max-content; }
}
@media(max-width:900px) {
    .v2-app-shell .header-finance-scenario { flex:0 0 auto; order:2; margin-right:auto; }
    .v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-context { width:100%; flex:1 0 100%; order:3; }
    .v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-account { margin-left:0; }
}
@media(prefers-reduced-motion:reduce) {
    .header-finance-scenario-track, .header-finance-scenario-track > span { transition:none; }
}

/* Новая метрика укладывается в текущую сетку без узкой последней карточки. */
.finance-overview-kpis { grid-template-columns:repeat(12,minmax(0,1fr)); }
.finance-overview-kpis > button { grid-column:span 3; }
.finance-overview-kpis > button:nth-child(-n+4) .finance-kpi-copy strong { font-size:clamp(16px,1.3vw,22px); white-space:normal; overflow-wrap:anywhere; }
.finance-overview-kpis > button:nth-child(n+5) { grid-column:span 4; }
.finance-expenses-metrics { grid-template-columns:repeat(6,minmax(0,1fr)); }
.finance-expenses-metrics > article { min-width:0; grid-column:span 2; }
.finance-expenses-metrics > article:nth-child(n+4) { grid-column:span 3; }
.finance-expenses-panel > .finance-gross-profit-chart { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
@media(max-width:1180px) {
    .finance-overview-kpis > button { grid-column:span 6; }
    .finance-overview-kpis > button:nth-child(n+5) { grid-column:span 4; }
}
@media(max-width:760px) {
    .finance-overview-kpis > button, .finance-overview-kpis > button:nth-child(n+5) { grid-column:span 6; }
    .finance-overview-kpis > button:last-child { grid-column:1 / -1; }
    .finance-expenses-metrics > article, .finance-expenses-metrics > article:nth-child(n+4) { grid-column:span 3; }
    .finance-expenses-metrics > article:last-child { grid-column:1 / -1; }
}
@media(max-width:430px) {
    .finance-overview-kpis > button, .finance-overview-kpis > button:nth-child(n+5) { grid-column:1 / -1; }
}

/* Ресторанное рабочее пространство: общая оболочка и фокус ограничения. */
body { color:var(--ui-ink); background:var(--ui-canvas); }
button,input,select,textarea { font:inherit; }
button { touch-action:manipulation; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:2px solid var(--ui-primary); outline-offset:3px; }
.v2-app-shell { min-width:0; }
.v2-app-shell .glass-panel { border-color:var(--ui-border); background:var(--ui-surface); box-shadow:var(--ui-shadow-card); backdrop-filter:none; }
.v2-app-shell :is(.btn-primary,.dashboard-primary-button) { color:#fff; border:1px solid var(--ui-primary); border-radius:8px; background:var(--ui-primary); box-shadow:none; }
.v2-app-shell :is(.btn-primary,.dashboard-primary-button):hover:not(:disabled) { background:var(--ui-primary-hover); }
.v2-app-shell :is(.btn-secondary,.dashboard-secondary-button,.workspace-page-header__reload) { border-color:var(--ui-border); color:var(--ui-ink); background:var(--ui-surface); box-shadow:none; }
.v2-app-shell :is(.btn-secondary,.dashboard-secondary-button,.workspace-page-header__reload):hover:not(:disabled) { border-color:var(--ui-border-strong); background:var(--ui-surface-muted); }
.v2-app-shell :is(.text-indigo-500,.text-indigo-600,.text-indigo-700,.text-purple-600,.text-violet-600) { color:var(--ui-primary); }
.v2-app-shell :is(.bg-indigo-50,.bg-purple-50,.bg-violet-50) { background-color:var(--ui-primary-soft); }
.v2-app-shell :is(.bg-indigo-600,.bg-purple-600,.bg-violet-600) { background-color:var(--ui-primary); }
.v2-app-shell :is(.border-indigo-100,.border-indigo-200) { border-color:var(--ui-accent-soft); }
.v2-app-shell :is(.hover\:bg-indigo-50,.hover\:bg-indigo-100):hover { background-color:var(--ui-primary-soft); }
.v2-app-shell :is(.hover\:bg-indigo-700,.hover\:bg-purple-700):hover { background-color:var(--ui-primary-hover); }
.v2-app-shell :is(.workspace-page,.overview-page,.home-dashboard) { min-width:0; padding-top:20px; padding-bottom:48px; }
.v2-app-shell :is(.workspace-page-header h1,.home-dashboard-heading h1) { color:var(--ui-ink); font-size:clamp(24px,2.2vw,30px); font-weight:650; letter-spacing:-.025em; line-height:1.2; }
.v2-app-shell :is(.workspace-page-header__description,.home-dashboard-heading > p) { color:var(--ui-muted); font-size:13px; line-height:1.5; }
.v2-app-shell :is(.workspace-page table,.finance-overview table,.glass-panel table) { color:var(--ui-ink); font-variant-numeric:tabular-nums; }
.v2-app-shell :is(.workspace-page,.glass-panel) table th { background:var(--ui-surface-muted); color:var(--ui-muted); border-color:var(--ui-border); }
.v2-app-shell :is(.workspace-page,.glass-panel) table td { border-color:var(--ui-border); }
.v2-app-shell :is(.workspace-page,.glass-panel) table tbody tr:hover { background:#f7fafb; }
.v2-app-shell :is(.workspace-page,.glass-panel) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { border-color:var(--ui-border); border-radius:8px; color:var(--ui-ink); background-color:var(--ui-surface); }
.v2-app-shell :is(.workspace-page,.glass-panel) :is(input,select,textarea):focus { border-color:var(--ui-primary); }

/* Все разделы и личные закрепления сохраняются в общей навигации. */
.app-sidebar { width:250px; padding:18px 12px 14px; color:#d6e2e8; background:#182f3b; border:0; border-radius:0; box-shadow:none; }
.app-sidebar .sidebar-brand { min-height:60px; padding:7px 10px 14px; }
.app-sidebar .sidebar-brand-mark { width:38px; height:38px; flex-basis:38px; border-radius:10px; border:1px solid #49606b; background:#fff; }
.app-sidebar .sidebar-brand-copy strong { color:#fff; font-size:14px; font-weight:600; }
.app-sidebar .sidebar-brand-copy small { color:#a4bac5; font-size:11px; }
.app-sidebar .sidebar-search { min-height:38px; margin:10px 6px 16px; border-color:#415762; border-radius:8px; background:#203a47; }
.app-sidebar .sidebar-search input { color:#f3f7f9; font-size:12px; }
.app-sidebar .sidebar-search input::placeholder,.app-sidebar .sidebar-search .navigation-icon { color:#a9bdc8; }
.app-sidebar .sidebar-search:focus-within { border-color:#9ec6d7; box-shadow:none; }
.app-sidebar .sidebar-groups { padding-inline:0; }
.app-sidebar .sidebar-group + .sidebar-group { margin-top:6px; }
.app-sidebar .sidebar-group > p { padding-inline:10px; color:#a4bac5; font-size:11px; letter-spacing:.04em; }
.app-sidebar :is(.sidebar-group-toggle,.sidebar-group-shortcut,.sidebar-all-sections,.sidebar-assistant) { min-height:42px; color:#d6e2e8; border-radius:8px; font-weight:500; font-size:13px; }
.app-sidebar :is(.sidebar-group-toggle,.sidebar-group-shortcut,.sidebar-all-sections,.sidebar-assistant,.sidebar-group-chevron-button):hover { color:#fff; background:#284652; }
.app-sidebar :is(.sidebar-group-toggle.is-overview-active,.sidebar-group-shortcut.is-active,.sidebar-all-sections.is-active,.sidebar-assistant.is-active) { color:#fff; background:#2c596b; box-shadow:inset 3px 0 #a5d0df; }
.app-sidebar .sidebar-item-icon { color:#b7ccd7; background:transparent; }
.app-sidebar :is(.sidebar-group-toggle.is-overview-active,.sidebar-all-sections.is-active) .sidebar-item-icon { color:#fff; background:transparent; }
.app-sidebar :is(.sidebar-group-chevron,.sidebar-group-chevron-button) { color:#a5bdc9; }
.app-sidebar .sidebar-group-items { margin-left:29px; padding-left:8px; border-left-color:#405863; }
.app-sidebar .sidebar-group-items--secondary { margin-left:0; }
.app-sidebar .sidebar-route-link { min-height:36px !important; color:#b8cbd5 !important; font-size:12px !important; border-radius:6px !important; }
.app-sidebar .sidebar-route-link:hover { color:#fff !important; background:#284652 !important; }
.app-sidebar .sidebar-route-link.is-active { color:#fff !important; background:#2c596b !important; box-shadow:none !important; }
.app-sidebar :is(.sidebar-pin-button,.sidebar-secondary-toggle) { color:#a5bdc9; }
.app-sidebar .sidebar-pin-button.is-pinned { color:#d3e8f0; }
.app-sidebar .sidebar-footer { padding-top:12px; border-top-color:#415762; }
.app-sidebar .sidebar-footer .sidebar-assistant > span:first-child { color:#b7dce9; }
.app-sidebar :is(button,input):focus-visible { outline-color:#b7dce9; outline-offset:-2px; }
.sidebar-collapse-toggle { color:var(--ui-primary); border-color:var(--ui-border); background:#fff; box-shadow:var(--ui-shadow-card); }

/* Период, база процентов и аккаунт остаются доступны на своих маршрутах. */
.v2-app-shell .app-shell-header { margin-bottom:0; padding:12px 32px; border-bottom:1px solid var(--ui-border); background:var(--ui-surface); backdrop-filter:none; }
.v2-app-shell .app-header-main,.v2-app-shell .app-header-main:has(.header-finance-scenario) { min-height:42px; display:grid; grid-template-columns:minmax(80px,1fr) max-content max-content max-content; gap:12px; }
.app-header-leading { min-width:0; grid-column:1; grid-row:1; display:flex; align-items:center; gap:16px; }
.app-workspace-location { min-width:0; display:flex; align-items:center; flex-wrap:wrap; gap:7px; font-size:12px; }
.app-workspace-location > span { color:var(--ui-subtle); }
.app-workspace-location > strong { min-width:0; overflow:hidden; color:var(--ui-ink); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.v2-app-shell .app-header-leading .app-assistant-command { flex:0 0 auto; width:auto; min-width:0; max-width:none; min-height:36px; display:inline-flex; justify-content:center; gap:7px; margin:0; padding:7px 10px; color:var(--ui-primary); border:1px solid var(--ui-border); border-radius:8px; background:#fff; }
.v2-app-shell .app-header-leading .app-assistant-command:hover { background:var(--ui-primary-soft); border-color:var(--ui-border-strong); }
.v2-app-shell .app-header-leading .app-assistant-command-icon { display:block; width:16px; height:16px; color:var(--ui-primary); }
.v2-app-shell .app-header-leading .app-assistant-command-label { display:block; font-size:12px; font-weight:500; }
.v2-app-shell .app-header-context { grid-column:2; grid-row:1; margin:0; }
.v2-app-shell .app-header-main:has(.header-finance-scenario) .header-finance-scenario { grid-column:3; grid-row:1; }
.v2-app-shell .app-header-main .app-header-account,.v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-account { grid-column:4; grid-row:1; }
.v2-app-shell .header-period { gap:7px; }
.v2-app-shell .header-period-presets { padding:3px; border-color:var(--ui-border); border-radius:8px; background:var(--ui-surface-muted); }
.v2-app-shell .header-period-presets button { min-height:32px; padding-inline:8px; border-radius:5px; color:var(--ui-muted); font-size:11px; }
.v2-app-shell .header-period-presets .header-period-closed-month { min-width:102px; white-space:nowrap; }
.v2-app-shell .header-period-presets button.is-active { color:var(--ui-primary); background:#fff; box-shadow:0 1px 3px #202d3712; }
.v2-app-shell .header-period-custom summary { min-height:40px; min-width:190px; padding-inline:10px; border:1px solid var(--ui-border); border-radius:8px; color:var(--ui-muted); background:#fff; }
.v2-app-shell .header-period-custom summary strong { color:var(--ui-ink); font-weight:500; }
.header-period-popover { border:1px solid var(--ui-border); border-radius:10px; background:#fff; box-shadow:0 10px 30px #202d3720; }
.header-finance-scenario { min-height:40px; padding:5px 9px; border-color:var(--ui-border); color:var(--ui-muted); border-radius:8px; background:#fff; }
.header-finance-scenario:hover { border-color:var(--ui-border-strong); background:var(--ui-surface-muted); }
.header-finance-scenario-copy small { color:var(--ui-ink); }
.header-finance-scenario.is-after-commissions .header-finance-scenario-track { border-color:var(--ui-primary); background:var(--ui-primary); }
.app-connection { min-height:36px; border:0; color:var(--ui-muted); background:transparent; }
.v2-app-shell .app-user { min-height:36px; border:0; padding-left:5px; background:transparent; }
.app-user > span { color:var(--ui-muted); font-size:12px; }
.v2-app-shell .app-user button,.v2-app-shell .app-login { min-height:36px; color:var(--ui-ink); border-color:var(--ui-border); background:#fff; }
.app-stage-context { min-width:0; }
.rebuild-source-note { position:relative; padding:8px 32px; border-bottom:1px solid #f0dfb7; color:#786022; background:#fff9ed; font-size:12px; line-height:1.6; }
@media (min-width:901px) {
    body:has(.v2-app-shell .primary-navigation:not(.is-collapsed)) > .rebuild-source-note { padding-left:282px; }
    body:has(.v2-app-shell .primary-navigation.is-collapsed) > .rebuild-source-note { padding-left:108px; }
}

/* Один фокус, доказательства, действие и повторный замер. */
.home-dashboard.is-home .home-dashboard-header { min-height:94px; padding:2px 0 20px; }
.home-dashboard.is-home .home-dashboard-heading > small { display:block; margin-top:7px; color:var(--ui-subtle); font-size:11px; }
.home-dashboard.is-home .home-dashboard-actions { padding-top:3px; }
.constraint-workspace { display:grid; gap:18px; margin-bottom:24px; }
.constraint-source-note { display:flex; gap:9px; align-items:flex-start; color:#786022; font-size:12px; line-height:1.5; }
.constraint-source-note > svg { flex:0 0 16px; width:16px; height:16px; margin-top:1px; }
.constraint-source-note p { margin:0; }
.constraint-source-note strong { font-weight:600; }
.constraint-focus { overflow:hidden; border:1px solid var(--ui-border); border-radius:12px; background:#fff; box-shadow:var(--ui-shadow-card); }
.constraint-focus-header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:25px 28px 24px; border-bottom:1px solid var(--ui-border); background:#f8fbfc; }
.constraint-focus-header > div { max-width:680px; }
.constraint-step-label { display:block; margin-bottom:9px; color:var(--ui-primary); font-size:11px; font-weight:600; line-height:1.4; letter-spacing:.04em; }
.constraint-focus h2 { margin:0; color:var(--ui-ink); font-size:clamp(22px,2.2vw,29px); font-weight:600; line-height:1.25; letter-spacing:-.025em; }
.constraint-focus-header p { max-width:640px; margin:10px 0 0; color:var(--ui-muted); font-size:13px; line-height:1.6; }
.constraint-confidence { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; max-width:240px; padding-top:3px; color:var(--ui-muted); font-size:11px; line-height:1.5; }
.constraint-confidence-dot { flex:0 0 6px; width:6px; height:6px; border-radius:50%; background:#bc8b30; }
.constraint-focus-body { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); }
.constraint-evidence { min-width:0; padding:24px 28px; }
.constraint-focus h3 { display:flex; align-items:baseline; gap:9px; margin:0 0 17px; color:var(--ui-ink); font-size:13px; font-weight:600; }
.constraint-focus h3 > span { color:var(--ui-subtle); font-size:10px; font-weight:500; }
.constraint-confirmed-fact { margin:0 0 12px; color:var(--ui-muted); font-size:12px; line-height:1.6; }
.constraint-evidence-list { margin:0; }
.constraint-evidence-list > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(80px,max-content); align-items:start; gap:18px; padding:13px 0; border-bottom:1px solid #edf1f3; }
.constraint-evidence-list dt { color:var(--ui-ink); font-size:12px; font-weight:500; line-height:1.5; }
.constraint-evidence-list dt small { display:block; margin-top:4px; color:var(--ui-subtle); font-size:10px; font-weight:400; line-height:1.5; }
.constraint-evidence-list dd { margin:0; color:var(--ui-ink); font-size:17px; font-weight:600; line-height:1.5; font-variant-numeric:tabular-nums; text-align:right; }
.constraint-evidence-list dd small { display:block; color:#8a6b25; font-size:10px; font-weight:400; }
.constraint-evidence-list .is-missing dd { color:var(--ui-muted); font-size:12px; font-weight:400; }
.constraint-hypothesis { margin:18px 0 0; color:var(--ui-muted); font-size:12px; line-height:1.65; }
.constraint-hypothesis strong { color:var(--ui-ink); font-weight:500; }
.constraint-missing { margin-top:16px; }
.constraint-missing summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:36px; color:var(--ui-muted); font-size:12px; cursor:pointer; list-style:none; }
.constraint-missing summary > span { color:var(--ui-subtle); font-size:11px; }
.constraint-missing summary::after { content:'+'; font-size:17px; }
.constraint-missing[open] summary::after { content:'−'; }
.constraint-missing-list { display:grid; gap:8px; margin:10px 0 0; padding-left:17px; color:var(--ui-muted); font-size:12px; line-height:1.6; }
.constraint-action-column { min-width:0; padding:24px; border-left:1px solid var(--ui-border); background:#fbfcfd; }
.constraint-action h4 { margin:0 0 9px; color:var(--ui-ink); font-size:17px; font-weight:600; line-height:1.4; letter-spacing:-.015em; }
.constraint-action p,.constraint-effect > p { margin:0; color:var(--ui-muted); font-size:12px; line-height:1.65; }
.constraint-primary-button,.constraint-secondary-button { display:inline-flex; justify-content:center; align-items:center; gap:12px; min-height:42px; padding:10px 15px; border:1px solid var(--ui-primary); border-radius:8px; color:#fff; background:var(--ui-primary); font-size:12px; font-weight:500; cursor:pointer; }
.constraint-primary-button { width:100%; justify-content:space-between; margin-top:20px; }
.constraint-primary-button:hover { background:var(--ui-primary-hover); }
.constraint-primary-button > svg,.constraint-text-button > svg { width:16px; height:16px; flex-shrink:0; }
.constraint-secondary-button { color:var(--ui-ink); background:#fff; border-color:var(--ui-border); }
.constraint-effect { margin-top:24px; padding-top:21px; border-top:1px solid var(--ui-border); }
.constraint-effect h3 { margin-bottom:11px; }
.constraint-effect dl { margin:15px 0; }
.constraint-effect dl > div { display:grid; gap:5px; }
.constraint-effect dt { color:var(--ui-muted); font-size:11px; line-height:1.5; }
.constraint-effect dd { margin:0; color:var(--ui-ink); font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; }
.constraint-effect > small { display:block; color:var(--ui-subtle); font-size:11px; line-height:1.6; }
.constraint-empty,.constraint-loading { display:flex; align-items:flex-start; gap:16px; padding:28px; border:1px solid var(--ui-border); border-radius:12px; background:#fff; }
.constraint-empty > svg { flex:0 0 22px; width:22px; height:22px; margin-top:3px; color:var(--ui-primary); }
.constraint-empty > div { flex:1; min-width:0; }
.constraint-empty h2 { margin:0; color:var(--ui-ink); font-size:22px; font-weight:600; line-height:1.3; }
.constraint-empty p,.constraint-loading p { margin:10px 0 0; color:var(--ui-muted); font-size:13px; line-height:1.6; }
.constraint-loading { display:block; min-height:250px; }
.constraint-skeleton { width:70%; height:13px; margin:15px 0; border-radius:4px; background:#eaf0f3; }
.constraint-skeleton-title { width:min(450px,90%); height:27px; }
.constraint-candidates > header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:8px; }
.constraint-candidates h2 { margin:0; color:var(--ui-ink); font-size:14px; font-weight:600; }
.constraint-candidates header p { margin:0; color:var(--ui-subtle); font-size:11px; }
.constraint-candidate-row { display:flex; align-items:center; gap:16px; width:100%; min-height:80px; padding:16px 0; border:0; border-bottom:1px solid var(--ui-border); background:transparent; text-align:left; cursor:pointer; }
.constraint-candidate-row:hover { background:#eef3f6; }
.constraint-candidate-number { flex-shrink:0; color:var(--ui-subtle); font-size:12px; font-variant-numeric:tabular-nums; }
.constraint-candidate-copy { flex:1; min-width:0; display:grid; gap:4px; }
.constraint-candidate-copy strong { color:var(--ui-ink); font-size:13px; font-weight:500; }
.constraint-candidate-copy small { color:var(--ui-muted); font-size:12px; line-height:1.5; }
.constraint-candidate-status { flex:0 0 auto; max-width:200px; color:var(--ui-subtle); font-size:11px; }
.constraint-candidate-row > svg { flex:0 0 16px; width:16px; height:16px; color:var(--ui-primary); }
.constraint-data-blockers { border:1px solid var(--ui-border); border-radius:10px; background:#fff; }
.constraint-data-blockers > summary { display:flex; align-items:center; gap:9px; min-height:48px; padding:12px 18px; color:var(--ui-muted); font-size:12px; font-weight:500; cursor:pointer; list-style:none; }
.constraint-data-blockers > summary > svg { width:16px; height:16px; }
.constraint-data-blockers > summary > b { margin-left:auto; color:var(--ui-subtle); font-weight:500; }
.constraint-data-blockers > summary::after { content:'+'; margin-left:6px; font-size:17px; }
.constraint-data-blockers[open] > summary::after { content:'−'; }
.constraint-blocker-row { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:16px 18px; border-top:1px solid var(--ui-border); }
.constraint-blocker-row strong { color:var(--ui-ink); font-size:12px; font-weight:500; }
.constraint-blocker-row p { margin:5px 0 0; color:var(--ui-muted); font-size:12px; line-height:1.5; }
.constraint-text-button { display:inline-flex; flex:0 0 auto; align-items:center; gap:7px; min-height:32px; color:var(--ui-primary); background:transparent; border:0; font-size:12px; cursor:pointer; }
.home-supporting-panel { margin-top:16px; }
.home-supporting-panel > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:66px; padding:16px 0; color:var(--ui-ink); border-top:1px solid var(--ui-border); cursor:pointer; list-style:none; }
.home-supporting-panel > summary strong { display:block; font-size:14px; font-weight:600; }
.home-supporting-panel > summary small { display:block; margin-top:4px; color:var(--ui-subtle); font-size:11px; }
.home-supporting-panel > summary > svg { width:18px; height:18px; color:var(--ui-muted); }
.home-supporting-panel[open] > summary > svg { transform:rotate(180deg); }
.home-supporting-panel.is-inline { margin-top:0; }
.home-supporting-panel.is-inline > summary { display:none; }
.home-dashboard-card,.finance-overview-card,.home-dashboard-chart { border-color:var(--ui-border) !important; box-shadow:var(--ui-shadow-card) !important; }
.home-widget-metric-icon,.finance-kpi-icon { color:var(--ui-primary) !important; border-color:var(--ui-border) !important; border-radius:8px; background:var(--ui-primary-soft) !important; }
.home-widget-metric-copy .home-widget-value { color:var(--ui-ink) !important; }
.home-dashboard-card:hover:not(:disabled),.finance-overview-kpis > button:hover { border-color:var(--ui-border-strong) !important; box-shadow:none !important; }
.home-ai-prompts { margin-top:24px; border-color:var(--ui-border); background:transparent; }
.home-ai-prompts header h2 { color:var(--ui-ink); }
.home-ai-prompts header > span { color:var(--ui-primary); }
.home-ai-prompts > div button { color:var(--ui-muted); border-color:var(--ui-border); }
.home-ai-prompts > div button:hover { color:var(--ui-primary); background:var(--ui-primary-soft); }
.assistant-modal-panel { border-color:var(--ui-border); border-radius:14px; background:var(--ui-surface); }
.assistant-modal-backdrop { backdrop-filter:none; }

.constraint-experiment { margin-top:18px; padding-top:18px; border-top:1px solid var(--ui-border); }
.constraint-experiment-hint { margin:8px 0; color:var(--ui-subtle); font-size:11px; line-height:1.6; }
.constraint-experiment-start { width:100%; margin-top:8px; font-size:12px; }
.constraint-experiment-status { display:inline-block; padding:3px 8px; border:1px solid var(--ui-border); border-radius:5px; color:var(--ui-muted); background:var(--ui-surface); font-size:10px; }
.constraint-experiment-status.is-running,.constraint-experiment-status.is-observing { border-color:var(--ui-accent-soft); color:var(--ui-primary); background:var(--ui-primary-soft); }
.constraint-experiment-record > p { margin:10px 0; color:var(--ui-muted); font-size:11px; line-height:1.6; }
.constraint-experiment-record > dl { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }
.constraint-experiment-record > dl dt { color:var(--ui-subtle); font-size:10px; }
.constraint-experiment-record > dl dd { margin:4px 0 0; color:var(--ui-ink); font-size:13px; font-weight:500; }
.constraint-experiment-record > small { display:block; color:var(--ui-subtle); font-size:10px; line-height:1.6; }
.constraint-experiment-form { display:grid; gap:12px; }
.constraint-experiment-form > label { min-width:0; display:grid; gap:6px; }
.constraint-experiment-form > label > span { color:var(--ui-muted); font-size:11px; font-weight:500; }
.constraint-experiment-form :is(input,textarea,select) { width:100%; min-width:0; min-height:38px; padding:9px 10px; border:1px solid var(--ui-border); border-radius:7px; color:var(--ui-ink); background:#fff; font-size:12px; line-height:1.5; }
.constraint-experiment-form textarea { resize:vertical; }
.constraint-experiment-form input::placeholder,.constraint-experiment-form textarea::placeholder { color:var(--ui-subtle); }
.constraint-experiment-form-actions { display:flex; align-items:center; gap:12px; }
.constraint-experiment-form-actions .constraint-primary-button { width:auto; flex:1; justify-content:center; margin:0; }
.constraint-experiment-error { margin:10px 0; color:var(--signal-risk); font-size:11px; line-height:1.6; }

@container app-header (max-width:1100px) {
    .v2-app-shell .app-header-main,.v2-app-shell .app-header-main:has(.header-finance-scenario) { grid-template-columns:minmax(0,1fr) max-content max-content; gap:8px; }
    .app-header-leading { grid-column:1 / 3; }
    .v2-app-shell .app-header-context { grid-column:1; grid-row:2; }
    .v2-app-shell .app-header-main:has(.header-finance-scenario) .header-finance-scenario { grid-column:2 / 4; grid-row:2; justify-self:end; }
    .v2-app-shell .app-header-main .app-header-account,.v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-account { grid-column:3; grid-row:1; }
    .v2-app-shell .header-period-custom summary { min-width:190px; }
}
@media (max-width:1180px) {
    .constraint-focus-header { padding:22px; gap:20px; }
    .constraint-focus-body { grid-template-columns:minmax(0,1.3fr) minmax(250px,1fr); }
    .constraint-evidence,.constraint-action-column { padding:22px; }
}
@media (max-width:1000px) {
    .constraint-focus-header { flex-direction:column; gap:12px; }
    .constraint-confidence { max-width:none; }
    .constraint-focus-body { grid-template-columns:minmax(0,1fr); }
    .constraint-action-column { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; border-left:0; border-top:1px solid var(--ui-border); }
    .constraint-effect { margin:0; padding:0 0 0 24px; border-top:0; border-left:1px solid var(--ui-border); }
}
@media (max-width:900px) {
    body:has(.v2-app-shell .primary-navigation) > .rebuild-source-note { padding-inline:16px; }
    .v2-app-shell .app-shell-header { padding:10px 16px; }
    .v2-app-shell .app-header-main,.v2-app-shell .app-header-main:has(.header-finance-scenario) { display:flex; flex-wrap:wrap; gap:8px; }
    .app-header-leading { width:100%; flex:1 0 100%; justify-content:space-between; order:1; gap:8px; }
    .app-workspace-location { flex:1; font-size:12px; }
    .app-workspace-location > span { display:none; }
    .v2-app-shell .app-header-main:has(.header-finance-scenario) .header-finance-scenario { flex:0 0 auto; order:2; }
    .v2-app-shell .app-header-main .app-header-account,.v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-account { flex:1; justify-content:flex-end; margin:0; order:2; }
    .v2-app-shell .app-header-context,.v2-app-shell .app-header-main:has(.header-finance-scenario) .app-header-context { width:100%; flex:1 0 100%; order:3; }
    .v2-app-shell .header-period { width:100%; overflow:visible; padding-bottom:0; }
    .v2-app-shell .header-period-presets { flex:0 0 auto; }
    .v2-app-shell .header-period-custom { flex:1; min-width:0; width:auto; }
    .v2-app-shell .header-period-custom summary { width:100%; min-width:0; }
    .v2-app-shell .header-period-custom summary > span { display:none; }
    .primary-nav-mobile { inset:auto 0 0; min-height:66px; padding:5px 8px max(5px,env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--ui-border); border-radius:0; background:#fff; box-shadow:none; backdrop-filter:none; }
    .primary-nav-mobile button { min-height:52px; color:var(--ui-muted); border-radius:8px; }
    .primary-nav-mobile button.is-active { color:var(--ui-primary); background:var(--ui-primary-soft); }
    .primary-nav-mobile button small { font-size:10px; font-weight:500; }
    .primary-nav-mobile .navigation-icon { width:20px; height:20px; }
    .mobile-nav-sheet { border-radius:16px 16px 0 0; background:var(--ui-surface); }
    .mobile-nav-sheet :is(.mobile-group-heading,.mobile-leaf.is-active,.mobile-pin-button.is-pinned) { color:var(--ui-primary); }
    .mobile-nav-sheet .mobile-leaf { min-height:44px; color:var(--ui-muted); }
    .mobile-nav-sheet .mobile-leaf.is-active { background:var(--ui-primary-soft); }
    .mobile-sheet-groups > div { border-color:var(--ui-border); border-radius:8px; }
    .mobile-assistant { color:var(--ui-primary); background:var(--ui-primary-soft); border-radius:8px; }
    .v2-app-shell :is(.workspace-page,.overview-page,.home-dashboard) { padding-top:20px; padding-bottom:100px; }
}
@media (max-width:640px) {
    .v2-app-shell .app-shell-header { padding-inline:12px; }
    .v2-app-shell .header-period-presets button { padding-inline:6px; font-size:10px; }
    .v2-app-shell .header-period-custom summary { padding-inline:8px; font-size:10px; }
    .v2-app-shell .header-period-custom summary strong { font-size:10px; }
    .header-period-chevron { width:12px; height:12px; }
    .v2-app-shell .app-header-account .app-connection,.v2-app-shell .app-user > span { display:none; }
    .home-dashboard.is-home .home-dashboard-header { gap:16px; min-height:0; margin:0; padding-bottom:20px; }
    .home-dashboard-heading h1 { font-size:26px; }
    .home-dashboard.is-home .home-dashboard-heading > p { max-width:270px; font-size:12px; }
    .home-dashboard-actions { gap:5px; }
    .constraint-workspace { gap:14px; margin-bottom:18px; }
    .constraint-source-note { font-size:11px; line-height:1.6; }
    .constraint-focus-header,.constraint-evidence,.constraint-action-column { padding:20px 18px; }
    .constraint-focus h2 { font-size:24px; line-height:1.3; }
    .constraint-focus-header p { font-size:12px; }
    .constraint-evidence-list > div { gap:12px; grid-template-columns:minmax(0,1fr) minmax(65px,max-content); }
    .constraint-evidence-list dd { font-size:15px; }
    .constraint-evidence-list dt { font-size:11px; }
    .constraint-evidence-list dt small { font-size:10px; }
    .constraint-action-column { display:block; }
    .constraint-effect { margin-top:22px; padding:20px 0 0; border-left:0; border-top:1px solid var(--ui-border); }
    .constraint-empty { flex-wrap:wrap; gap:12px; padding:22px 18px; }
    .constraint-empty h2 { font-size:20px; }
    .constraint-empty > button { width:100%; }
    .constraint-candidates > header { display:block; }
    .constraint-candidates header p { margin-top:5px; }
    .constraint-candidate-row { gap:12px; }
    .constraint-candidate-status { display:none; }
    .constraint-blocker-row { flex-wrap:wrap; gap:8px; }
    .constraint-data-blockers > summary { padding-inline:14px; }
    .home-supporting-panel > summary strong { font-size:13px; }
    .home-supporting-panel > summary small { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) {
    .constraint-workspace *, .app-header-leading *, .primary-navigation * { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
