@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

/* --- GLOBAL RESET & THEME --- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
    --ivory: #fcfaf5; --beige: #f5f0e1; --gold: #b89b5e; --gold-dark: #8a7a5f; --gold-light: #e0d7c6;
    --text-black: #000000; --glass-thick: rgba(255, 255, 255, 0.98); --green: #2d5a27; --red: #8D0E07; --blue: #3D5C95;
    --shadow: 0 10px 40px rgba(138, 122, 95, 0.15); --bottom-nav-height: 80px;
    --ax: #2d5a27; --ay: #4b8a3e; --az: #7cb36e;
    --bx: #b89b5e; --by: #d4bc8d; --bz: #e6d7b2;
    --cx: #8D0E07; --cy: #b33934; --cz: #d97b77;
}

html { background-color: var(--ivory); background-image: radial-gradient(rgba(0,0,0,0.12) 2px, transparent 2px); background-size: 18px 18px; background-attachment: fixed; }
html, body { font-family: 'Roboto', sans-serif; color: var(--text-black); width: 100%; max-width: 100vw; min-height: 100vh; overflow-x: hidden; font-size: 16px; }
body { background-color: transparent; }
.container { width: 100%; padding: 15px; padding-bottom: 110px; transition: all 0.3s; }

/* --- HEADER --- */
header {
    background: var(--glass-thick); backdrop-filter: blur(15px); border-bottom: 2px solid var(--gold-light);
    padding: 0 20px; display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000; height: 80px; width: 100%;
}
.header-logo { font-weight: 900; font-size: 1.5em; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 1px; }

/* --- DASHBOARD ELEMENTS --- */
.kpi-grid { display: grid; gap: 20px; margin: 15px 0 25px 0; }
.kpi-card { background: white; border: 1.5px solid var(--gold-light); border-top: 8px solid var(--gold); padding: 25px; border-radius: 20px; box-shadow: var(--shadow); position: relative; cursor: help; }
.kpi-label { font-size: 0.9em; font-weight: 900; color: var(--gold-dark); text-transform: uppercase; }
.kpi-value { font-size: 2.5em; font-weight: 900; color: var(--text-black); margin-top: 5px; display: block; white-space: nowrap !important; }
.formula-box { background: #f0f4ff; padding: 15px; border-radius: 12px; border-left: 6px solid var(--blue); margin-bottom: 15px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); }
.formula-text { color: var(--blue); font-size: 1.3em; font-weight: 900; display: block; margin-bottom: 5px; }
.kpi-delta { font-size: 1em; font-weight: 900; margin-top: 5px; }

.mobile-stack { display: grid; width: 100%; gap: 30px; }
.panel { width: 100%; padding: 25px 20px; border-radius: 20px; border: 1.5px solid var(--gold-light); background: white; box-shadow: var(--shadow); overflow: hidden; }
.panel-title { font-weight: 900; font-size: 1.2em; color: var(--gold-dark); text-transform: uppercase; margin-bottom: 20px; }

/* --- TOOLTIPS --- */
.metric-tooltip {
    opacity: 0; visibility: hidden; position: absolute; z-index: 10000;
    top: 105%; left: 50%; transform: translateX(-50%);
    background: #ffffff; border: 2px solid var(--gold); padding: 18px;
    border-radius: 15px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); width: 250px; max-width: 85vw;
    font-size: 0.9em; transition: 0.2s ease-in-out; pointer-events: none;
    color: var(--text-black); line-height: 1.5; text-align: left; white-space: normal;
}
.kpi-card:hover .metric-tooltip, .kpi-card:active .metric-tooltip { opacity: 1; visibility: visible; }
.metric-tooltip::after {
    content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -10px;
    border-width: 10px; border-style: solid; border-color: transparent transparent #ffffff transparent;
}

/* --- COMPONENTS STYLING --- */

/* Metric Selector */
.metric-selector { display: flex; gap: 5px; background: var(--beige); padding: 5px; border-radius: 12px; border: 1.5px solid var(--gold-light); }
.metric-btn { 
    background: transparent; border: none; padding: 10px 20px; font-size: 0.85em; 
    font-weight: 900; border-radius: 8px; cursor: pointer; color: var(--gold-dark); text-transform: uppercase; transition: all 0.3s;
}
.metric-btn.active { background: white; color: var(--text-black); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* Recommendations */
.rec-item { 
    padding: 20px; background: white; border-radius: 15px; border: 1.5px solid var(--gold-light); 
    border-left: 8px solid var(--gold); display: flex; gap: 15px; align-items: flex-start; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: 0.3s; cursor: pointer; margin-bottom: 15px;
}
.rec-item:hover { transform: translateX(5px); border-color: var(--gold); }
.rec-icon { font-size: 2em; line-height: 1; }
.rec-text strong { color: var(--gold-dark); display: block; margin-bottom: 5px; font-weight: 900; text-transform: uppercase; font-size: 0.9em; }
.rec-text { font-size: 0.95em; line-height: 1.4; color: #444; font-weight: 700; }

/* Average Price Box */
.avg-price-box { background: var(--beige); border-radius: 20px; padding: 30px 20px; text-align: center; border: 2px solid var(--gold-light); }
#avg-price-val { font-size: 3.2em; font-weight: 900; color: var(--blue); margin: 10px 0; }

/* Forecast Tiles */
#model-tiles-container { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
#model-tiles-container::-webkit-scrollbar { display: none; }
.model-tile { 
    min-width: 140px; background: white; padding: 20px 15px; border-radius: 18px; 
    border: 2px solid var(--gold-light); text-align: center; cursor: pointer; transition: all 0.3s;
}
.model-tile.active { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 10px 25px rgba(61, 92, 149, 0.3); }
.model-icon { font-size: 2.2em; margin-bottom: 10px; display: block; }
.model-name { font-weight: 900; font-size: 0.9em; text-transform: uppercase; display: block; }
.model-desc { font-size: 0.7em; opacity: 0.7; font-weight: 700; }

/* Seasons YoY Cards */
.seasons-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.season-card { background: white; padding: 25px; border-radius: 20px; border: 2.5px solid var(--gold-light); display: flex; flex-direction: column; gap: 15px; box-shadow: var(--shadow); transition: 0.3s; }
.season-card .header { display: flex; align-items: center; gap: 15px; }
.season-card .icon { font-size: 3em; }
.season-card .title { font-weight: 900; font-size: 1.1em; color: var(--gold-dark); text-transform: uppercase; }
.stat-year { font-size: 0.9em; font-weight: 900; opacity: 0.6; color: var(--text-black); }
.stat-value { font-size: 1.8em; font-weight: 900; line-height: 1.1; }
/* --- WELCOME MODAL --- */
#welcome-modal .panel {
    background: white;
    border: 3px solid var(--gold-light);
    color: var(--text-black);
}

#welcome-modal b {
    color: var(--gold-dark);
}

#welcome-modal span {
    filter: drop-shadow(0 5px 15px rgba(184, 155, 94, 0.2));
}

#welcome-modal .btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(61, 92, 149, 0.3);
}

/* --- STATUS BADGES --- */
.status-badge { padding: 4px 10px; border-radius: 8px; font-size: 0.75em; font-weight: 900; color: white; }
.status-active { background: var(--green); }
.status-pending { background: var(--gold); }
.status-blocked { background: var(--red); }

/* Progress Loader Styling */
.progress-loader { height: 14px; background: #eee; border-radius: 7px; overflow: hidden; position: relative; border: 1px solid var(--gold-light); }
.progress-fill { 
    height: 100%; width: 0; transition: width 2s cubic-bezier(0.19, 1, 0.22, 1); border-radius: 7px;
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: 40px 40px; animation: progress-stripes 2s linear infinite;
}
@keyframes progress-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } }

/* Previous Year Comparison Bar */
.progress-loader.bg { height: 8px; background: #f9f9f9; margin-top: 4px; opacity: 0.8; border: none; }
.progress-fill.bg { opacity: 0.4; animation: none; }

/* ABC Matrix */
.abc-matrix { display: grid; grid-template-columns: 40px repeat(3, 1fr); grid-template-rows: 40px repeat(3, 85px); gap: 10px; }
.abc-axis-label { display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--gold-dark); text-transform: uppercase; font-size: 0.9em; }
.abc-cell { border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; border: 3px solid transparent; font-weight: 900; color: white !important; text-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.abc-cell.active { border-color: #000; transform: scale(1.05); }
.abc-cell-letter { font-size: 1.8em; line-height: 1; color: white !important; }
.abc-cell-count { font-size: 0.7em; opacity: 0.9; text-transform: uppercase; color: white !important; }
.abc-tag { padding: 6px 12px; border-radius: 20px; color: white !important; font-weight: 900; font-size: 0.85em; display: inline-block; box-shadow: 0 3px 8px rgba(0,0,0,0.1); }

/* --- TABLES --- */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; border-radius: 20px; border: 2px solid var(--gold-light); background: white; margin-top: 15px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 100%; }
th, td { padding: 18px 15px; border: 1px solid var(--gold-light); text-align: center !important; vertical-align: middle; font-weight: 900; }
th { background: var(--beige); font-weight: 900; text-transform: uppercase; font-size: 0.8em; color: var(--gold-dark); letter-spacing: 1px; border-bottom: 2px solid var(--gold-light); }
td { color: var(--text-black); font-size: 0.95em; }
th:first-child, td:first-child { position: sticky; left: 0; background: #fffcf5; z-index: 10; border-right: 2.5px solid var(--gold-light); text-align: center !important; min-width: 150px; }

/* Athena Report Styling */
.profit-chart-legend { display: none; }

.profit-legend-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 7px 8px;
    border-bottom: 1px solid #eee7d8;
}

.profit-legend-swatch { width: 10px; height: 10px; border-radius: 50%; }
.profit-legend-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; font-weight: 800; color: #333; }
.profit-legend-value { white-space: nowrap; font-size: 0.68rem; font-weight: 900; color: var(--gold-dark); }
.profit-legend-empty { padding: 14px; text-align: center; color: #777; font-size: 0.75rem; font-weight: 700; }

.ozon-statement-period { margin: -8px 0 14px; color: #777; font-size: 0.78rem; font-weight: 800; }
.ozon-statement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
@media (min-width: 1200px) {
    .ozon-statement-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.ozon-statement-card {
    min-width: 0;
    padding: 15px 20px;
    border: 1px solid var(--gold-light);
    border-left: 5px solid var(--blue);
    border-radius: 14px;
    background: #f8faff;
    box-shadow: 0 4px 10px rgba(138, 122, 95, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ozon-statement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(138, 122, 95, 0.12);
}
.ozon-statement-card.negative {
    border-left-color: var(--red);
    background: #fff8f8;
}
.ozon-statement-card.total {
    border-left-color: var(--green);
    background: #f5faf4;
}
.ozon-statement-card span {
    display: block;
    margin-bottom: 5px;
    color: var(--gold-dark);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ozon-statement-card strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-black);
}
.ozon-statement-card small {
    display: block;
    margin-top: 5px;
    color: #555;
    font-size: 0.7rem;
    font-weight: 700;
}

.athena-live-status {
    margin-bottom: 24px;
    padding: 14px;
    border: 1.5px solid var(--gold-light);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: #f8faff;
}

.athena-live-status-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; font-weight: 900; color: var(--blue); }
.athena-live-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: #e5e9f2; }
#athena-live-bar { width: 0; height: 100%; background: var(--blue); transition: width 0.3s ease; }
.athena-live-status.error { border-left-color: var(--red); background: #fff7f7; }
.athena-live-status.error .athena-live-status-head { color: var(--red); }
.athena-live-status.error #athena-live-bar { background: var(--red); }

.athena-viz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.athena-viz-card { padding: 13px; border: 1px solid var(--gold-light); border-left: 5px solid var(--blue); border-radius: 6px; background: #fff; line-height: 1.4; }
.athena-viz-card.success { border-left-color: var(--green); background: #f5faf4; }
.athena-viz-card.warning { border-left-color: var(--gold); background: #fffcf5; }
.athena-viz-card.danger { border-left-color: var(--red); background: #fff7f7; }
.athena-viz-card strong { display: block; margin-bottom: 4px; }
.athena-viz-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 20px; }
.athena-viz-flow { display: flex; gap: 8px; align-items: stretch; margin: 14px 0 20px; }
.athena-viz-flow > div { flex: 1; padding: 12px; border-top: 4px solid var(--blue); background: #f8faff; }

.athena-viz { margin: 20px 0 28px; padding: 16px; border: 1px solid var(--gold-light); border-radius: 14px; background: #fffdf8; }
.athena-viz > h3 { margin: 0 0 14px !important; padding: 0 0 8px !important; max-width: 100%; font-size: 1rem !important; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.athena-viz-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.athena-viz-item { position: relative; min-width: 0; max-width: 100%; padding: 14px 12px 12px 38px; border-left: 5px solid var(--blue); border-radius: 8px; background: #f8faff; overflow: hidden; }
.athena-viz-item.success { border-left-color: var(--green); background: #f5faf4; }
.athena-viz-item.warning { border-left-color: var(--gold); background: #fffcf5; }
.athena-viz-item.danger { border-left-color: var(--red); background: #fff7f7; }
.athena-viz-item strong { display: block; max-width: 100%; margin-bottom: 5px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.athena-viz-item p { max-width: 100%; margin: 0; font-size: 0.86rem; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.athena-viz-index { position: absolute; left: 10px; top: 13px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 0.68rem; font-weight: 900; }
.athena-viz-flow .athena-viz-items, .athena-viz-timeline .athena-viz-items { display: flex; overflow-x: auto; }
.athena-viz-flow .athena-viz-item, .athena-viz-timeline .athena-viz-item { flex: 1 0 180px; }
.athena-viz-flow .athena-viz-item:not(:last-child)::after { content: '→'; position: absolute; right: -10px; top: 45%; z-index: 2; color: var(--gold-dark); font-weight: 900; }
.athena-viz-scale .athena-viz-items { grid-template-columns: 1fr; }
.athena-viz-scale .athena-viz-item { padding-left: 42px; }
.athena-viz-classification .athena-viz-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 768px) {
    .athena-viz { padding: 12px; }
    .athena-viz-flow .athena-viz-items, .athena-viz-timeline .athena-viz-items { display: grid; grid-template-columns: 1fr; overflow-x: visible; }
    .athena-viz-flow .athena-viz-item, .athena-viz-timeline .athena-viz-item { flex-basis: auto; }
    .athena-viz-flow .athena-viz-item:not(:last-child)::after { display: none; }
    .athena-viz-classification .athena-viz-items { grid-template-columns: 1fr; }
}

.athena-markdown table { margin: 20px auto; border-radius: 12px; overflow: hidden; border: 2px solid var(--gold-light); box-shadow: 0 10px 30px rgba(0,0,0,0.05); table-layout: auto !important; width: auto !important; min-width: 100%; }
.athena-markdown th, .athena-markdown td { text-align: center !important; padding: 15px; vertical-align: middle; }
.athena-markdown th { background: var(--gold-light); color: #000; white-space: nowrap !important; font-weight: 950; text-transform: uppercase; font-size: 0.85em; }
.athena-markdown td { background: #fff; font-weight: 700; }

/* Fix horizontal scroll overlap in reports */
.athena-markdown { overflow-x: auto; width: 100%; padding-bottom: 15px; }
.athena-markdown th:first-child, .athena-markdown td:first-child { position: static !important; border-right: 1px solid var(--gold-light) !important; } /* Disable sticky for report tables to avoid overlap */

/* Version Label Fix */
.ver-tag { font-size: 0.4em; background: var(--gold); color: white; padding: 2px 6px; border-radius: 5px; vertical-align: middle; margin-left: 10px; display: inline-block; position: relative; top: -5px; }


/* Version Label Fix */
.ver-tag { font-size: 0.4em; background: var(--gold); color: white; padding: 2px 6px; border-radius: 5px; vertical-align: middle; margin-left: 10px; display: inline-block; position: relative; top: -5px; }

/* --- NAVIGATION & MODALS --- */
.nav-tabs { display: none; }
.desktop-controls { display: none; }
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--bottom-nav-height); background: white; border-top: 2px solid var(--gold-light); display: flex; justify-content: space-around; align-items: center; z-index: 1000; box-shadow: 0 -5px 25px rgba(0,0,0,0.1); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; border: none; color: var(--gold-dark); padding: 12px 0; cursor: pointer; }
.nav-item.active { color: var(--blue); }
.nav-item .icon { font-size: 2.2em; margin-bottom: 4px; }
.nav-item .label { font-size: 0.8em; font-weight: 900; text-transform: uppercase; }

.settings-menu, .side-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex !important; align-items: center !important; justify-content: center !important; }
.settings-menu.hidden, .side-menu.hidden { display: none !important; }
.menu-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); z-index: 1; }
.settings-menu .panel { z-index: 2; width: 92%; max-width: 400px; padding: 25px; position: relative; margin: auto; border-radius: 25px; }
.side-menu-content {
    z-index: 2;
    position: relative;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}
.side-menu-legal-link {
    display: block;
    line-height: 1.45;
}

input, select { font-family: inherit; font-weight: 900; padding: 12px 15px; border-radius: 12px; border: 2.5px solid var(--gold-light); background: white; outline: none; min-height: 52px; font-size: 16px; transition: 0.3s; }
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 5px 15px rgba(184, 155, 94, 0.1); }

.period-btns { display: none; }
.period-btn { background: white; border: 2px solid var(--gold-light); padding: 10px 20px; border-radius: 12px; font-weight: 900; color: var(--gold-dark); cursor: pointer; transition: 0.3s; font-size: 0.9em; text-transform: uppercase; }
.period-btn.active { background: var(--blue); color: white; border-color: var(--blue); }

/* --- MOBILE SPECIFIC OVERRIDES --- */
@media (max-width: 1199px) {
    .metric-btn { padding: 6px 10px; font-size: 0.6em; }
    .metric-selector { gap: 3px; padding: 3px; }
    #pricing .btn-gold { padding: 8px 12px; font-size: 0.75em; min-height: 40px; }
    
    .table-container { overflow-x: hidden !important; }
    table { table-layout: fixed; width: 100% !important; }
    th, td { font-size: 0.7em; padding: 10px 2px; word-break: break-word; }
    
    /* Center and widen the first column (Product Info) */
    th:first-child, td:first-child { 
        min-width: 110px !important; width: 50% !important; 
        padding-left: 2px !important; padding-right: 2px !important;
        text-align: center !important; 
    }
    
    #pricing table td:nth-child(2) { width: 50%; }
    
    /* Matrix filter and table fix */
    #matrix-chart-filter { width: 100% !important; max-width: 100% !important; margin-bottom: 10px; }
    #price-matrix table td:nth-child(2), #price-matrix table td:nth-child(3), #price-matrix table td:nth-child(4) { width: 16.6%; }
    
    /* ABC fixes */
    #abc-xyz table td:nth-child(2) { width: 15%; }
    #abc-xyz table td:nth-child(3) { width: 20%; }
    #abc-xyz table td:nth-child(4) { width: 15%; }
    
    /* Settings modal fixes */
    .settings-menu .panel { width: 92% !important; padding: 20px !important; margin: auto !important; }
    .settings-menu .control-group { margin-bottom: 12px; width: 100%; }
    .settings-menu input, .settings-menu select { width: 100% !important; padding: 10px !important; font-size: 14px !important; min-height: 42px !important; }
    .settings-menu hr { margin: 15px 0; border: none; border-top: 1px solid #eee; }

    #abc-xyz .panel[style*="background: white"] > div[style*="display: grid"] { grid-template-columns: 1fr !important; justify-items: center; }
    .abc-matrix { grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: repeat(3, 75px) !important; width: 100%; }
    .abc-axis-label { display: none !important; }
    
    #period-select-mob { display: block !important; }

    .panel-title { font-size: 1.0em !important; }
}

/* Custom Colors for Seasons */
.winter .progress-fill { background-color: #3D5C95 !important; }
.spring .progress-fill { background-color: var(--green) !important; }
.summer .progress-fill { background-color: #f77f00 !important; }
.autumn .progress-fill { background-color: #d4a373 !important; }
.winter .stat-value { color: #3D5C95; }
.spring .stat-value { color: var(--green); }
.summer .stat-value { color: #f77f00; }
.autumn .stat-value { color: #d4a373; }

/* --- DESKTOP OVERRIDES (1200px+) --- */
@media (min-width: 1200px) {
    .container { max-width: 1450px !important; margin: 0 auto !important; padding: 40px !important; }
    header { height: 90px !important; padding: 0 40px !important; }
    .desktop-controls { display: flex !important; gap: 15px; }
    body.zerkalo-mode .mobile-bottom-nav { display: none !important; }
    .nav-tabs { display: flex !important; gap: 8px; margin-bottom: 35px; background: white; padding: 10px; border-radius: 20px; border: 2px solid var(--gold-light); box-shadow: var(--shadow); }
    .tab-btn { background: transparent; border: none; padding: 12px 25px; font-weight: 900; color: var(--gold-dark); border-radius: 12px; cursor: pointer; text-transform: uppercase; font-size: 0.85em; transition: 0.3s; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
    .tab-btn:hover { background: var(--beige); }
    .tab-btn.active { background: var(--gold); color: white; box-shadow: 0 5px 15px rgba(184, 155, 94, 0.3); }
    .period-btns { display: flex !important; gap: 8px; }
    .kpi-grid { grid-template-columns: repeat(5, 1fr) !important; margin-bottom: 40px !important; }
    .kpi-value { font-size: 3em !important; }
    .mobile-stack { display: grid !important; grid-template-columns: 1.8fr 1fr !important; gap: 30px !important; }
    .panel { width: auto !important; }
    .seasons-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

.hidden { display: none !important; }
.btn-gold { font-weight: 900; background: var(--gold); color: white; border: none; padding: 12px 20px; border-radius: 10px; cursor: pointer; text-transform: uppercase; font-size: 0.8em; display: flex; align-items: center; justify-content: center; gap: 8px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #ccc; }
.status-dot.active { background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* --- STRATEGIC ANALYSIS STYLES --- */
.verdict-card { display: flex; align-items: center; gap: 25px; padding: 30px; border-radius: 20px; margin-bottom: 30px; border: 2.5px solid var(--gold-light); background: white; box-shadow: var(--shadow); }
.verdict-card.success { border-color: var(--green); background: #f0fff4; }
.verdict-card.warning { border-color: var(--gold); background: #fffcf0; }
.verdict-card.danger { border-color: var(--red); background: #fff5f5; }
.verdict-icon { font-size: 3.5em; }
.verdict-content h2 { margin: 0 0 8px 0; font-weight: 900; text-transform: uppercase; font-size: 1.4em; }
.verdict-content p { margin: 0; font-size: 1.1em; opacity: 0.8; }

.insights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.insight-card { background: white; padding: 25px; border-radius: 20px; border: 1.5px solid var(--gold-light); box-shadow: var(--shadow); transition: 0.3s; }
.insight-card:hover { transform: translateY(-5px); }
.insight-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.insight-title { font-weight: 900; color: var(--gold-dark); text-transform: uppercase; font-size: 0.8em; letter-spacing: 1px; }
.insight-value { font-weight: 900; margin-bottom: 10px; }
.insight-msg { font-size: 0.85em; line-height: 1.6; font-weight: 400; color: #444; }

.mini-bar-container { width: 100%; height: 6px; background: #eee; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 3px; transition: 0.5s; }

.millimeter-bg { 
    background-color: #fff;
    background-image: 
        linear-gradient(rgba(184, 155, 94, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 155, 94, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(184, 155, 94, 0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 155, 94, 0.25) 1px, transparent 1px);
    background-size: 10px 10px, 10px 10px, 50px 50px, 50px 50px;
    border: 1px solid var(--gold-light);
}

.tab-content { position: relative; min-height: 450px; }

.loader-overlay { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh; 
    background: rgba(255, 255, 255, 0.4); 
    z-index: 99999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s;
}
.spinner { width: 50px; height: 50px; border: 5px solid var(--gold-light); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- OPTIMIZATIONS --- */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-weight: 900; font-size: 0.7em; letter-spacing: 0.5px; }

#analysis-kpi-body td { padding: 12px 5px !important; text-align: center; }
#analysis-kpi-body td:first-child { text-align: left; padding-left: 15px !important; }

/* --- MOBILE FIXES --- */
@media (max-width: 1199px) {
    .desktop-only { display: none !important; }
    .desktop-controls { display: none !important; }
    .desktop-settings { display: none !important; }
    .nav-tabs { display: none !important; } /* Hidden on mobile per request */
}

@media (min-width: 1200px) {
    .mobile-only { display: none !important; }
    .desktop-settings { display: flex !important; }
    .nav-tabs { display: flex !important; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
    .tab-btn { flex: 1; text-align: center; }
}

/* --- DASHBOARD CHART FIX --- */
#top-sku-chart {
    width: 100% !important;
    height: 100% !important;
    min-height: 350px;
}
.order-3-mob { display: flex; flex-direction: column; }

/* --- ORDER ECONOMICS TABLE WIDTHS --- */
.expense-mapping-note {
    flex: 1 1 100%;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d0d9ff;
    border-left: 5px solid var(--blue);
    border-radius: 10px;
    background: #f4f6fa;
    color: #444;
    font-size: 0.74em;
    line-height: 1.5;
    font-weight: 700;
}

.expense-mapping-note strong {
    color: var(--blue);
}

.order-items-list {
    margin-top: 8px;
    color: #555;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
}

.order-item-line {
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.orders-economics-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.orders-economics-head input { width:min(320px, 100%); padding:10px 14px; border:2px solid var(--gold-light); border-radius:10px; font-weight:700; }
.orders-period-label { color:#777; font-size:0.75rem; font-weight:800; }
.orders-economics-note {
    margin:-4px 0 16px;
    padding:10px 14px;
    border:1px solid rgba(176, 112, 48, 0.35);
    border-radius:10px;
    background:rgba(241, 192, 61, 0.12);
    color:#602a1d;
    font-size:0.78rem;
    font-weight:700;
    line-height:1.45;
}
body.dark-mode .orders-economics-note {
    border-color:rgba(201, 157, 99, 0.4);
    background:rgba(201, 157, 99, 0.1);
    color:#ead7b8;
}
.orders-economics-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(330px, 1fr)); gap:16px; }
.orders-economics-card { min-width:0; padding:16px; border:1.5px solid var(--gold-light); border-radius:14px; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,0.05); }
.orders-economics-card header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid #eee7d8; }
.orders-economics-card header strong { display:block; line-height:1.3; }
.orders-economics-card header code { display:block; margin-top:4px; color:#777; font-size:0.72rem; }
.orders-finance-badge { flex:none; padding:4px 7px; border-radius:7px; color:#fff; background:var(--green); font-size:0.65rem; font-weight:900; }
.orders-finance-badge.pending { background:var(--gold-dark); }
.orders-economics-metrics { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:12px; }
.orders-economics-metrics > div { min-width:0; padding:9px; border-radius:8px; background:#f8f8f6; }
.orders-economics-metrics span { display:block; margin-bottom:4px; color:#777; font-size:0.64rem; font-weight:800; text-transform:uppercase; }
.orders-economics-metrics b { display:block; overflow-wrap:anywhere; font-size:0.85rem; }
.orders-economics-metrics .success b { color:var(--green); }
.orders-economics-metrics .warning b { color:var(--gold-dark); }
.orders-economics-metrics .danger b { color:var(--red); }
.orders-economics-empty { grid-column:1/-1; padding:35px; text-align:center; color:#777; font-weight:800; }

@media (min-width: 1200px) {
    #order-economics-table { table-layout: fixed; }
    .exp-col-1 { width: 14% !important; } /* Order/Region */
    .exp-col-2 { width: 16% !important; } /* Type */
    .exp-col-3 { width: 8% !important; }  /* Price */
    .exp-col-4 { width: 34% !important; } /* Unit Economics Bar - Should be largest */
    .exp-col-5 { width: 14% !important; } /* Profit */
    .exp-col-6 { width: 14% !important; } /* Payout */
    
    #order-economics-body td {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #order-economics-body td.exp-col-4 {
        white-space: normal; /* Allow bar and legend to wrap if needed */
    }

    #order-economics-body td.exp-col-2 {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #order-economics-body td.exp-col-1 {
        overflow: visible;
        white-space: normal;
        text-overflow: clip;
        vertical-align: top;
    }
}

/* Expenses Strategic Audit Cards */
.expenses-audit-card {
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--gold-light);
    box-shadow: 0 4px 10px rgba(138, 122, 95, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}
.expenses-audit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(138, 122, 95, 0.12);
}
.expenses-audit-card.success {
    background: #f0faf5;
    border-left: 5px solid var(--green);
}
.expenses-audit-card.danger {
    background: #fff5f5;
    border-left: 5px solid var(--red);
}
.expenses-audit-card.warning {
    background: #fdf9f0;
    border-left: 5px solid var(--gold);
}

/* Hide spin buttons inside desktop settings inputs */
.desktop-settings input[type="number"]::-webkit-outer-spin-button,
.desktop-settings input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.desktop-settings input[type="number"] {
    -moz-appearance: textfield;
}


/* --- ATHENA STRUCTURED REPORT STYLES --- */

.athena-structured-report {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

/* Hero Section */
.athena-structured-hero {
    background: #ffffff;
    border: 2px solid var(--gold-light);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.athena-structured-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.athena-structured-hero-headline {
    font-size: 1.25em;
    font-weight: 900;
    color: var(--text-black);
    line-height: 1.4;
    border-left: 5px solid var(--gold);
    padding-left: 15px;
}

/* Bullet groups and cards */
.athena-structured-bullets {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.athena-structured-bullet-group {
    width: 100%;
}

.athena-structured-bullet-label {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 900;
    color: var(--gold-dark);
    margin-bottom: 10px;
}

.athena-bullet-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.athena-bullet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(138, 122, 95, 0.08) !important;
}

/* Tabs Section */
.athena-tabs-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.athena-tabs-header {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.athena-tabs-header::-webkit-scrollbar {
    display: none;
}

.athena-tab-btn {
    background: #fdfcf7;
    border: 1.5px solid var(--gold-light);
    color: var(--gold-dark);
    padding: 12px 24px;
    font-weight: 900;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.athena-tab-btn:hover {
    background: var(--beige);
}

.athena-tab-btn.active {
    background: var(--gold);
    color: #ffffff;
    border-color: var(--gold);
    box-shadow: 0 5px 15px rgba(184, 155, 94, 0.3);
}

.athena-tabs-content {
    background: transparent;
}

.athena-tab-pane {
    width: 100%;
}

/* Sections inside tabs */
.athena-structured-section {
    background: #ffffff;
    border: 1.5px solid var(--gold-light);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.athena-structured-copy {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.athena-structured-summary {
    font-size: 1.05em;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
}

/* Signals inside sections */
.athena-structured-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.athena-structured-signal {
    font-size: 0.75em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--gold-light);
}

.athena-structured-signal.positive {
    background: #f0faf5;
    border-color: rgba(45, 106, 79, 0.25);
    color: var(--green);
}

.athena-structured-signal.negative, .athena-structured-signal.critical {
    background: #fff5f5;
    border-color: rgba(141, 14, 7, 0.2);
    color: var(--red);
}

.athena-structured-signal.warning {
    background: #fffcf0;
    border-color: rgba(184, 155, 94, 0.25);
    color: var(--gold-dark);
}

.athena-structured-signal.neutral, .athena-structured-signal.info {
    background: #f4f6fa;
    border-color: rgba(61, 92, 149, 0.2);
    color: var(--blue);
}

/* Section KPI Indicators */
.athena-section-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 10px 0;
}

.athena-indicator-card {
    background: #fdfdfb;
    border: 1px solid var(--gold-light);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(138, 122, 95, 0.03);
    transition: transform 0.2s ease;
}

.athena-indicator-card:hover {
    transform: translateY(-2px);
}

.athena-indicator-card.trend-up {
    border-left: 4px solid var(--green);
}

.athena-indicator-card.trend-down {
    border-left: 4px solid var(--red);
}

.athena-indicator-card.trend-neutral {
    border-left: 4px solid var(--blue);
}

.athena-indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.athena-indicator-title {
    font-size: 0.8em;
    font-weight: 900;
    color: var(--gold-dark);
    text-transform: uppercase;
}

.athena-indicator-value {
    font-size: 1.3em;
    font-weight: 900;
    color: var(--text-black);
}

.athena-indicator-conclusion {
    font-size: 0.78em;
    font-weight: 700;
    color: #555;
    line-height: 1.3;
}

/* Final Verdict Section */
.athena-final-verdict {
    background: var(--glass-thick);
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.athena-final-verdict h2 {
    font-size: 1.4em;
    font-weight: 900;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--gold-light);
    padding-bottom: 10px;
}

.athena-final-verdict-text {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-black);
    line-height: 1.5;
}

.athena-final-jokes, .athena-final-advice {
    background: #fdfcf7;
    border: 1px solid var(--gold-light);
    border-radius: 12px;
    padding: 20px;
}

.athena-final-jokes h3, .athena-final-advice h3 {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 900;
    color: var(--gold-dark);
    margin-bottom: 12px;
}

.athena-final-jokes ul, .athena-final-advice ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.athena-final-jokes li, .athena-final-advice li {
    font-size: 0.9em;
    font-weight: 700;
    color: #444;
    position: relative;
    padding-left: 20px;
}

.athena-final-jokes li::before {
    content: "😏";
    position: absolute;
    left: 0;
}

.athena-final-advice li::before {
    content: "🧭";
    position: absolute;
    left: 0;
}

.athena-final-decision {
    background: #f4f6fa;
    border-left: 6px solid var(--blue);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9em;
    font-weight: 700;
}

.athena-final-decision div {
    line-height: 1.4;
}

/* HTML KPI Grid styles (instead of 3D canvas) */
.athena-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 10px;
}

.athena-kpi-card {
    background: #ffffff;
    border: 1px solid rgba(184, 155, 94, 0.18);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(138, 122, 95, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.athena-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(138, 122, 95, 0.1);
}

.athena-kpi-value-side {
    font-size: 1.8em;
    font-weight: 900;
    white-space: nowrap;
    flex-shrink: 0;
}

.athena-kpi-text-side {
    flex-grow: 1;
    min-width: 0;
}

.athena-kpi-card-title {
    font-size: 0.85em;
    font-weight: 700;
    color: #444;
    line-height: 1.3;
    display: block;
    word-wrap: break-word;
}

/* Layout controls for hero view switching */
.athena-layout-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: flex-start;
    align-items: center;
}

.athena-layout-btn {
    padding: 6px 14px;
    font-size: 0.8em;
    border-radius: 20px;
    border: 1px solid var(--gold-light);
    background: transparent;
    color: var(--gold-dark);
    cursor: pointer;
    font-weight: 900;
    transition: all 0.2s;
}

.athena-layout-btn.active {
    background: var(--gold-light) !important;
    color: var(--text-black) !important;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    body.zerkalo-mode .mobile-bottom-nav {
        height: 72px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    body.zerkalo-mode .nav-item {
        min-width: 0;
        padding: 8px 0 10px;
    }
    body.zerkalo-mode .nav-item .icon {
        font-size: 1.28em;
        margin-bottom: 3px;
    }
    body.zerkalo-mode .nav-item .label {
        font-size: 0.82em;
        line-height: 1.1;
        letter-spacing: 0.02em;
    }
    body.zerkalo-mode .side-menu-content {
        width: min(320px, 88vw) !important;
        padding: 26px 20px calc(42px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.zerkalo-mode .side-menu-legal-link {
        font-size: 0.92em;
    }
    body.zerkalo-mode .analysis-graph-panel .panel-title,
    body.zerkalo-mode .expenses-audit-title,
    body.zerkalo-mode .expenses-audit-period,
    body.zerkalo-mode .expenses-audit-note {
        text-align: center;
    }
    body.zerkalo-mode .expenses-audit-note {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100%;
    }
    body.zerkalo-mode .expenses-audit-chart-wrap {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    body.zerkalo-mode .expenses-audit-title {
        max-width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
        line-height: 1.15;
    }
    body.zerkalo-mode #user-account > .panel {
        margin: 18px auto 110px;
        padding: 20px 14px !important;
        border-radius: 22px;
    }
    body.zerkalo-mode #user-account h2,
    body.zerkalo-mode #user-account h4 {
        line-height: 1.2;
    }
    body.zerkalo-mode #user-account a,
    body.zerkalo-mode #user-account p,
    body.zerkalo-mode #user-account span,
    body.zerkalo-mode #admin-panel p,
    body.zerkalo-mode #admin-panel span,
    body.zerkalo-mode #admin-panel strong,
    body.zerkalo-mode #admin-panel h3,
    body.zerkalo-mode #admin-panel h4 {
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode #user-account input,
    body.zerkalo-mode #admin-panel input,
    body.zerkalo-mode #admin-panel textarea,
    body.zerkalo-mode #admin-panel select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    body.zerkalo-mode #admin-panel .panel,
    body.zerkalo-mode #admin-panel .admin-settings-shell,
    body.zerkalo-mode #admin-panel .admin-section-block {
        overflow: visible;
    }
    body.zerkalo-mode #admin-panel .admin-template-anchorbar {
        grid-template-columns: 1fr !important;
    }
    body.zerkalo-mode #admin-panel .admin-settings-card,
    body.zerkalo-mode #admin-panel .admin-athena-tier,
    body.zerkalo-mode #admin-panel .admin-callout,
    body.zerkalo-mode #admin-panel .admin-preview {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode #expenses-conclusion .mobile-stack {
        gap: 16px !important;
    }
    body.zerkalo-mode #economics-chart {
        height: 360px !important;
    }
    #economics-chart-legend,
    #economics-type-chart-legend {
        display: block !important;
        width: 100%;
        margin-top: 0;
        overflow: hidden;
        border: 1px solid #eee7d8;
        border-radius: 16px;
        background: #fffdf8;
        box-shadow: 0 8px 24px rgba(36, 28, 10, 0.06);
    }
    #economics-chart-legend .profit-legend-item,
    #economics-type-chart-legend .profit-legend-item {
        grid-template-columns: 12px minmax(0, 1fr);
        gap: 6px 10px;
        align-items: start;
        padding: 9px 12px;
    }
    #economics-chart-legend .profit-legend-name,
    #economics-type-chart-legend .profit-legend-name {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.25;
    }
    #economics-chart-legend .profit-legend-value,
    #economics-type-chart-legend .profit-legend-value {
        grid-column: 2;
        justify-self: start;
        font-size: 0.72rem;
        line-height: 1.25;
    }
    body.zerkalo-mode #analysis-graph-container {
        height: 520px !important;
    }
    
    body.zerkalo-mode #graph-legend div {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }
    #graph-legend span {
        width: 11px !important;
        height: 11px !important;
    }
    .athena-structured-hero, .athena-structured-section, .athena-final-verdict {
        padding: 16px;
        border-radius: 16px;
    }
    
    .athena-kpi-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .athena-kpi-card {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .athena-kpi-value-side {
        font-size: 1.5em;
    }
    
    .athena-section-indicators {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .athena-structured-hero-headline {
        font-size: 1.1em;
    }
    
    .athena-tab-btn {
        padding: 10px 16px;
        font-size: 0.8em;
    }
}




@media (max-width: 768px) and (orientation: landscape) {
    body.zerkalo-mode .mobile-bottom-nav {
        height: 64px;
    }
    body.zerkalo-mode #analysis-graph-container {
        height: 360px !important;
    }
    #graph-legend {
        top: 12px !important;
        right: 12px !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: min(188px, 34vw) !important;
        max-width: min(188px, 34vw) !important;
        padding: 10px !important;
        font-size: 0.54em !important;
    }
    #graph-legend button {
        padding: 6px !important;
        font-size: 0.78em !important;
    }
}

/* --- ZERKALO MODERN SUB-TABS STYLING --- */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 6px 8px;
    background: rgba(184, 155, 94, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(184, 155, 94, 0.15);
    backdrop-filter: blur(10px);
    width: max-content;
    max-width: 100%;
}

.sub-tab-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    font-weight: 800;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-tab-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-black);
}

.sub-tab-btn.active {
    background: white !important;
    border-color: rgba(184, 155, 94, 0.3) !important;
    color: var(--text-black) !important;
    box-shadow: 0 4px 12px rgba(138, 122, 95, 0.12) !important;
}

/* --- PREMIUM UI ADJUSTMENTS --- */
.panel {
    border: 1px solid rgba(184, 155, 94, 0.2) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(138, 122, 95, 0.06) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Clean up harsh red/blue panel borders */
#analysis-fines-panel {
    border: 1px solid rgba(141, 14, 7, 0.15) !important;
    border-left: 6px solid var(--red) !important;
    background: #fffcfc !important;
}

#analysis-promos-panel {
    border: 1px solid rgba(61, 92, 149, 0.15) !important;
    border-left: 6px solid var(--blue) !important;
    background: #fafbff !important;
}

#analysis-geo-panel {
    border: 1px solid rgba(45, 90, 39, 0.15) !important;
    border-left: 6px solid var(--green) !important;
    background: #fcfdfc !important;
}

#analysis-ratings-panel {
    border: 1px solid rgba(184, 155, 94, 0.15) !important;
    border-left: 6px solid var(--gold) !important;
    background: #fffdf9 !important;
}

/* Table Enhancements */
tr:hover td {
    background-color: #fdfbf7 !important;
    transition: background-color 0.15s ease;
}

th {
    border-bottom: 2px solid rgba(184, 155, 94, 0.2) !important;
}

td {
    font-weight: 700 !important;
    color: #333 !important;
}

/* Mobile responsive styles for sub-tabs */
@media (max-width: 768px) {
    .sub-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide standard Firefox scrollbar */
        padding: 5px 6px !important;
        margin-bottom: 18px !important;
        border-radius: 12px !important;
        width: 100% !important;
    }
    
    .sub-tabs::-webkit-scrollbar {
        display: none; /* Hide Chrome/Safari scrollbar */
    }

    .sub-tab-btn {
        padding: 8px 14px !important;
        font-size: 0.78em !important;
        border-radius: 9px !important;
        flex-shrink: 0; /* Prevent buttons from squeezing */
    }
}

/* --- EXECUTIVE ALERTS & GRID SYSTEM --- */
.executive-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 25px;
    margin-bottom: 25px;
    align-items: start; /* Prevents height stretching! */
}

/* Column spans for desktop sizes */
.col-span-7 {
    grid-column: span 7;
}

.col-span-5 {
    grid-column: span 5;
}

.col-span-6 {
    grid-column: span 6;
}

.col-span-12 {
    grid-column: span 12;
}

.align-start {
    align-self: start;
}

@media (max-width: 1024px) {
    .executive-dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Preserve responsive ordering when stacked on mobile/tablet */
    .order-0-mob { order: 0 !important; }
    .order-1-mob { order: 1 !important; }
    .order-2-mob { order: 2 !important; }
    .order-3-mob { order: 3 !important; }
    .order-4-mob { order: 4 !important; }
    .order-5-mob { order: 5 !important; }
    .order-6-mob { order: 6 !important; }
}

.alert-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 18px 24px;
    border-radius: 18px;
    font-size: 0.9em;
    margin-bottom: 12px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
    border-width: 1.5px;
    border-style: solid;
}

.alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 122, 95, 0.08);
}

.alert-card.danger {
    background: rgba(231, 76, 60, 0.06) !important;
    border-color: rgba(231, 76, 60, 0.2) !important;
    color: #c0392b !important;
}

.alert-card.warning {
    background: rgba(241, 196, 15, 0.06) !important;
    border-color: rgba(241, 196, 15, 0.2) !important;
    color: #d35400 !important;
}

.alert-card.info {
    background: rgba(52, 152, 219, 0.06) !important;
    border-color: rgba(52, 152, 219, 0.2) !important;
    color: #2980b9 !important;
}

.alert-card.success {
    background: rgba(46, 204, 113, 0.06) !important;
    border-color: rgba(46, 204, 113, 0.2) !important;
    color: #27ae60 !important;
}

.alert-action-btn {
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 10px !important;
    font-size: 0.78em !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background 0.15s !important;
    color: white !important;
}

.alert-card.danger .alert-action-btn { background: #e74c3c; }
.alert-card.danger .alert-action-btn:hover { background: #c0392b; }

.alert-card.warning .alert-action-btn { background: #f1c40f; }
.alert-card.warning .alert-action-btn:hover { background: #d35400; }

.alert-card.info .alert-action-btn { background: #3498db; }
.alert-card.info .alert-action-btn:hover { background: #2980b9; }

.alert-card.success .alert-action-btn { background: #2ecc71; }
.alert-card.success .alert-action-btn:hover { background: #27ae60; }


/* ============================================
   UX SIMPLIFICATION LAYER — v1.0 (2026-07)
   Applied per: Addy Osmani + Anthropic skills
   ============================================ */

/* === COLLAPSIBLE METHODOLOGY BLOCK === */
.methodology-block { border: 2px solid var(--gold-light); border-radius: 15px; overflow: hidden; margin-top: 20px; }
.methodology-toggle {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px;
    background: var(--ivory); border: none; cursor: pointer; width: 100%;
    font-size: 0.82em; font-weight: 900; color: var(--gold-dark); text-transform: uppercase;
    letter-spacing: 0.5px; transition: background 0.2s;
}
.methodology-toggle:hover { background: var(--beige); }
.methodology-toggle .toggle-chevron { margin-left: auto; transition: transform 0.3s; font-style: normal; }
.methodology-toggle.open .toggle-chevron { transform: rotate(180deg); }
.methodology-body { display: none; padding: 18px; background: white; font-size: 0.85em; }
.methodology-body.open { display: block; }

/* === QUICK-NAV BAR === */
.quick-nav-bar {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
    padding: 16px 20px; background: white; border: 1.5px solid var(--gold-light);
    border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.quick-nav-bar .qnb-label {
    font-size: 0.7em; font-weight: 900; color: var(--gold-dark);
    text-transform: uppercase; letter-spacing: 1px; align-self: center; white-space: nowrap;
    margin-right: 5px;
}
.qnb-btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 14px;
    background: var(--ivory); border: 1.5px solid var(--gold-light); border-radius: 10px;
    font-size: 0.8em; font-weight: 900; color: #333; cursor: pointer; transition: all 0.2s;
    white-space: nowrap; text-decoration: none;
}
.qnb-btn:hover { background: var(--gold-dark); color: white; border-color: var(--gold-dark); transform: translateY(-1px); }
.qnb-btn .qnb-badge {
    background: var(--red); color: white; border-radius: 10px;
    padding: 1px 6px; font-size: 0.85em; font-weight: 900; min-width: 18px; text-align: center;
}

/* === ENTREPRENEUR FIRST DASHBOARD === */
body.zerkalo-mode .entrepreneur-hero-panel {
    padding: 26px;
    border: 2px solid var(--gold-light);
    background: linear-gradient(135deg, #fffef9 0%, #f6f1e3 100%);
    margin-bottom: 18px;
}
body.zerkalo-mode .entrepreneur-eyebrow {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--gold-dark);
    font-weight: 900;
    margin-bottom: 8px;
}
body.zerkalo-mode .entrepreneur-title {
    margin: 0;
    font-size: 1.65em;
    color: #1f2d3d;
}
body.zerkalo-mode .entrepreneur-subtitle {
    margin: 10px 0 0 0;
    font-size: 0.95em;
    line-height: 1.55;
    color: #505050;
    font-weight: 700;
}
body.zerkalo-mode .entrepreneur-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}
body.zerkalo-mode .entrepreneur-card {
    background: rgba(255,255,255,0.92);
    border: 1.5px solid rgba(184,155,94,0.25);
    border-radius: 18px;
    padding: 18px;
}
body.zerkalo-mode .entrepreneur-card.warning { border-color: #f0c48a; background: #fff9ef; }
body.zerkalo-mode .entrepreneur-card.success { border-color: #cfe7d2; background: #f5fbf6; }
body.zerkalo-mode .entrepreneur-card-kicker {
    display: inline-block;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-dark);
    font-weight: 900;
    margin-bottom: 10px;
}
body.zerkalo-mode .entrepreneur-card strong {
    display: block;
    font-size: 1em;
    color: #1f2d3d;
    margin-bottom: 8px;
}
body.zerkalo-mode .entrepreneur-card p {
    margin: 0;
    font-size: 0.86em;
    line-height: 1.5;
    color: #555;
    font-weight: 700;
}
body.zerkalo-mode #kpi-overview-toggle { margin-bottom: 18px; }
@media (max-width: 768px) {
    body.zerkalo-mode .entrepreneur-hero-panel { padding: 20px; }
    body.zerkalo-mode .entrepreneur-title { font-size: 1.25em; }
    body.zerkalo-mode .entrepreneur-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* === ZERKALO IA SHELL === */
body.zerkalo-mode .zerkalo-intro-card {
    background: linear-gradient(135deg, #fffdf8 0%, #f8f3e6 100%);
    border: 2px solid var(--gold-light);
    border-radius: 20px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
body.zerkalo-mode .zerkalo-intro-eyebrow {
    font-size: 0.72em;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 8px;
}
body.zerkalo-mode .zerkalo-intro-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    color: #1f2d3d;
}
body.zerkalo-mode .zerkalo-intro-card p {
    margin: 0;
    color: #4a4a4a;
    line-height: 1.55;
    font-weight: 700;
}
body.zerkalo-mode .zerkalo-stage-card {
    background: white;
    border: 1.5px solid rgba(184, 155, 94, 0.28);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
}
body.zerkalo-mode .zerkalo-stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
body.zerkalo-mode .zerkalo-stage-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f7f1e2;
    color: var(--gold-dark);
    font-size: 0.74em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}
body.zerkalo-mode .zerkalo-stage-note {
    margin: 0 0 14px 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.86em;
    font-weight: 700;
}
body.zerkalo-mode .zerkalo-stage-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
body.zerkalo-mode .zerkalo-collapsible-section,
body.zerkalo-mode .zerkalo-collapsible-panel {
    background: white;
    border: 1.5px solid rgba(184, 155, 94, 0.28);
    border-radius: 18px;
    margin-bottom: 18px;
    overflow: hidden;
}
body.zerkalo-mode .zerkalo-collapsible-section summary,
body.zerkalo-mode .zerkalo-collapsible-panel summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 16px 18px;
    background: #fffdf8;
    color: #1f2d3d;
    font-weight: 900;
}
body.zerkalo-mode .zerkalo-collapsible-section summary::-webkit-details-marker,
body.zerkalo-mode .zerkalo-collapsible-panel summary::-webkit-details-marker {
    display: none;
}
body.zerkalo-mode .zerkalo-collapsible-section summary em,
body.zerkalo-mode .zerkalo-collapsible-panel summary em {
    font-style: normal;
    font-size: 0.74em;
    text-transform: uppercase;
    color: var(--gold-dark);
    opacity: 0.9;
}
body.zerkalo-mode .zerkalo-collapsible-section[open] summary em,
body.zerkalo-mode .zerkalo-collapsible-panel[open] summary em {
    color: var(--blue);
}
body.zerkalo-mode .zerkalo-collapsible-body {
    padding: 0 18px 18px;
}
body.zerkalo-mode .zerkalo-collapsible-section.is-empty {
    opacity: 0.88;
}
body.zerkalo-mode .zerkalo-inline-collapse {
    margin-top: 14px;
}
body.zerkalo-mode .zerkalo-inline-collapse .table-container {
    margin-top: 12px;
}

/* === INSIGHT PANEL TITLE === */
.insight-title {
    font-weight: 900; font-size: 1.1em; color: var(--gold-dark);
    text-transform: uppercase; margin-bottom: 20px; margin-top: 0;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.insight-title .insight-delta {
    font-size: 0.75em; padding: 3px 10px; border-radius: 20px; font-weight: 900;
    background: var(--beige); border: 1.5px solid var(--gold-light);
}
.insight-title .delta-up { background: #eafaf1; border-color: #2ecc71; color: #1e8449; }
.insight-title .delta-down { background: #fdf3f3; border-color: #e74c3c; color: #c0392b; }
.insight-title .delta-neutral { background: #f0f3ff; border-color: #3498db; color: #1a5276; }

/* === STATUS HERO PANEL === */
.status-hero {
    border-radius: 18px; padding: 20px 24px; display: flex;
    align-items: center; gap: 18px; margin-bottom: 20px;
    border: 2.5px solid; transition: all 0.3s;
}
.status-hero.ok { background: #f0faf4; border-color: #2ecc71; }
.status-hero.warn { background: #fffbf0; border-color: #f39c12; }
.status-hero.danger { background: #fdf3f3; border-color: #e74c3c; }
.status-hero-icon { font-size: 2.5em; flex-shrink: 0; }
.status-hero-text h4 { margin: 0; font-size: 1em; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
.status-hero-text p { margin: 4px 0 0 0; font-size: 0.85em; font-weight: 700; opacity: 0.8; }
.status-hero-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* === PANEL SECTION DIVIDER === */
.section-divider {
    display: flex; align-items: center; gap: 12px; margin: 28px 0 20px 0;
}
.section-divider span {
    font-size: 0.7em; font-weight: 900; color: var(--gold-dark);
    text-transform: uppercase; letter-spacing: 1.5px; white-space: nowrap;
}
.section-divider::before, .section-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--gold-light);
}

/* === KPI CARD STATUS COLORS === */
.kpi-card.status-ok { border-top-color: #2ecc71; }
.kpi-card.status-warn { border-top-color: #f39c12; }
.kpi-card.status-danger { border-top-color: #e74c3c; }
.kpi-card .status-dot-kpi {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px;
}
.status-dot-kpi.ok { background: #2ecc71; }
.status-dot-kpi.warn { background: #f39c12; }
.status-dot-kpi.danger { background: #e74c3c; }

/* === TAB ALERT BADGE === */
.tab-btn { position: relative; }
.tab-alert-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--red); color: white; border-radius: 50%;
    width: 18px; height: 18px; font-size: 10px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white; display: none;
}
.tab-alert-badge.visible { display: flex; }

/* === ALERTS PANEL — HERO PLACEMENT === */
#zerkalo-alerts-panel {
    order: -1; /* Force to top of flex/grid container */
}

@media (max-width: 768px) {
    .quick-nav-bar { gap: 8px; padding: 12px 14px; }
    .qnb-btn { padding: 7px 10px; font-size: 0.75em; }
    .status-hero { flex-wrap: wrap; }
    .status-hero-actions { margin-left: 0; }
    body.zerkalo-mode .mobile-bottom-nav { display: flex !important; visibility: visible !important; pointer-events: auto !important; }
}

@media (min-width: 769px) {
    body.zerkalo-mode .mobile-bottom-nav { display: none !important; visibility: hidden !important; pointer-events: none !important; }
    body.zerkalo-mode .quick-nav-bar { display: none !important; }
}

body.zerkalo-mode .quick-nav-bar { display: none !important; }

body.zerkalo-mode .zerkalo-mobile-nav { display: none !important; visibility: hidden !important; pointer-events: none !important; }
@media (max-width: 768px) {
  body.zerkalo-mode .zerkalo-mobile-nav { display: flex !important; visibility: visible !important; pointer-events: auto !important; }
}

body.zerkalo-mode .executive-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
body.zerkalo-mode #zerkalo-alerts-panel,
body.zerkalo-mode #zerkalo-recommendations-panel,
body.zerkalo-mode #zerkalo-trend-panel,
body.zerkalo-mode #kpi-overview-toggle,
body.zerkalo-mode #entrepreneur-hero {
    grid-column: 1 / -1;
}
body.zerkalo-mode #zerkalo-alerts-panel,
body.zerkalo-mode #zerkalo-recommendations-panel,
body.zerkalo-mode #zerkalo-trend-panel,
body.zerkalo-mode #zerkalo-waterfall-panel,
body.zerkalo-mode #zerkalo-topsku-panel,
body.zerkalo-mode #zerkalo-pie-panel {
    min-height: unset !important;
    align-self: start;
}
body.zerkalo-mode .desktop-settings {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100%;
}
body.zerkalo-mode .desktop-settings span {
    letter-spacing: 0 !important;
}
@media (max-width: 768px) {
    body.zerkalo-mode .executive-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* === ZERKALO TASK-BASED UX V3 === */
body.zerkalo-mode .nav-tabs {
    align-items: stretch;
    gap: 8px;
}

body.zerkalo-mode .nav-tabs .tab-btn {
    min-height: 48px;
    justify-content: center;
    letter-spacing: 0.02em;
}

body.zerkalo-mode .zerkalo-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

body.zerkalo-mode .zerkalo-action-card {
    min-height: 118px;
    padding: 16px;
    border: 1.5px solid rgba(184, 155, 94, 0.35);
    border-radius: 16px;
    background: #fff;
    color: #1f2d3d;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.zerkalo-mode .zerkalo-action-card:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 24px rgba(72, 57, 25, 0.1);
    transform: translateY(-2px);
}

body.zerkalo-mode .zerkalo-action-card:focus-visible,
body.zerkalo-mode .athena-assistant-trigger:focus-visible,
body.zerkalo-mode .sub-tab-btn:focus-visible {
    outline: 3px solid rgba(61, 92, 149, 0.38);
    outline-offset: 2px;
}

body.zerkalo-mode .zerkalo-action-card strong {
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 7px;
}

body.zerkalo-mode .zerkalo-action-card span {
    color: #626262;
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 700;
}

body.zerkalo-mode .zerkalo-action-card em {
    margin-top: auto;
    padding-top: 12px;
    color: var(--blue);
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 900;
}

body.zerkalo-mode .zerkalo-composed-tab > .sub-tabs,
body.zerkalo-mode .tab-content > .sub-tabs {
    margin-bottom: 16px;
}

body.zerkalo-mode .zerkalo-intro-card {
    box-shadow: none;
}

body.zerkalo-mode .zerkalo-stage-body > [id^="analysis-"],
body.zerkalo-mode .zerkalo-stage-body > [id^="expenses-"] {
    margin-top: 0 !important;
}

body.zerkalo-mode .athena-assistant-trigger {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    min-height: 58px;
    padding: 9px 16px 9px 10px;
    border: 2px solid var(--gold-light);
    border-radius: 18px;
    background: #26231d;
    color: #fff;
    box-shadow: 0 14px 35px rgba(31, 28, 22, 0.24);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

body.zerkalo-mode .athena-assistant-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f4ead0;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

body.zerkalo-mode .athena-assistant-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

body.zerkalo-mode .athena-assistant-copy strong {
    font-size: 0.82rem;
}

body.zerkalo-mode .athena-assistant-copy small {
    margin-top: 3px;
    color: #ded5c0;
    font-size: 0.65rem;
    font-weight: 700;
}

@media (min-width: 1200px) {
    body.zerkalo-mode .zerkalo-mobile-nav {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.zerkalo-mode .nav-tabs .tab-btn {
        flex: 1 1 0;
    }
}

@media (max-width: 1199px) {
    body.zerkalo-mode {
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }

    body.zerkalo-mode .zerkalo-mobile-nav {
        display: flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.zerkalo-mode .athena-assistant-trigger {
        right: 16px;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
        width: 52px;
        height: 52px;
        min-height: 52px;
        padding: 0;
        border-radius: 16px;
        justify-content: center;
    }

    body.zerkalo-mode .athena-assistant-icon {
        width: auto;
        height: auto;
        background: transparent;
        font-size: 1.3rem;
    }

    body.zerkalo-mode .athena-assistant-copy {
        display: none;
    }

    body.zerkalo-mode .sub-tabs {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        padding: 6px;
    }

    body.zerkalo-mode .sub-tab-btn {
        min-height: 44px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    body.zerkalo-mode .zerkalo-action-grid {
        grid-template-columns: 1fr;
    }

    body.zerkalo-mode .zerkalo-action-card {
        min-height: 104px;
    }

    body.zerkalo-mode #admin-panel [style*="grid-template-columns"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.zerkalo-mode #admin-panel .table-container,
    body.zerkalo-mode #admin-panel .admin-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    body.zerkalo-mode #admin-panel button,
    body.zerkalo-mode #admin-panel a[role="button"] {
        min-height: 44px;
    }
}

@media (max-width: 768px) {
    body.zerkalo-mode .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    body.zerkalo-mode .period-bar {
        margin-bottom: 16px !important;
        padding: 12px !important;
    }

    body.zerkalo-mode .entrepreneur-hero-panel,
    body.zerkalo-mode .zerkalo-intro-card {
        padding: 18px !important;
        border-radius: 18px;
    }

    body.zerkalo-mode .entrepreneur-subtitle,
    body.zerkalo-mode .zerkalo-intro-card p {
        font-size: 0.84rem;
    }

    body.zerkalo-mode .zerkalo-stage-card {
        padding: 12px;
        border-radius: 16px;
    }

    body.zerkalo-mode .zerkalo-collapsible-body {
        padding: 0 12px 12px;
    }

    body.zerkalo-mode .zerkalo-stage-body {
        gap: 12px;
    }

    body.zerkalo-mode #analysis-overview-panel {
        gap: 12px !important;
    }

    body.zerkalo-mode #analysis-graph-container {
        min-height: 360px;
        height: min(520px, 64vh) !important;
        touch-action: pan-y;
    }

    body.zerkalo-mode #admin-panel {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    body.zerkalo-mode #admin-panel .panel,
    body.zerkalo-mode #admin-panel .admin-settings-card,
    body.zerkalo-mode #admin-panel .admin-section-block {
        padding: 14px !important;
        border-radius: 16px !important;
    }
}
body.zerkalo-mode .welcome-section-list {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
    max-height: min(430px, 58vh);
    overflow-y: auto;
    padding-right: 4px;
}

body.zerkalo-mode .welcome-section-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border: 1px solid rgba(184, 155, 94, 0.34);
    border-radius: 12px;
    background: #fffdf8;
}

body.zerkalo-mode .welcome-section-item > span {
    font-size: 1.25rem;
}

body.zerkalo-mode .welcome-section-item b {
    color: var(--gold-dark);
    font-size: 0.76rem;
    text-transform: uppercase;
}

body.zerkalo-mode .welcome-section-item p {
    margin: 3px 0 0;
    color: #555;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}
/* ZERKALO COMPACT MOBILE SUMMARY */
@media (max-width: 768px) {
    body.zerkalo-mode .entrepreneur-hero-panel {
        padding: 15px !important;
    }

    body.zerkalo-mode .entrepreneur-title {
        font-size: 1.12rem;
    }

    body.zerkalo-mode .entrepreneur-subtitle {
        margin-top: 7px;
        line-height: 1.4;
    }

    body.zerkalo-mode .entrepreneur-grid {
        gap: 8px;
        margin-top: 12px;
    }

    body.zerkalo-mode .entrepreneur-card {
        padding: 12px;
        border-radius: 14px;
    }

    body.zerkalo-mode .entrepreneur-card-kicker {
        margin-bottom: 5px;
        font-size: 0.61rem;
    }

    body.zerkalo-mode .entrepreneur-card strong {
        margin-bottom: 4px;
        font-size: 0.86rem;
    }

    body.zerkalo-mode .entrepreneur-card p {
        font-size: 0.74rem;
        line-height: 1.35;
    }
}
/* ZERKALO ADMIN MOBILE REFLOW */
@media (max-width: 640px) {
    body.zerkalo-mode #admin-panel .admin-results-grid {
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: minmax(0, 1fr) !important;
        overflow: hidden !important;
    }

    body.zerkalo-mode #admin-panel .admin-user-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        padding: 14px !important;
        box-sizing: border-box !important;
    }

    body.zerkalo-mode #admin-panel .admin-user-card-head {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    body.zerkalo-mode #admin-panel .admin-card-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 8px !important;
    }

    body.zerkalo-mode #admin-panel .admin-card-actions .btn-gold {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        flex: none !important;
        padding: 10px 12px !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        box-sizing: border-box !important;
    }

    body.zerkalo-mode .admin-user-modal-shell {
        padding: 6px !important;
        align-items: flex-start !important;
    }

    body.zerkalo-mode .admin-user-modal,
    body.zerkalo-mode .admin-legal-modal {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: calc(100dvh - 12px) !important;
        max-height: none !important;
        padding: 12px !important;
        border-radius: 18px !important;
        box-sizing: border-box !important;
    }

    body.zerkalo-mode .admin-legal-modal-layout,
    body.zerkalo-mode .admin-legal-editor-grid {
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    body.zerkalo-mode #admin-legal-body {
        width: 100% !important;
        min-height: 280px !important;
        height: 46vh !important;
        box-sizing: border-box !important;
    }

    body.zerkalo-mode #admin-legal-preview {
        width: 100% !important;
        min-height: 220px !important;
        max-height: none !important;
        box-sizing: border-box !important;
        overflow-wrap: anywhere;
    }

    body.zerkalo-mode .admin-legal-modal-header > div:last-child,
    body.zerkalo-mode .admin-legal-modal-header .btn-gold {
        width: 100% !important;
    }
}
/* ZERKALO LEGAL EDITOR MOBILE COMPACTION */
@media (max-width: 640px) {
    body.zerkalo-mode #admin-legal-modal-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        padding: 2px 2px 8px;
        box-sizing: border-box;
    }

    body.zerkalo-mode #admin-legal-modal-list .admin-mini-card {
        flex: 0 0 78%;
        width: 78% !important;
        min-width: 0 !important;
        min-height: 116px !important;
        padding: 12px !important;
        scroll-snap-align: start;
        box-sizing: border-box !important;
    }

    body.zerkalo-mode #admin-legal-preview {
        min-height: 220px !important;
        height: 340px !important;
        max-height: 340px !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    body.zerkalo-mode .admin-legal-editor-grid {
        align-items: start !important;
    }

    body.zerkalo-mode #admin-legal-save {
        width: 100% !important;
        min-height: 48px !important;
    }
}
/* Zerkalo responsive QA fixes: keep every dashboard module readable on narrow screens. */
@media (min-width: 1200px) {
    body.zerkalo-mode .athena-assistant-trigger {
        width: 52px; height: 52px; min-height: 52px; padding: 0;
        border-radius: 16px; justify-content: center;
    }
    body.zerkalo-mode .athena-assistant-icon {
        width: auto; height: auto; background: transparent;
    }
    body.zerkalo-mode .athena-assistant-copy { display: none; }
}

@media (max-width: 768px) {
    body.zerkalo-mode .executive-dashboard-grid > * {
        grid-column: 1 / -1 !important;
        width: 100% !important; min-width: 0 !important; max-width: 100% !important;
        box-sizing: border-box;
    }
    body.zerkalo-mode .zerkalo-collapsible-body {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important; min-width: 0 !important;
    }
    body.zerkalo-mode .zerkalo-collapsible-body > * {
        grid-column: 1 / -1 !important;
        width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    }
    body.zerkalo-mode #forecast .forecast-data-check,
    body.zerkalo-mode #forecast .data-check-grid,
    body.zerkalo-mode #forecast .data-card {
        width: 100% !important; min-width: 0 !important; max-width: 100% !important;
        box-sizing: border-box;
    }
    body.zerkalo-mode #forecast .data-check-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}
@media (min-width: 1200px) {
    body.zerkalo-mode #kpi-area {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    body.zerkalo-mode #kpi-area .kpi-card {
        min-width: 0 !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }
    body.zerkalo-mode #kpi-area .kpi-value {
        font-size: clamp(1.85rem, 2.35vw, 2.65rem) !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}

/* Zerkalo interaction polish: readable alerts, smooth navigation, stable expanded charts. */
body.zerkalo-mode .zerkalo-collapsible-section summary,
body.zerkalo-mode .zerkalo-collapsible-panel summary {
    transition: background-color 180ms ease, color 180ms ease;
}
body.zerkalo-mode .zerkalo-collapsible-section summary:hover,
body.zerkalo-mode .zerkalo-collapsible-panel summary:hover {
    background: #faf5e9;
}
body.zerkalo-mode .zerkalo-collapsible-body { min-width: 0; }
body.zerkalo-mode .tab-content:not(.hidden) {
    animation: zerkalo-tab-enter 320ms cubic-bezier(.2,.8,.2,1) both;
}
body.zerkalo-mode .alert-card > div { min-width: 0; }
body.zerkalo-mode .alert-card > div > div:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.45;
}
body.zerkalo-mode .alert-action-btn {
    flex: 0 0 auto;
    min-height: 40px;
    transition: background-color 160ms ease, transform 160ms ease !important;
}
body.zerkalo-mode .alert-action-btn:hover { transform: translateY(-1px); }

@keyframes zerkalo-tab-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    body.zerkalo-mode .alert-card {
        align-items: stretch;
        flex-direction: column;
        padding: 16px !important;
    }
    body.zerkalo-mode .alert-action-btn {
        width: 100%;
        min-height: 44px;
        white-space: normal !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.zerkalo-mode .tab-content:not(.hidden) { animation: none; }
    body.zerkalo-mode *, body.zerkalo-mode *::before, body.zerkalo-mode *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Keep product and reason labels readable instead of silently truncating them. */
body.zerkalo-mode .profit-legend-name {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

@media (max-width: 768px) {
    body.zerkalo-mode .analysis-plan-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: start !important;
        gap: 10px !important;
    }
    body.zerkalo-mode .analysis-plan-title {
        width: 100%;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode .analysis-reliability-badge {
        justify-self: start;
        max-width: 100%;
        box-sizing: border-box;
    }
    body.zerkalo-mode #analysis-plan-summary > div:not(:first-child) {
        align-items: flex-start !important;
        gap: 8px;
        flex-wrap: wrap;
    }
    body.zerkalo-mode #analysis-plan-summary > div > span:first-child {
        flex: 1 1 180px !important;
        min-width: 0 !important;
        padding-right: 0 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }
    body.zerkalo-mode #analysis-plan-summary > div > span:last-child {
        flex: 0 0 auto;
        min-width: 64px !important;
        margin-left: auto;
    }
}

/* ZERKALO DATA AND RESPONSIVENESS FIXES V20 */
body.zerkalo-mode .tab-content {
    min-height: 0;
}
body.zerkalo-mode .tab-content:not(.hidden) {
    animation-fill-mode: none;
}
body.zerkalo-mode .loader-overlay {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    min-width: 100vw;
    min-height: 100dvh;
    isolation: isolate;
}
body.zerkalo-mode #sales-overview #analysis-overview-panel {
    margin-top: 12px !important;
    gap: 16px;
}
body.zerkalo-mode #sales-overview #analysis-overview-panel > .panel,
body.zerkalo-mode #pricing > .panel {
    align-self: start;
    min-height: 0 !important;
}
body.zerkalo-mode #kpi-overview-toggle,
body.zerkalo-mode #kpi-overview-toggle > .zerkalo-collapsible-body,
body.zerkalo-mode #kpi-area {
    overflow: visible !important;
}
body.zerkalo-mode .orders-finance-breakdown {
    margin-top: 15px;
    border-top: 1.5px dashed var(--gold-light);
    padding-top: 15px;
}
body.zerkalo-mode .orders-finance-breakdown .orders-payout-total {
    grid-column: 1 / -1;
    background: #fdfaf0;
    border: 1.5px solid var(--gold-light);
}
body.zerkalo-mode .orders-finance-note {
    margin: 10px 0 0;
    color: #6e6250;
    font-size: 0.76rem;
    line-height: 1.45;
}
body.zerkalo-mode #expenses-reviews-panel.is-empty::after { content: none; display: none; }
body.zerkalo-mode #abc-xyz .panel:has(#abc-matrix-container),
body.zerkalo-mode #abc-matrix-container {
    overflow: visible !important;
}
body.zerkalo-mode .abc-cell {
    position: relative;
}
body.zerkalo-mode .abc-cell:focus-visible {
    outline: 4px solid rgba(61, 92, 149, 0.45);
    outline-offset: 3px;
}
body.zerkalo-mode .abc-cell-tooltip {
    position: absolute;
    z-index: 120;
    left: 50%;
    top: calc(100% + 10px);
    width: min(300px, 80vw);
    padding: 14px;
    border: 2px solid var(--gold);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(28, 24, 15, 0.2);
    color: var(--text-black);
    text-align: left;
    text-shadow: none;
    transform: translate(-50%, -4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}
body.zerkalo-mode .abc-cell:hover .abc-cell-tooltip,
body.zerkalo-mode .abc-cell:focus .abc-cell-tooltip,
body.zerkalo-mode .abc-cell.active .abc-cell-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
body.zerkalo-mode .abc-cell-tooltip > strong {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-dark);
    font-size: 0.82rem;
}
body.zerkalo-mode .abc-tooltip-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid #eee7d8;
    font-size: 0.74rem;
    line-height: 1.3;
}
body.zerkalo-mode .abc-tooltip-product span {
    min-width: 0;
    overflow-wrap: anywhere;
}
body.zerkalo-mode .abc-tooltip-product b {
    white-space: nowrap;
    color: var(--green);
}
body.zerkalo-mode .abc-cell-tooltip small {
    display: block;
    margin-top: 8px;
    color: #6e6250;
}
body.zerkalo-mode #analysis-3d-canvas {
    will-change: auto;
}
@media (max-width: 768px) {
    body.zerkalo-mode .metric-tooltip {
        position: fixed;
        z-index: 100000;
        inset: auto 12px calc(86px + env(safe-area-inset-bottom)) 12px;
        width: auto;
        max-width: none;
        transform: none;
        box-sizing: border-box;
    }
    body.zerkalo-mode .metric-tooltip::after {
        display: none;
    }
    body.zerkalo-mode #kpi-area {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body.zerkalo-mode #kpi-area .kpi-card {
        min-width: 0;
        padding: 18px 16px;
    }
    body.zerkalo-mode #kpi-area .kpi-value {
        white-space: normal !important;
        overflow-wrap: anywhere;
        font-size: clamp(1.8rem, 10vw, 2.35rem) !important;
    }
    body.zerkalo-mode #abc-xyz .panel:has(#abc-matrix-container) {
        position: static;
    }
    body.zerkalo-mode .abc-cell-tooltip {
        position: fixed;
        z-index: 100001;
        inset: auto 12px calc(88px + env(safe-area-inset-bottom)) 12px;
        width: auto;
        max-height: min(48vh, 360px);
        overflow-y: auto;
        transform: translateY(8px);
    }
    body.zerkalo-mode .abc-cell:hover:not(.active) .abc-cell-tooltip {
        opacity: 0;
        visibility: hidden;
    }
    body.zerkalo-mode .abc-cell.active .abc-cell-tooltip,
    body.zerkalo-mode .abc-cell:focus .abc-cell-tooltip {
        transform: translateY(0);
    }
    body.zerkalo-mode #analysis-graph-container {
        height: 440px !important;
    }
    body.zerkalo-mode .orders-economics-metrics {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    body.zerkalo-mode .orders-finance-breakdown .orders-payout-total {
        grid-column: 1 / -1;
    }
}body.zerkalo-mode .graph-mobile-hint {
    display: none;
}
@media (max-width: 768px) {
    body.zerkalo-mode .graph-mobile-hint {
        display: block;
        margin: 0 0 8px;
        color: #5d5548;
        font-size: 0.68rem;
        line-height: 1.35;
        text-transform: none;
    }
}body.zerkalo-mode .review-efficiency-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d8cba9;
    border-radius: 12px;
    background: #fffaf0;
    color: #5f5543;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
}
/* Zerkalo polish v22: business palette, smooth disclosure and compact context. */
body.zerkalo-mode .methodology-body {
    display: block; max-height: 0; overflow: hidden; opacity: 0; padding: 0 18px; transform: translateY(-6px);
    transition: max-height 360ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease, padding 360ms cubic-bezier(.2,.8,.2,1), transform 300ms ease;
}
body.zerkalo-mode .methodology-body.open { max-height: 420px; opacity: 1; padding: 18px; transform: translateY(0); }
body.zerkalo-mode .avg-price-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
body.zerkalo-mode .avg-price-context span { display: grid; gap: 3px; padding: 10px 8px; border: 1px solid rgba(176,112,48,.24); border-radius: 12px; background: rgba(255,255,255,.52); }
body.zerkalo-mode .avg-price-context small { color: #7a664f; font-weight: 800; }
body.zerkalo-mode .avg-price-context b { color: #3D5C95; font-size: .9rem; overflow-wrap: anywhere; }
body.zerkalo-mode .alert-card.danger { background: rgba(197,54,71,.09) !important; border-color: rgba(197,54,71,.35) !important; color: #8D0E07 !important; }
body.zerkalo-mode .alert-card.warning { background: rgba(241,192,61,.13) !important; border-color: rgba(176,112,48,.34) !important; color: #602A1D !important; }
body.zerkalo-mode .alert-card.info { background: rgba(61,92,149,.09) !important; border-color: rgba(61,92,149,.28) !important; color: #3D5C95 !important; }
body.zerkalo-mode .alert-card.success { background: rgba(201,157,99,.12) !important; border-color: rgba(201,157,99,.38) !important; color: #602A1D !important; }
body.zerkalo-mode .alert-card.danger .alert-action-btn { background: #C53647 !important; }
body.zerkalo-mode .alert-card.warning .alert-action-btn { background: #B07030 !important; }
body.zerkalo-mode .alert-card.info .alert-action-btn { background: #3D5C95 !important; }
body.zerkalo-mode .alert-card.success .alert-action-btn { background: #C99D63 !important; color: #24170f !important; }
body.zerkalo-mode #analysis-graph-container { overflow: hidden; background: #F8F4F0; }
body.zerkalo-mode #analysis-3d-canvas { display: block; background: #F8F4F0; }
@media (max-width: 768px) {
    body.zerkalo-mode .avg-price-context { gap: 8px; }
    body.zerkalo-mode .avg-price-context span { padding: 9px 6px; }
    body.zerkalo-mode .methodology-body.open { max-height: 560px; }
}

/* Zerkalo v23: viewport-safe tooltips and denser decision cards. */
body.zerkalo-mode .avg-price-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.zerkalo-mode #abc-xyz .abc-cell-tooltip {
    position: fixed !important;
    z-index: 100002 !important;
    inset: 50% auto auto 50% !important;
    width: min(420px, calc(100vw - 48px)) !important;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    box-sizing: border-box;
    transform: translate(-50%, calc(-50% + 8px)) !important;
}
body.zerkalo-mode #abc-xyz .abc-cell:hover .abc-cell-tooltip,
body.zerkalo-mode #abc-xyz .abc-cell:focus .abc-cell-tooltip,
body.zerkalo-mode #abc-xyz .abc-cell.active .abc-cell-tooltip {
    transform: translate(-50%, -50%) !important;
}
body.zerkalo-mode #forecast .ledger-tooltip {
    position: fixed !important;
    z-index: 100003 !important;
    inset: 50% auto auto 50% !important;
    width: min(460px, calc(100vw - 48px)) !important;
    max-width: none !important;
    max-height: calc(100vh - 48px) !important;
    overflow: auto !important;
    box-sizing: border-box;
    transform: translate(-50%, calc(-50% + 8px)) !important;
}
body.zerkalo-mode #forecast .data-card:hover .ledger-tooltip,
body.zerkalo-mode #forecast .data-card:focus-within .ledger-tooltip {
    transform: translate(-50%, -50%) !important;
}
body.zerkalo-mode #forecast .zerkalo-inline-collapse:has(#model-tiles-container) {
    margin-top: 18px;
    margin-bottom: 18px;
}
@media (max-width: 768px) {
    body.zerkalo-mode #abc-xyz .abc-cell-tooltip,
    body.zerkalo-mode #forecast .ledger-tooltip {
        inset: auto 12px calc(88px + env(safe-area-inset-bottom)) 12px !important;
        width: auto !important;
        max-height: min(58vh, 440px) !important;
        transform: translateY(8px) !important;
    }
    body.zerkalo-mode #abc-xyz .abc-cell.active .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell:focus .abc-cell-tooltip,
    body.zerkalo-mode #forecast .data-card:hover .ledger-tooltip,
    body.zerkalo-mode #forecast .data-card:focus-within .ledger-tooltip {
        transform: translateY(0) !important;
    }
}

/* Zerkalo v24: consistent hierarchy, bounded content and decision-first forecast. */
body.zerkalo-mode .tab-content.hidden {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
body.zerkalo-mode .tab-content:not(.hidden),
body.zerkalo-mode #main-ui {
    height: auto !important;
    min-height: 0 !important;
}
body.zerkalo-mode .tab-content > .sub-tabs {
    order: 0;
    margin-bottom: 14px;
}
body.zerkalo-mode .tab-content > .zerkalo-intro-card {
    order: 1;
    margin-top: 0 !important;
    margin-bottom: 18px;
}
body.zerkalo-mode #forecast .data-card:hover,
body.zerkalo-mode #forecast .data-card:focus-within {
    transform: none !important;
}
body.zerkalo-mode #forecast .ledger-tooltip {
    margin: 0 !important;
    overscroll-behavior: contain;
}
body.zerkalo-mode .review-history-block {
    margin-top: 20px;
    border: 1.5px solid #d5e8d4;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
body.zerkalo-mode .review-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #f0faf5;
    border-bottom: 1px solid #d5e8d4;
}
body.zerkalo-mode .review-history-head strong,
body.zerkalo-mode .review-history-head span { display: block; }
body.zerkalo-mode .review-history-head strong { color: #2d5a27; font-size: .95rem; }
body.zerkalo-mode .review-history-head div > span { margin-top: 3px; color: #667368; font-size: .72rem; font-weight: 700; }
body.zerkalo-mode .review-history-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    color: #2d5a27;
    font-size: .72rem;
    font-weight: 900;
}
body.zerkalo-mode .review-history-scroll { max-height: 360px; overflow: auto; overscroll-behavior: contain; }
body.zerkalo-mode .review-history-table { width: 100%; table-layout: auto; border-collapse: collapse; }
body.zerkalo-mode .review-history-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fffdf8;
    color: #6e6250;
    font-size: .68rem;
    text-transform: uppercase;
}
body.zerkalo-mode .review-history-table th,
body.zerkalo-mode .review-history-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eee7d8; }
body.zerkalo-mode .review-history-table td { font-size: .78rem; font-weight: 700; overflow-wrap: anywhere; }
body.zerkalo-mode .review-history-table th:last-child,
body.zerkalo-mode .review-history-table td:last-child { text-align: right; white-space: nowrap; }
body.zerkalo-mode .review-history-empty td { padding: 24px; text-align: center !important; color: #776f63; }
body.zerkalo-mode .forecast-result-summary {
    margin: 18px 0 4px;
    padding: 20px;
    border: 2px solid rgba(61,92,149,.22);
    border-radius: 20px;
    background: linear-gradient(135deg, #f7f9fd 0%, #fffdf8 100%);
}
body.zerkalo-mode .forecast-result-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
body.zerkalo-mode .forecast-result-heading span { color: #243b63; font-size: 1.05rem; font-weight: 950; }
body.zerkalo-mode .forecast-result-heading small { color: #6e7380; font-weight: 700; }
body.zerkalo-mode .forecast-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
body.zerkalo-mode .forecast-result-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(61,92,149,.16);
    border-radius: 15px;
    background: rgba(255,255,255,.88);
}
body.zerkalo-mode .forecast-result-card span,
body.zerkalo-mode .forecast-result-card small { display: block; color: #6e7380; font-size: .7rem; font-weight: 800; }
body.zerkalo-mode .forecast-result-card b { display: block; margin: 7px 0 5px; color: #243b63; font-size: clamp(1.15rem, 2.2vw, 1.65rem); overflow-wrap: anywhere; }
body.zerkalo-mode .forecast-result-card.primary { border-color: #3D5C95; background: #3D5C95; }
body.zerkalo-mode .forecast-result-card.primary span,
body.zerkalo-mode .forecast-result-card.primary small,
body.zerkalo-mode .forecast-result-card.primary b { color: #fff; }
body.zerkalo-mode .forecast-result-card.good { border-color: rgba(45,90,39,.38); }
body.zerkalo-mode .forecast-result-card.warning { border-color: rgba(176,112,48,.45); }
body.zerkalo-mode .forecast-result-card.danger { border-color: rgba(197,54,71,.45); }
body.zerkalo-mode #forecast-chart { contain: layout paint; }
@media (max-width: 768px) {
    body.zerkalo-mode .review-history-head { align-items: flex-start; }
    body.zerkalo-mode .review-history-scroll { max-height: 420px; padding: 8px; }
    body.zerkalo-mode .review-history-table thead { display: none; }
    body.zerkalo-mode .review-history-table,
    body.zerkalo-mode .review-history-table tbody,
    body.zerkalo-mode .review-history-table tr,
    body.zerkalo-mode .review-history-table td { display: block; width: 100%; box-sizing: border-box; }
    body.zerkalo-mode .review-history-table tr { margin-bottom: 8px; padding: 10px; border: 1px solid #e3eadf; border-radius: 12px; background: #fff; }
    body.zerkalo-mode .review-history-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 4px; border: 0; text-align: right !important; }
    body.zerkalo-mode .review-history-table td::before { content: attr(data-label); flex: 0 0 34%; color: #6e6250; text-align: left; font-size: .68rem; text-transform: uppercase; }
    body.zerkalo-mode .review-history-empty td { display: block; text-align: center !important; }
    body.zerkalo-mode .review-history-empty td::before { display: none; }
    body.zerkalo-mode .forecast-result-summary { padding: 15px; }
    body.zerkalo-mode .forecast-result-heading { display: block; }
    body.zerkalo-mode .forecast-result-heading small { margin-top: 4px; }
    body.zerkalo-mode .forecast-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    body.zerkalo-mode .forecast-result-card { padding: 12px; }
    body.zerkalo-mode #forecast .ledger-tooltip {
        position: fixed !important;
        inset: 12px 10px calc(82px + env(safe-area-inset-bottom)) 10px !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        transform: none !important;
    }
    body.zerkalo-mode #forecast .data-card:hover .ledger-tooltip,
    body.zerkalo-mode #forecast .data-card:focus-within .ledger-tooltip { transform: none !important; }
}
/* Zerkalo v25: adaptive overlays, compact pages and night theme. */
html[data-zerkalo-theme="dark"] { background: #111722; color-scheme: dark; }
body.zerkalo-mode { overflow-anchor: none; }
body.zerkalo-mode .container { min-height: 0 !important; padding-bottom: 36px; }
body.zerkalo-mode #main-ui { min-height: 0 !important; padding-bottom: 0 !important; }
body.zerkalo-mode .tab-content:not(.hidden) { min-width: 0; min-height: 0 !important; }
body.zerkalo-mode .panel,
body.zerkalo-mode .chart-container,
body.zerkalo-mode .table-container { min-width: 0; box-sizing: border-box; }
body.zerkalo-mode .theme-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 42px; padding: 9px 13px; border: 1.5px solid rgba(184,155,94,.42);
    border-radius: 12px; background: rgba(184,155,94,.1); color: var(--text-black);
    font: inherit; font-size: .75rem; cursor: pointer; transition: background 180ms ease, transform 180ms ease;
}
body.zerkalo-mode .theme-toggle-btn:hover { background: rgba(184,155,94,.2); transform: translateY(-1px); }

@media (min-width: 769px) {
    body.zerkalo-mode #abc-xyz .abc-cell-tooltip {
        position: fixed !important; inset: auto !important; width: min(420px, calc(100vw - 24px)) !important;
        max-height: calc(100vh - 24px) !important; transform: translateY(8px) !important;
    }
    body.zerkalo-mode #abc-xyz .abc-cell:hover .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell:focus .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell.active .abc-cell-tooltip { transform: translateY(0) !important; }
}

body.zerkalo-mode.zerkalo-dark {
    --cream: #111722; --cream-dark: #171f2c; --text-black: #edf1f7; --gold-dark: #e2bd72;
    --gold-light: #65563b; --blue: #7f9dd3; --green: #78b77a; --red: #ed7882;
    background: radial-gradient(circle at 15% 0%, #202a39 0, #111722 42%, #0d121b 100%) fixed;
    color: #edf1f7; color-scheme: dark;
}
body.zerkalo-mode.zerkalo-dark header,
body.zerkalo-mode.zerkalo-dark .header { background: rgba(18,24,34,.96) !important; border-color: #374154 !important; color: #edf1f7 !important; }
body.zerkalo-mode.zerkalo-dark .container,
body.zerkalo-mode.zerkalo-dark #main-ui { background: transparent !important; }
body.zerkalo-mode.zerkalo-dark .panel,
body.zerkalo-mode.zerkalo-dark .kpi-card,
body.zerkalo-mode.zerkalo-dark .chart-container,
body.zerkalo-mode.zerkalo-dark .table-container,
body.zerkalo-mode.zerkalo-dark .zerkalo-intro-card,
body.zerkalo-mode.zerkalo-dark .zerkalo-stage-card,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-section,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-panel,
body.zerkalo-mode.zerkalo-dark .review-history-block,
body.zerkalo-mode.zerkalo-dark .forecast-result-card {
    background: #1a2331 !important; border-color: #364154 !important; color: #edf1f7 !important;
}
body.zerkalo-mode.zerkalo-dark [style*="background: white"],
body.zerkalo-mode.zerkalo-dark [style*="background:#fff"],
body.zerkalo-mode.zerkalo-dark [style*="background: #fff"] { background: #1a2331 !important; }
body.zerkalo-mode.zerkalo-dark h1, body.zerkalo-mode.zerkalo-dark h2, body.zerkalo-mode.zerkalo-dark h3,
body.zerkalo-mode.zerkalo-dark h4, body.zerkalo-mode.zerkalo-dark strong, body.zerkalo-mode.zerkalo-dark b,
body.zerkalo-mode.zerkalo-dark .kpi-value, body.zerkalo-mode.zerkalo-dark td { color: #edf1f7; }
body.zerkalo-mode.zerkalo-dark p, body.zerkalo-mode.zerkalo-dark small, body.zerkalo-mode.zerkalo-dark .subtitle { color: #b9c4d4; }
body.zerkalo-mode.zerkalo-dark input, body.zerkalo-mode.zerkalo-dark select, body.zerkalo-mode.zerkalo-dark textarea {
    background: #111925 !important; border-color: #46536a !important; color: #f4f6fa !important;
}
body.zerkalo-mode.zerkalo-dark table { background: #18212e; color: #edf1f7; }
body.zerkalo-mode.zerkalo-dark th { background: #222d3c !important; color: #d9e2ef !important; border-color: #3a4659 !important; }
body.zerkalo-mode.zerkalo-dark td { border-color: #303b4d !important; }
body.zerkalo-mode.zerkalo-dark tr:hover td { background: #202b3a; }
body.zerkalo-mode.zerkalo-dark .sub-tabs, body.zerkalo-mode.zerkalo-dark .nav-tabs { background: #151d29 !important; border-color: #344054 !important; }
body.zerkalo-mode.zerkalo-dark .sub-tab-btn, body.zerkalo-mode.zerkalo-dark .nav-item { color: #c7d1df !important; }
body.zerkalo-mode.zerkalo-dark .sub-tab-btn.active, body.zerkalo-mode.zerkalo-dark .nav-item.active { background: #3D5C95 !important; color: #fff !important; }
body.zerkalo-mode.zerkalo-dark .methodology-body, body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-body { background: #18212e !important; }
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-section summary:hover,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-panel summary:hover { background: #232e3e; }
body.zerkalo-mode.zerkalo-dark .abc-cell-tooltip, body.zerkalo-mode.zerkalo-dark .ledger-tooltip,
body.zerkalo-mode.zerkalo-dark .metric-tooltip { background: #202a38 !important; border-color: #c99d63 !important; color: #f2f4f8 !important; }
body.zerkalo-mode.zerkalo-dark .abc-tooltip-product { border-color: #3a4658; }
body.zerkalo-mode.zerkalo-dark .review-history-head { background: #1c2d2a !important; border-color: #365049 !important; }
body.zerkalo-mode.zerkalo-dark .review-history-count, body.zerkalo-mode.zerkalo-dark .review-history-table tr { background: #202b38; color: #dce7e1; }
body.zerkalo-mode.zerkalo-dark .review-history-table th { background: #222d3c !important; }
body.zerkalo-mode.zerkalo-dark .forecast-result-summary { background: linear-gradient(135deg,#18283e,#1c2330); border-color: #48668f; }
body.zerkalo-mode.zerkalo-dark #analysis-graph-container, body.zerkalo-mode.zerkalo-dark #analysis-3d-canvas { background: #141c27 !important; }
body.zerkalo-mode.zerkalo-dark .theme-toggle-btn { background: #263348; border-color: #536783; color: #f2d08c; }

@media (max-width: 768px) {
    body.zerkalo-mode .container { padding: 12px 12px calc(94px + env(safe-area-inset-bottom)) !important; }
    body.zerkalo-mode .tab-content:not(.hidden) { width: 100%; overflow: visible; }
    body.zerkalo-mode .panel { padding: 16px !important; border-radius: 16px; }
    body.zerkalo-mode .panel h2, body.zerkalo-mode .panel h3 { line-height: 1.25; overflow-wrap: anywhere; }
    body.zerkalo-mode .sub-tabs { display: flex; overflow-x: auto; gap: 8px; padding: 7px; scroll-snap-type: x proximity; }
    body.zerkalo-mode .sub-tab-btn { flex: 0 0 auto; min-height: 44px; max-width: 78vw; padding: 10px 14px; white-space: normal; line-height: 1.2; scroll-snap-align: start; }
    body.zerkalo-mode .theme-toggle-btn.mobile-only { display: inline-flex !important; width: 44px; height: 44px; padding: 0; flex: 0 0 44px; }
    body.zerkalo-mode #abc-xyz .abc-cell-tooltip {
        inset: auto 12px calc(88px + env(safe-area-inset-bottom)) 12px !important;
        width: auto !important; max-height: min(58vh, 440px) !important; padding: 16px;
        font-size: .86rem; transform: translateY(8px) !important;
    }
    body.zerkalo-mode #abc-xyz .abc-cell.active .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell:focus .abc-cell-tooltip { transform: translateY(0) !important; }
    body.zerkalo-mode .abc-tooltip-product { font-size: .8rem; gap: 8px; }
    body.zerkalo-mode .review-history-scroll { max-height: 340px; }
    body.zerkalo-mode .review-history-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; }
    body.zerkalo-mode .review-history-table td { display: block; padding: 0; font-size: .88rem; text-align: left !important; }
    body.zerkalo-mode .review-history-table td:last-child { text-align: right !important; }
    body.zerkalo-mode .review-history-table td::before { display: block; margin-bottom: 3px; font-size: .66rem; }
    body.zerkalo-mode .review-history-empty td { grid-column: 1 / -1; }
}

/* Zerkalo v27: unified account hub and black antique night theme. */
body.zerkalo-mode .account-hub-button {
    position: relative; min-height: 42px; padding: 10px 15px; border: 1.5px solid var(--gold-light);
    background: linear-gradient(135deg, #3D5C95, #2f4775); color: #fff;
}
body.zerkalo-mode .account-hub-mobile {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
    padding: 0; border: 2px solid var(--gold-light); border-radius: 12px;
    background: rgba(184,155,94,.12); color: var(--gold-dark); cursor: pointer;
}
body.zerkalo-mode .account-hub-mobile span { font-size: 1.35rem; line-height: 1; }
body.zerkalo-mode .account-hub-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.zerkalo-mode .account-hub-action {
    display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 74px; padding: 13px;
    border: 1.5px solid var(--gold-light); border-radius: 14px; background: #fffdf7;
    color: var(--text-black); text-align: left; cursor: pointer; font: inherit;
}
body.zerkalo-mode .account-hub-action > span:first-child { flex: 0 0 auto; font-size: 1.25rem; }
body.zerkalo-mode .account-hub-action > span:last-child { min-width: 0; }
body.zerkalo-mode .account-hub-action b, body.zerkalo-mode .account-hub-action small { display: block; }
body.zerkalo-mode .account-hub-action b { font-size: .82rem; line-height: 1.25; }
body.zerkalo-mode .account-hub-action small { margin-top: 4px; color: #746b5e; font-size: .66rem; line-height: 1.35; }
body.zerkalo-mode #zerkalo-alerts-panel { border-color: rgba(201,157,99,.45); }
body.zerkalo-mode #alerts-summary-badge { white-space: normal; text-align: center; line-height: 1.25; }
body.zerkalo-mode .alert-card.danger { background: rgba(197,54,71,.10) !important; border-color: #C53647 !important; color: #8D0E07 !important; }
body.zerkalo-mode .alert-card.warning { background: rgba(241,192,61,.18) !important; border-color: #B07030 !important; color: #602A1D !important; }
body.zerkalo-mode .alert-card.info { background: rgba(61,92,149,.11) !important; border-color: #3D5C95 !important; color: #3D5C95 !important; }
body.zerkalo-mode .alert-card.success { background: rgba(213,217,229,.42) !important; border-color: #C99D63 !important; color: #602A1D !important; }

html[data-zerkalo-theme="dark"] { background: #050403 !important; color-scheme: dark; }
body.zerkalo-mode.zerkalo-dark {
    --cream: #050403; --cream-dark: #0b0907; --ivory: #13100c; --beige: #1b150e;
    --text-black: #f4ead6; --gold: #c99d63; --gold-dark: #e2b96f; --gold-light: #5f482a;
    --blue: #b07030; --green: #b9c58b; --red: #e26862;
    background-color: #050403 !important;
    background-image: radial-gradient(circle at 12% 0%, rgba(201,157,99,.09), transparent 24rem), radial-gradient(circle at 88% 12%, rgba(141,14,7,.09), transparent 26rem), repeating-linear-gradient(90deg, transparent 0 47px, rgba(201,157,99,.025) 48px 49px) !important;
    color: #f4ead6 !important;
}
body.zerkalo-mode.zerkalo-dark::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .26;
    background-image: linear-gradient(135deg, transparent 45%, rgba(201,157,99,.12) 46% 48%, transparent 49%), linear-gradient(45deg, transparent 45%, rgba(201,157,99,.08) 46% 48%, transparent 49%);
    background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
body.zerkalo-mode.zerkalo-dark .app-header,
body.zerkalo-mode.zerkalo-dark header { background: rgba(5,4,3,.97) !important; border-bottom: 1px solid #6b512f !important; box-shadow: 0 8px 30px rgba(0,0,0,.65) !important; }
body.zerkalo-mode.zerkalo-dark .header-logo { color: #e5c17d !important; text-shadow: 0 0 18px rgba(201,157,99,.18); }
body.zerkalo-mode.zerkalo-dark .container, body.zerkalo-mode.zerkalo-dark #main-ui { background: transparent !important; }
body.zerkalo-mode.zerkalo-dark .panel,
body.zerkalo-mode.zerkalo-dark .kpi-card,
body.zerkalo-mode.zerkalo-dark .chart-container,
body.zerkalo-mode.zerkalo-dark .table-container,
body.zerkalo-mode.zerkalo-dark .zerkalo-intro-card,
body.zerkalo-mode.zerkalo-dark .zerkalo-stage-card,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-section,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-panel,
body.zerkalo-mode.zerkalo-dark .forecast-result-card,
body.zerkalo-mode.zerkalo-dark .review-history-block,
body.zerkalo-mode.zerkalo-dark .side-menu-content {
    background: linear-gradient(145deg, #15110d, #0d0b08) !important;
    border-color: #5f482a !important; color: #f4ead6 !important;
    box-shadow: inset 0 1px rgba(255,233,187,.04), 0 14px 40px rgba(0,0,0,.38) !important;
}
body.zerkalo-mode.zerkalo-dark [style*="background: white"],
body.zerkalo-mode.zerkalo-dark [style*="background:white"],
body.zerkalo-mode.zerkalo-dark [style*="background: #fff"],
body.zerkalo-mode.zerkalo-dark [style*="background:#fff"],
body.zerkalo-mode.zerkalo-dark [style*="background: var(--ivory)"] { background: #15110d !important; }
body.zerkalo-mode.zerkalo-dark [style*="color: #000"],
body.zerkalo-mode.zerkalo-dark [style*="color:#000"],
body.zerkalo-mode.zerkalo-dark [style*="color: #222"],
body.zerkalo-mode.zerkalo-dark [style*="color:#222"],
body.zerkalo-mode.zerkalo-dark [style*="color: #333"],
body.zerkalo-mode.zerkalo-dark [style*="color:#333"] { color: #f4ead6 !important; }
body.zerkalo-mode.zerkalo-dark [style*="color: #666"],
body.zerkalo-mode.zerkalo-dark [style*="color:#666"],
body.zerkalo-mode.zerkalo-dark [style*="color: #888"],
body.zerkalo-mode.zerkalo-dark [style*="color:#888"] { color: #c9bda5 !important; }
body.zerkalo-mode.zerkalo-dark h1, body.zerkalo-mode.zerkalo-dark h2, body.zerkalo-mode.zerkalo-dark h3, body.zerkalo-mode.zerkalo-dark h4,
body.zerkalo-mode.zerkalo-dark .panel-title, body.zerkalo-mode.zerkalo-dark .insight-title { color: #f4ead6 !important; text-shadow: 0 0 14px rgba(244,234,214,.06); }
body.zerkalo-mode.zerkalo-dark p, body.zerkalo-mode.zerkalo-dark label, body.zerkalo-mode.zerkalo-dark small { color: #cfc3ab; }
body.zerkalo-mode.zerkalo-dark input, body.zerkalo-mode.zerkalo-dark select, body.zerkalo-mode.zerkalo-dark textarea { background: #080705 !important; border-color: #6a5130 !important; color: #fff4df !important; caret-color: #e2b96f; }
body.zerkalo-mode.zerkalo-dark input::placeholder, body.zerkalo-mode.zerkalo-dark textarea::placeholder { color: #8f846f; }
body.zerkalo-mode.zerkalo-dark table { background: #0c0a08 !important; color: #f4ead6 !important; }
body.zerkalo-mode.zerkalo-dark th { background: #1b150e !important; color: #e6c681 !important; border-color: #604a2e !important; }
body.zerkalo-mode.zerkalo-dark td { color: #eee4d2; border-color: #34291d !important; }
body.zerkalo-mode.zerkalo-dark tr:nth-child(even) td { background: rgba(201,157,99,.035); }
body.zerkalo-mode.zerkalo-dark tr:hover td { background: rgba(201,157,99,.09) !important; }
body.zerkalo-mode.zerkalo-dark .main-tabs, body.zerkalo-mode.zerkalo-dark .sub-tabs, body.zerkalo-mode.zerkalo-dark .mobile-bottom-nav { background: #090806 !important; border-color: #5f482a !important; }
body.zerkalo-mode.zerkalo-dark .tab-btn, body.zerkalo-mode.zerkalo-dark .sub-tab-btn, body.zerkalo-mode.zerkalo-dark .nav-item { color: #cfc3ab !important; }
body.zerkalo-mode.zerkalo-dark .tab-btn.active, body.zerkalo-mode.zerkalo-dark .sub-tab-btn.active, body.zerkalo-mode.zerkalo-dark .nav-item.active { background: linear-gradient(135deg,#8a5527,#c99d63) !important; color: #090603 !important; box-shadow: 0 0 18px rgba(201,157,99,.18); }
body.zerkalo-mode.zerkalo-dark .btn-gold:not(.alert-action-btn) { border-color: #6a5130 !important; color: #f4ead6 !important; }
body.zerkalo-mode.zerkalo-dark .account-hub-button, body.zerkalo-mode.zerkalo-dark .account-hub-mobile { background: #0b0907 !important; border-color: #c99d63 !important; color: #e5c17d !important; }
body.zerkalo-mode.zerkalo-dark .account-hub-action { background: #0a0907 !important; border-color: #5f482a !important; color: #f4ead6 !important; }
body.zerkalo-mode.zerkalo-dark .account-hub-action:hover { border-color: #c99d63 !important; background: #17110b !important; }
body.zerkalo-mode.zerkalo-dark .account-hub-action small { color: #b9ad97 !important; }
body.zerkalo-mode.zerkalo-dark .methodology-body, body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-body { background: #0b0907 !important; color: #eee4d2 !important; }
body.zerkalo-mode.zerkalo-dark summary { color: #ead7b2 !important; border-color: #4d3a25 !important; }
body.zerkalo-mode.zerkalo-dark summary:hover { background: rgba(201,157,99,.08) !important; }
body.zerkalo-mode.zerkalo-dark .metric-tooltip, body.zerkalo-mode.zerkalo-dark .ledger-tooltip, body.zerkalo-mode.zerkalo-dark .abc-cell-tooltip { background: #080705 !important; border-color: #c99d63 !important; color: #f4ead6 !important; box-shadow: 0 18px 50px #000 !important; }
body.zerkalo-mode.zerkalo-dark .loader-overlay { background: rgba(3,3,2,.86) !important; backdrop-filter: blur(7px); }
body.zerkalo-mode.zerkalo-dark .millimeter-bg { background-color: #090806 !important; background-image: linear-gradient(rgba(201,157,99,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(201,157,99,.08) 1px, transparent 1px) !important; }
body.zerkalo-mode.zerkalo-dark [id$="-chart"], body.zerkalo-mode.zerkalo-dark #analysis-graph-container, body.zerkalo-mode.zerkalo-dark #analysis-3d-canvas { background-color: #090806 !important; }
body.zerkalo-mode.zerkalo-dark .alert-card.danger { background: rgba(197,54,71,.18) !important; border-color: #C53647 !important; color: #ffb5ae !important; }
body.zerkalo-mode.zerkalo-dark .alert-card.warning { background: rgba(241,192,61,.14) !important; border-color: #B07030 !important; color: #ffe09a !important; }
body.zerkalo-mode.zerkalo-dark .alert-card.info { background: rgba(61,92,149,.22) !important; border-color: #9aa9ca !important; color: #e2e7f1 !important; }
body.zerkalo-mode.zerkalo-dark .alert-card.success { background: rgba(201,157,99,.14) !important; border-color: #C99D63 !important; color: #f4e0b8 !important; }
body.zerkalo-mode.zerkalo-dark #alerts-summary-badge { box-shadow: 0 0 16px rgba(201,157,99,.15); }

@media (max-width: 768px) {
    body.zerkalo-mode .account-hub-tools { grid-template-columns: minmax(0,1fr); }
    body.zerkalo-mode .account-hub-action { min-height: 68px; padding: 12px 14px; }
    body.zerkalo-mode .settings-menu > .panel { width: calc(100% - 20px) !important; max-height: calc(100dvh - 20px); margin: 10px; border-radius: 18px !important; }
    body.zerkalo-mode .settings-menu .panel-header { gap: 12px; padding: 16px !important; }
    body.zerkalo-mode .settings-menu .panel-header h3 { min-width: 0; font-size: 1rem !important; line-height: 1.25; }
    body.zerkalo-mode .settings-menu .panel-body { padding: 15px !important; max-height: calc(100dvh - 78px) !important; }
    body.zerkalo-mode #executive-alerts-panel .alert-card { font-size: .88rem; line-height: 1.45; }
    body.zerkalo-mode #alerts-summary-badge { max-width: 48%; font-size: .68rem !important; }
    body.zerkalo-mode.zerkalo-dark .mobile-region-item > div:first-child { color: #f4ead6 !important; }
}

/* Zerkalo v27.1: contrast corrections found during live mobile QA. */
body.zerkalo-mode.zerkalo-dark details.zerkalo-collapsible-panel > summary,
body.zerkalo-mode.zerkalo-dark details.zerkalo-collapsible-section > summary { background: #0b0907 !important; color: #ead7b2 !important; }
body.zerkalo-mode.zerkalo-dark .rec-item { background: #0a0907 !important; border-color: #6a5130 !important; color: #f4ead6 !important; }
body.zerkalo-mode.zerkalo-dark .rec-item .rec-text, body.zerkalo-mode.zerkalo-dark .rec-item .rec-text strong { color: #f4ead6 !important; }
body.zerkalo-mode.zerkalo-dark .avg-price-context span { background: rgba(201,157,99,.08) !important; border-color: #5f482a !important; }
body.zerkalo-mode.zerkalo-dark .avg-price-context small { color: #c9bda5 !important; }
body.zerkalo-mode.zerkalo-dark .avg-price-context b { color: #f0c978 !important; }
body.zerkalo-mode.zerkalo-dark .metric-btn.active { background: #c99d63 !important; border-color: #e4c480 !important; color: #090603 !important; }
@media (max-width: 768px) {
    body.zerkalo-mode #demo-banner { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; align-items: start !important; }
    body.zerkalo-mode #demo-banner.hidden { display: none !important; }
    body.zerkalo-mode #demo-banner > button { width: 100% !important; min-height: 48px; padding: 12px 16px !important; }
}


/* Zerkalo v29: antique ECharts tooltips. */
body.zerkalo-mode.zerkalo-dark > div[style*='z-index: 9999999'] {
    background: #080705 !important;
    color: #f4ead6 !important;
    border-color: #c99d63 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .75) !important;
}

/* Zerkalo v30: complete antique theme and isolated active-page footprint. */
body.zerkalo-mode .tab-content.hidden,
body.zerkalo-mode .zerkalo-composed-tab.hidden {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
body.zerkalo-mode.zerkalo-dark .period-btn:not(.active) {
    background: #0a0806 !important;
    border-color: #6a5130 !important;
    color: #f4ead6 !important;
    box-shadow: inset 0 1px rgba(255,235,196,.04) !important;
}
body.zerkalo-mode.zerkalo-dark .period-btn:not(.active):hover {
    background: #181109 !important;
    border-color: #c99d63 !important;
}
body.zerkalo-mode.zerkalo-dark .zerkalo-stage-kicker {
    background: rgba(201,157,99,.10) !important;
    border: 1px solid #6a5130 !important;
    color: #e7c784 !important;
}
body.zerkalo-mode.zerkalo-dark .verdict-card,
body.zerkalo-mode.zerkalo-dark .verdict-card.success,
body.zerkalo-mode.zerkalo-dark .verdict-card.warning,
body.zerkalo-mode.zerkalo-dark .verdict-card.danger,
body.zerkalo-mode.zerkalo-dark .insight-card,
body.zerkalo-mode.zerkalo-dark .season-card,
body.zerkalo-mode.zerkalo-dark .orders-economics-card,
body.zerkalo-mode.zerkalo-dark .ozon-statement-card,
body.zerkalo-mode.zerkalo-dark .expenses-audit-card,
body.zerkalo-mode.zerkalo-dark .data-card,
body.zerkalo-mode.zerkalo-dark .model-tile,
body.zerkalo-mode.zerkalo-dark .forecast-main-container,
body.zerkalo-mode.zerkalo-dark .forecast-stat-card,
body.zerkalo-mode.zerkalo-dark .athena-bullet-card,
body.zerkalo-mode.zerkalo-dark .athena-structured-bullet-box,
body.zerkalo-mode.zerkalo-dark .athena-structured-signal {
    background: linear-gradient(145deg, #15110d, #0b0907) !important;
    border-color: #604a2e !important;
    color: #f4ead6 !important;
    box-shadow: inset 0 1px rgba(255,233,187,.035), 0 10px 28px rgba(0,0,0,.34) !important;
}
body.zerkalo-mode.zerkalo-dark .verdict-card.success { border-color: #8e9b68 !important; }
body.zerkalo-mode.zerkalo-dark .verdict-card.warning { border-color: #b07030 !important; }
body.zerkalo-mode.zerkalo-dark .verdict-card.danger { border-color: #c53647 !important; }
body.zerkalo-mode.zerkalo-dark .insight-msg,
body.zerkalo-mode.zerkalo-dark .stat-year,
body.zerkalo-mode.zerkalo-dark .orders-economics-card header code,
body.zerkalo-mode.zerkalo-dark .orders-economics-metrics span,
body.zerkalo-mode.zerkalo-dark .orders-payout-breakdown span {
    color: #cfc3ab !important;
}
body.zerkalo-mode.zerkalo-dark .orders-economics-metrics > div,
body.zerkalo-mode.zerkalo-dark .orders-payout-breakdown > div,
body.zerkalo-mode.zerkalo-dark .orders-payout-total {
    background: #090806 !important;
    border-color: #4d3a25 !important;
    color: #f4ead6 !important;
}
body.zerkalo-mode.zerkalo-dark .orders-economics-card header {
    background: transparent !important;
    border-color: #4d3a25 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-content table,
body.zerkalo-mode.zerkalo-dark .tab-content thead,
body.zerkalo-mode.zerkalo-dark .tab-content tbody,
body.zerkalo-mode.zerkalo-dark .tab-content tr,
body.zerkalo-mode.zerkalo-dark .tab-content th,
body.zerkalo-mode.zerkalo-dark .tab-content td {
    background-color: #0c0a08 !important;
    color: #f4ead6 !important;
    border-color: #3d3021 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-content thead th,
body.zerkalo-mode.zerkalo-dark .tab-content tr[style*="background"] th {
    background-color: #1b150e !important;
    color: #e7c784 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-content tbody tr:nth-child(even) td {
    background-color: #100d09 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-content tbody tr:hover td {
    background-color: #1b140d !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-promos-panel,
body.zerkalo-mode.zerkalo-dark #analysis-regions-panel,
body.zerkalo-mode.zerkalo-dark #analysis-ratings-panel,
body.zerkalo-mode.zerkalo-dark #analysis-fines-panel,
body.zerkalo-mode.zerkalo-dark #analysis-plan-summary,
body.zerkalo-mode.zerkalo-dark #expenses-conclusion,
body.zerkalo-mode.zerkalo-dark #expenses-guide-panel,
body.zerkalo-mode.zerkalo-dark #expenses-reviews-panel,
body.zerkalo-mode.zerkalo-dark #expenses-order-details-panel {
    background: #0d0b08 !important;
    border-color: #604a2e !important;
    color: #f4ead6 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-content [style*="background: white"],
body.zerkalo-mode.zerkalo-dark .tab-content [style*="background:white"],
body.zerkalo-mode.zerkalo-dark .tab-content [style*="background: #f"],
body.zerkalo-mode.zerkalo-dark .tab-content [style*="background:#f"],
body.zerkalo-mode.zerkalo-dark .tab-content [style*="background-color: #f"],
body.zerkalo-mode.zerkalo-dark .tab-content [style*="background-color:#f"] {
    background: #0d0b08 !important;
    color: #f4ead6 !important;
}
body.zerkalo-mode.zerkalo-dark [style*="color: #444"],
body.zerkalo-mode.zerkalo-dark [style*="color:#444"],
body.zerkalo-mode.zerkalo-dark [style*="color: #555"],
body.zerkalo-mode.zerkalo-dark [style*="color:#555"],
body.zerkalo-mode.zerkalo-dark [style*="color: #777"],
body.zerkalo-mode.zerkalo-dark [style*="color:#777"],
body.zerkalo-mode.zerkalo-dark [style*="color: black"],
body.zerkalo-mode.zerkalo-dark [style*="color:black"] {
    color: #f4ead6 !important;
}
body.zerkalo-mode.zerkalo-dark .loader-overlay,
body.zerkalo-mode.zerkalo-dark [id$="-loader"] {
    background-color: rgba(3,2,1,.90) !important;
    color: #f4ead6 !important;
}
body.zerkalo-mode.zerkalo-dark .spinner {
    border-color: rgba(201,157,99,.22) !important;
    border-top-color: #e2b96f !important;
}
body.zerkalo-mode .account-hub-tools {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}
body.zerkalo-mode .account-hub-action {
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
body.zerkalo-mode .account-hub-action > span:last-child {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-wrap: anywhere;
}
body.zerkalo-mode .account-hub-action b,
body.zerkalo-mode .account-hub-action small {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}
body.zerkalo-mode.zerkalo-dark .millimeter-bg {
    background-color: #090806 !important;
    background-image: linear-gradient(rgba(201,157,99,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(201,157,99,.055) 1px, transparent 1px) !important;
}
body.zerkalo-mode.zerkalo-dark [id$="-chart"] canvas,
body.zerkalo-mode.zerkalo-dark .js-plotly-plot {
    color: #f4ead6 !important;
}
body.zerkalo-mode > div[style*="z-index: 9999999"] {
    max-width: min(380px, calc(100vw - 24px)) !important;
    color: inherit !important;
}
@media (max-width: 768px) {
    body.zerkalo-mode .account-hub-action {
        min-height: 82px;
        padding: 14px 12px;
    }
    body.zerkalo-mode .account-hub-action small {
        font-size: .7rem;
        line-height: 1.4;
    }
}
@media (max-width: 600px) {
    body.zerkalo-mode #expenses-conclusion > div[style*="minmax(300px"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Zerkalo v33: restrained dark theme and mobile overlay corrections. */
html[data-zerkalo-theme="dark"] {
    background: #070604 !important;
    background-image: none !important;
}
body.zerkalo-mode.zerkalo-dark {
    --cream: #070604;
    --cream-dark: #0d0c09;
    --text-black: #f3ead8;
    --gold-light: #4b3a25;
    --gold-dark: #d4ad6c;
    --blue: #c99d63;
    background: #070604 !important;
    background-image: none !important;
    color: #f3ead8;
}
body.zerkalo-mode.zerkalo-dark header,
body.zerkalo-mode.zerkalo-dark .header,
body.zerkalo-mode.zerkalo-dark .mobile-bottom-nav,
body.zerkalo-mode.zerkalo-dark .side-menu-content {
    background: #090806 !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.38) !important;
}
body.zerkalo-mode.zerkalo-dark .panel,
body.zerkalo-mode.zerkalo-dark .kpi-card,
body.zerkalo-mode.zerkalo-dark .chart-container,
body.zerkalo-mode.zerkalo-dark .table-container,
body.zerkalo-mode.zerkalo-dark .zerkalo-intro-card,
body.zerkalo-mode.zerkalo-dark .zerkalo-stage-card,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-section,
body.zerkalo-mode.zerkalo-dark .zerkalo-collapsible-panel,
body.zerkalo-mode.zerkalo-dark .forecast-result-summary,
body.zerkalo-mode.zerkalo-dark .forecast-result-card,
body.zerkalo-mode.zerkalo-dark .verdict-card,
body.zerkalo-mode.zerkalo-dark .insight-card,
body.zerkalo-mode.zerkalo-dark .season-card,
body.zerkalo-mode.zerkalo-dark .data-card,
body.zerkalo-mode.zerkalo-dark .model-tile,
body.zerkalo-mode.zerkalo-dark .forecast-main-container {
    background: #11100d !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.28) !important;
}
body.zerkalo-mode.zerkalo-dark .tab-btn.active,
body.zerkalo-mode.zerkalo-dark .sub-tab-btn.active,
body.zerkalo-mode.zerkalo-dark .nav-item.active {
    background: #c99d63 !important;
    background-image: none !important;
    color: #120e09 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark input,
body.zerkalo-mode.zerkalo-dark select,
body.zerkalo-mode.zerkalo-dark textarea,
body.zerkalo-mode.zerkalo-dark button {
    background-image: none !important;
}
body.zerkalo-mode.zerkalo-dark .side-menu-content .btn-gold,
body.zerkalo-mode.zerkalo-dark .side-menu-content button[style*="background:#fcfaf5"],
body.zerkalo-mode.zerkalo-dark .side-menu-content button[style*="background:#f6f0df"],
body.zerkalo-mode.zerkalo-dark .side-menu-content button[style*="background:#eee"] {
    background: #11100d !important;
    color: #f3ead8 !important;
    border-color: #4b3a25 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark .side-menu-content button[style*="background:#3D5C95"] {
    background: #2b2419 !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark .forecast-result-heading span,
body.zerkalo-mode.zerkalo-dark #forecast h4 {
    color: #e1bd7d !important;
}
body.zerkalo-mode.zerkalo-dark .forecast-result-heading small,
body.zerkalo-mode.zerkalo-dark #forecast .card-label,
body.zerkalo-mode.zerkalo-dark #forecast .card-delta {
    color: #cfc3ab !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .card-value {
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark .forecast-result-card.primary {
    background: #2b2419 !important;
    border-color: #c99d63 !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip,
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="background:#f7fafc"],
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="background: #f7fafc"] {
    background: #0d0c09 !important;
    color: #f3ead8 !important;
    border-color: #4b3a25 !important;
    box-shadow: 0 14px 36px rgba(0,0,0,.55) !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="color:#1a202c"],
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="color: #1a202c"],
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="color:#2d3748"],
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="color: #2d3748"] {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .ledger-tooltip [style*="border-bottom"] {
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark .athena-structured-hero,
body.zerkalo-mode.zerkalo-dark .athena-structured-section,
body.zerkalo-mode.zerkalo-dark .athena-final-verdict,
body.zerkalo-mode.zerkalo-dark .athena-viz,
body.zerkalo-mode.zerkalo-dark .athena-viz-card,
body.zerkalo-mode.zerkalo-dark .athena-viz-item,
body.zerkalo-mode.zerkalo-dark .athena-indicator-card,
body.zerkalo-mode.zerkalo-dark .athena-kpi-card,
body.zerkalo-mode.zerkalo-dark .athena-final-jokes,
body.zerkalo-mode.zerkalo-dark .athena-final-advice,
body.zerkalo-mode.zerkalo-dark .athena-final-decision,
body.zerkalo-mode.zerkalo-dark .athena-bullet-card,
body.zerkalo-mode.zerkalo-dark .athena-card-stack,
body.zerkalo-mode.zerkalo-dark .athena-deck-pane,
body.zerkalo-mode.zerkalo-dark .athena-graph-frame,
body.zerkalo-mode.zerkalo-dark .athena-markdown td {
    background: #11100d !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark .athena-structured-summary,
body.zerkalo-mode.zerkalo-dark .athena-indicator-conclusion,
body.zerkalo-mode.zerkalo-dark .athena-kpi-card-title,
body.zerkalo-mode.zerkalo-dark .athena-final-jokes li,
body.zerkalo-mode.zerkalo-dark .athena-final-advice li,
body.zerkalo-mode.zerkalo-dark .athena-markdown,
body.zerkalo-mode.zerkalo-dark .athena-markdown p,
body.zerkalo-mode.zerkalo-dark .athena-markdown li {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark .athena-inline-heading,
body.zerkalo-mode.zerkalo-dark .athena-viz-title,
body.zerkalo-mode.zerkalo-dark .athena-structured-bullet-label {
    color: #e1bd7d !important;
}
body.zerkalo-mode.zerkalo-dark .athena-markdown th {
    background: #211b13 !important;
    color: #f3ead8 !important;
    border-color: #4b3a25 !important;
}
@media (max-width: 768px) {
    body.zerkalo-mode .mobile-bottom-nav {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: auto !important;
        border: 1px solid #4b3a25 !important;
        border-radius: 18px !important;
        padding: 5px !important;
        overflow: hidden;
    }
    body.zerkalo-mode .mobile-bottom-nav .nav-item {
        margin: 0 2px;
        border-radius: 12px !important;
    }
    body.zerkalo-mode #athena-floating-indicator {
        right: 12px !important;
        bottom: calc(142px + env(safe-area-inset-bottom, 0px)) !important;
        max-width: calc(100vw - 24px);
        padding: 8px 10px !important;
        gap: 8px !important;
        border-radius: 14px !important;
        box-sizing: border-box;
    }
    body.zerkalo-mode #athena-floating-indicator > div:first-child {
        font-size: 1.2rem !important;
    }
    body.zerkalo-mode #athena-floating-indicator > div:nth-child(2) > div:nth-child(2) {
        width: min(86px, 24vw) !important;
    }
    body.zerkalo-mode .forecast-result-heading {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    body.zerkalo-mode .forecast-result-heading span,
    body.zerkalo-mode .forecast-result-heading small {
        display: block;
        width: 100%;
        line-height: 1.35;
    }
    body.zerkalo-mode #forecast .forecast-factors-grid {
        display: block !important;
    }
    body.zerkalo-mode #forecast .forecast-data-check {
        width: 100% !important;
        min-width: 0 !important;
    }
    body.zerkalo-mode #forecast .data-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    body.zerkalo-mode #forecast .data-card {
        min-width: 0 !important;
        min-height: 104px;
        padding: 12px 10px !important;
        box-sizing: border-box;
    }
    body.zerkalo-mode #forecast .card-label {
        font-size: .68rem !important;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode #forecast .card-value {
        font-size: 1rem !important;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode #forecast .card-delta {
        font-size: .68rem !important;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode #forecast .ledger-tooltip {
        position: fixed !important;
        top: 50% !important;
        right: 16px !important;
        bottom: auto !important;
        left: 16px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        max-height: min(52vh, 420px) !important;
        padding: 16px !important;
        overflow: auto !important;
        transform: translateY(calc(-50% + 8px)) !important;
        border-radius: 14px !important;
    }
    body.zerkalo-mode #forecast .data-card:hover .ledger-tooltip,
    body.zerkalo-mode #forecast .data-card:focus-within .ledger-tooltip {
        transform: translateY(-50%) !important;
    }
    body.zerkalo-mode #abc-xyz .abc-cell-tooltip {
        position: fixed !important;
        top: 50% !important;
        right: 16px !important;
        bottom: auto !important;
        left: 16px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        max-height: min(56vh, 440px) !important;
        padding: 16px !important;
        overflow: auto !important;
        transform: translateY(calc(-50% + 8px)) !important;
        border-radius: 14px !important;
    }
    body.zerkalo-mode #abc-xyz .abc-cell.active .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell:focus .abc-cell-tooltip {
        transform: translateY(-50%) !important;
    }
    body.zerkalo-mode #abc-xyz .abc-tooltip-product {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        width: 100%;
        min-width: 0;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}
/* Zerkalo v34: keep mobile ABC overlays viewport-relative. */
@media (max-width: 768px) {
    body.zerkalo-mode #abc-xyz .abc-cell,
    body.zerkalo-mode #abc-xyz .abc-cell:hover,
    body.zerkalo-mode #abc-xyz .abc-cell:focus,
    body.zerkalo-mode #abc-xyz .abc-cell.active { transform: none !important; }
}

/* Zerkalo v35: flat dark cards; chart grids remain functional. */
body.zerkalo-mode.zerkalo-dark .verdict-card.success,
body.zerkalo-mode.zerkalo-dark .verdict-card.warning,
body.zerkalo-mode.zerkalo-dark .verdict-card.danger,
body.zerkalo-mode.zerkalo-dark .ozon-statement-card,
body.zerkalo-mode.zerkalo-dark .ozon-statement-card.total,
body.zerkalo-mode.zerkalo-dark .ozon-statement-card.negative,
body.zerkalo-mode.zerkalo-dark .expenses-audit-card,
body.zerkalo-mode.zerkalo-dark .expenses-audit-card.success,
body.zerkalo-mode.zerkalo-dark .expenses-audit-card.warning,
body.zerkalo-mode.zerkalo-dark .expenses-audit-card.danger {
    background: #11100d !important;
    background-image: none !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.28) !important;
}
body.zerkalo-mode .kpi-grid,
body.zerkalo-mode .kpi-card {
    min-width: 0;
    overflow: hidden;
}
/* Zerkalo v36: dark-mode contrast, transparent tracks and compact responsive controls. */
body.zerkalo-mode.zerkalo-dark .progress-loader,
body.zerkalo-mode.zerkalo-dark .progress-loader.bg,
body.zerkalo-mode.zerkalo-dark .order-cost-track {
    background: transparent !important;
    border-color: rgba(201,157,99,.32) !important;
}
body.zerkalo-mode.zerkalo-dark .progress-loader:has(.progress-fill[style*="width: 0%"]),
body.zerkalo-mode.zerkalo-dark .order-cost-track:empty {
    border-color: rgba(201,157,99,.18) !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-ratings-panel [style*="color: #2d5a27"],
body.zerkalo-mode.zerkalo-dark #analysis-ratings-panel [style*="color:#2d5a27"],
body.zerkalo-mode.zerkalo-dark #price-matrix [style*="color: #2d5a27"],
body.zerkalo-mode.zerkalo-dark #price-matrix [style*="color:#2d5a27"] {
    color: #91d39a !important;
}
body.zerkalo-mode.zerkalo-dark #actual-prices-body .desktop-only,
body.zerkalo-mode.zerkalo-dark #actual-prices-body [style*="color:#3D5C95"],
body.zerkalo-mode.zerkalo-dark #actual-prices-body [style*="color: #3D5C95"] {
    color: #e2c48d !important;
    opacity: .9 !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel,
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel table,
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel tbody,
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel tr,
body.zerkalo-mode.zerkalo-dark #expenses-reviews-panel,
body.zerkalo-mode.zerkalo-dark .review-efficiency-note {
    background: #11100d !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel [style*="color: #222"],
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel [style*="color:#222"],
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel [style*="color: #666"],
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel [style*="color:#666"] {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel [style*="color: #2d5a27"],
body.zerkalo-mode.zerkalo-dark #analysis-geo-panel [style*="color:#2d5a27"] {
    color: #91d39a !important;
}
body.zerkalo-mode.zerkalo-dark .review-efficiency-note {
    box-shadow: none !important;
}
body.zerkalo-mode #settings-menu .control-group:has(#conn-select-mob) {
    display: grid;
    justify-items: center;
    gap: 9px;
    width: 100%;
    text-align: center;
}
body.zerkalo-mode #settings-menu .control-group:has(#conn-select-mob) .control-label {
    display: block;
    width: 100%;
    line-height: 1.35;
    text-align: center;
}
body.zerkalo-mode #settings-menu #conn-select-mob {
    width: min(100%, 280px);
    margin: 0 auto !important;
    text-align: center;
    text-align-last: center;
}
body.zerkalo-mode #settings-menu [style*="background: var(--ivory)"]:has(#new-client-id) {
    width: 100%;
    box-sizing: border-box;
}
body.zerkalo-mode #settings-menu [style*="background: var(--ivory)"]:has(#new-client-id) > h4 {
    margin: 0 0 18px !important;
    text-align: center;
    line-height: 1.35;
}
body.zerkalo-mode.zerkalo-dark .loader-overlay,
body.zerkalo-mode.zerkalo-dark #analysis-loader,
body.zerkalo-mode.zerkalo-dark #athena-loader,
body.zerkalo-mode.zerkalo-dark .tab-loading-ui {
    background: rgba(7,6,4,.88) !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-loading-banner {
    background: #11100d !important;
    border-color: #4b3a25 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark .tab-loading-banner strong {
    color: #e1bd7d !important;
}
body.zerkalo-mode.zerkalo-dark .tab-loading-banner p,
body.zerkalo-mode.zerkalo-dark .tab-loading-note {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-loading-card,
body.zerkalo-mode.zerkalo-dark .tab-loading-chart,
body.zerkalo-mode.zerkalo-dark .tab-loading-row {
    background: linear-gradient(90deg, #11100d 25%, #211b12 50%, #11100d 75%) !important;
    background-size: 200% 100% !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark .tab-loading-table {
    background: #0d0c09 !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode #forecast #forecast-explanation,
body.zerkalo-mode #forecast .forecast-formula-box,
body.zerkalo-mode #forecast .forecast-guard-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
body.zerkalo-mode #forecast .forecast-formula-box {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}
body.zerkalo-mode #forecast .forecast-guard-block {
    overflow: hidden;
}
body.zerkalo-mode #forecast .forecast-guard-block > div:first-child {
    min-width: 0;
    flex-wrap: wrap;
}
body.zerkalo-mode #forecast .forecast-guard-block p,
body.zerkalo-mode #forecast .forecast-guard-block > div:last-child {
    overflow-wrap: anywhere;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-guard-block {
    background: #11100d !important;
    color: #f3ead8 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-guard-block p,
body.zerkalo-mode.zerkalo-dark #forecast .forecast-guard-block > div:last-child {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler,
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler summary {
    background: #11100d !important;
    color: #f3ead8 !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler summary span,
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler li,
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler li b {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-report,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-copy,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-bullet-group,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-bullet-card,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-card-deck,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-panes,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-pane,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-graph,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-graph-placeholder,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-graph-frame,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-viz-chart {
    background: #11100d !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-bullet-card span,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-bullet-card p,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-copy,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-copy p,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-copy li {
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-tab,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-mobile-btn,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-graph-expand-btn {
    background: #17130d !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-tab.active {
    background: #c99d63 !important;
    color: #120e09 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .js-plotly-plot,
body.zerkalo-mode.zerkalo-dark #athena-ai .plot-container,
body.zerkalo-mode.zerkalo-dark #athena-ai .svg-container,
body.zerkalo-mode.zerkalo-dark #athena-ai .main-svg {
    background: #0d0c09 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .main-svg .bg {
    fill: #0d0c09 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .main-svg text {
    fill: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .main-svg .gridlayer path {
    stroke: rgba(201,157,99,.18) !important;
}
@media (max-width: 768px) {
    body.zerkalo-mode #forecast .forecast-formula-box {
        padding: 13px !important;
        font-size: 1rem !important;
        text-align: center;
    }
    body.zerkalo-mode #forecast .forecast-guard-block {
        padding: 16px !important;
        border-width: 2px !important;
    }
    body.zerkalo-mode #forecast .forecast-guard-block > div:first-child {
        align-items: flex-start !important;
        gap: 9px !important;
    }
    body.zerkalo-mode #forecast .forecast-guard-block p {
        font-size: .92rem !important;
        line-height: 1.55 !important;
    }
    body.zerkalo-mode #settings-menu .panel-body {
        padding-inline: 18px !important;
    }
}
/* Zerkalo v38: mobile hierarchy, stable chart theming and complete dark surfaces. */
html[data-zerkalo-theme] {
    background: #f7f4ec;
}
html[data-zerkalo-theme="dark"] {
    background: #050403 !important;
}
html.zerkalo-theme-switching body.zerkalo-mode,
html.zerkalo-theme-switching body.zerkalo-mode .panel,
html.zerkalo-theme-switching body.zerkalo-mode .tab-content,
html.zerkalo-theme-switching body.zerkalo-mode .main-tabs,
html.zerkalo-theme-switching body.zerkalo-mode .sub-tabs,
html.zerkalo-theme-switching body.zerkalo-mode .mobile-bottom-nav,
html.zerkalo-theme-switching body.zerkalo-mode button,
html.zerkalo-theme-switching body.zerkalo-mode input,
html.zerkalo-theme-switching body.zerkalo-mode select,
html.zerkalo-theme-switching body.zerkalo-mode details,
html.zerkalo-theme-switching body.zerkalo-mode summary {
    transition: background-color .28s ease, color .22s ease, border-color .28s ease, box-shadow .28s ease !important;
}
body.zerkalo-mode .pricing-intelligence-copy { min-width: 0; }
body.zerkalo-mode .pricing-intelligence-actions { flex: 0 0 auto; align-items: stretch; }
body.zerkalo-mode .pricing-intelligence-actions select,
body.zerkalo-mode .pricing-intelligence-actions button { min-height: 44px; }
body.zerkalo-mode .analysis-plan-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
    gap: 14px;
    margin-bottom: 10px;
}
body.zerkalo-mode .analysis-plan-product-name {
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
body.zerkalo-mode .analysis-plan-product-qty {
    min-width: 72px;
    text-align: right;
    white-space: nowrap;
    line-height: 1.35;
}
body.zerkalo-mode .analysis-plan-product-qty b { color: var(--blue); font-size: 1.08em; }
body.zerkalo-mode .abc-period-note {
    margin: 0 0 20px;
    padding: 12px 15px;
    border: 1px solid var(--gold-light);
    border-radius: 12px;
    background: var(--ivory);
    color: #625742;
    font-size: .84rem;
    font-weight: 750;
    line-height: 1.45;
}
body.zerkalo-mode #kpi-overview-toggle > summary {
    overflow: hidden;
    border-radius: 18px 18px 0 0 !important;
    clip-path: inset(0 round 18px 18px 0 0);
}
body.zerkalo-mode #kpi-overview-toggle:not([open]) > summary {
    border-radius: 18px !important;
    clip-path: inset(0 round 18px);
}
body.zerkalo-mode #economics-region-chart {
    width: min(100%, 1040px) !important;
    margin-inline: auto;
    min-width: 0;
}
body.zerkalo-mode #orders-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
body.zerkalo-mode.zerkalo-dark .profit-chart-legend {
    background: #0d0c09 !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark .profit-legend-name,
body.zerkalo-mode.zerkalo-dark .profit-legend-value,
body.zerkalo-mode.zerkalo-dark .profit-legend-empty {
    color: #fff !important;
}
body.zerkalo-mode.zerkalo-dark #seasons-cards .season-card,
body.zerkalo-mode.zerkalo-dark #seasons-cards .header,
body.zerkalo-mode.zerkalo-dark #seasons-cards .icon,
body.zerkalo-mode.zerkalo-dark #seasons-cards .season-stats {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #seasons-cards .season-card {
    background: #11100d !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-promos-panel,
body.zerkalo-mode.zerkalo-dark #analysis-promos-panel > div,
body.zerkalo-mode.zerkalo-dark #promo-actions-list > * {
    background: #11100d !important;
    background-image: none !important;
    border-color: #6b5532 !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #analysis-promos-panel h3,
body.zerkalo-mode.zerkalo-dark #analysis-promos-panel h4,
body.zerkalo-mode.zerkalo-dark #analysis-promos-panel [style*="#3D5C95"] {
    color: #e1bd7d !important;
}
body.zerkalo-mode.zerkalo-dark #user-account,
body.zerkalo-mode.zerkalo-dark #user-account .panel,
body.zerkalo-mode.zerkalo-dark #user-account [style*="background: white"],
body.zerkalo-mode.zerkalo-dark #user-account [style*="background:white"],
body.zerkalo-mode.zerkalo-dark #user-account [style*="background: #f"],
body.zerkalo-mode.zerkalo-dark #user-account [style*="background:#f"] {
    background: #11100d !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #user-account input,
body.zerkalo-mode.zerkalo-dark #user-account select,
body.zerkalo-mode.zerkalo-dark #user-account textarea,
body.zerkalo-mode.zerkalo-dark #user-account button:not(.btn-gold) {
    background: #0a0907 !important;
    border-color: #5f482a !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #orders-pagination-container button:disabled,
body.zerkalo-mode.zerkalo-dark #orders-pagination-container [disabled] {
    background: #17130d !important;
    border-color: #3d3222 !important;
    color: #746b5e !important;
    box-shadow: none !important;
    opacity: .62;
}
body.zerkalo-mode.zerkalo-dark .abc-period-note {
    background: #11100d;
    border-color: #4b3a25;
    color: #d7cbb5;
}
body.zerkalo-mode.zerkalo-dark #overall-price-chart,
body.zerkalo-mode.zerkalo-dark #price-matrix .millimeter-bg {
    background-color: #090806 !important;
    background-image: linear-gradient(rgba(201,157,99,.075) 1px, transparent 1px), linear-gradient(90deg, rgba(201,157,99,.075) 1px, transparent 1px) !important;
}
@media (max-width: 768px) {
    body.zerkalo-mode .pricing-intelligence-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 15px !important;
    }
    body.zerkalo-mode .pricing-intelligence-copy h3 {
        font-size: 1.03rem !important;
        line-height: 1.3 !important;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode .pricing-intelligence-copy p {
        margin-bottom: 0 !important;
        font-size: .82rem !important;
        line-height: 1.45 !important;
    }
    body.zerkalo-mode .pricing-intelligence-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
    }
    body.zerkalo-mode .pricing-intelligence-actions select,
    body.zerkalo-mode .pricing-intelligence-actions button {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 11px 14px !important;
        font-size: .9rem !important;
        text-align: center;
    }
    body.zerkalo-mode .analysis-plan-product-row { gap: 10px; margin-bottom: 12px; }
    body.zerkalo-mode .analysis-plan-product-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        font-size: .86rem;
        line-height: 1.35;
    }
    body.zerkalo-mode .analysis-plan-product-qty { min-width: 62px; font-size: .86rem; }
    body.zerkalo-mode #forecast .forecast-data-check { margin-bottom: 24px !important; }
    body.zerkalo-mode #forecast .forecast-decomposition { margin-top: 24px !important; }
    body.zerkalo-mode #forecast .forecast-model-summary,
    body.zerkalo-mode #forecast .forecast-formula-box,
    body.zerkalo-mode #forecast .forecast-guard-block {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-inline: 0 !important;
        box-sizing: border-box !important;
    }
    body.zerkalo-mode #economics-region-chart { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html.zerkalo-theme-switching body.zerkalo-mode,
    html.zerkalo-theme-switching body.zerkalo-mode * { transition-duration: .01ms !important; }
}
/* Zerkalo v39: final responsive and dark-theme QA pass. */
body.zerkalo-mode.zerkalo-dark {
    background-color: #050403 !important;
    background-image: radial-gradient(rgba(225, 189, 125, .16) 1.25px, transparent 1.25px) !important;
    background-size: 19px 19px !important;
    background-attachment: fixed !important;
}
body.zerkalo-mode.zerkalo-dark::before { display: none !important; }

body.zerkalo-mode .app-header {
    gap: 22px;
}
body.zerkalo-mode .header-logo {
    min-width: 0;
    font-size: 1.15rem !important;
    line-height: 1.2;
    white-space: nowrap;
}
body.zerkalo-mode .header-right {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
}
body.zerkalo-mode .desktop-controls {
    align-items: center;
    gap: 10px;
}
body.zerkalo-mode .desktop-controls > select,
body.zerkalo-mode .desktop-controls > button {
    min-height: 42px !important;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    border-radius: 11px;
}
body.zerkalo-mode .desktop-controls > select { display: block; }
body.zerkalo-mode #settings-menu .panel-body {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
body.zerkalo-mode #settings-menu .panel-body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.zerkalo-mode #kpi-overview-toggle {
    overflow: hidden !important;
    border-radius: 20px !important;
    clip-path: inset(0 round 20px);
}
body.zerkalo-mode #kpi-overview-toggle > summary { clip-path: none !important; }
body.zerkalo-mode #kpi-overview-toggle > .zerkalo-collapsible-body {
    border-radius: 0 0 20px 20px !important;
    overflow: hidden;
}

body.zerkalo-mode.zerkalo-dark .pricing-subsidy-card {
    background: #17130d !important;
    border-color: #765a31 !important;
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark .pricing-subsidy-card > div:first-child,
body.zerkalo-mode.zerkalo-dark .pricing-subsidy-card > div:nth-child(2) b,
body.zerkalo-mode.zerkalo-dark #total-subsidy-abs-val {
    color: #e1bd7d !important;
}
body.zerkalo-mode.zerkalo-dark .pricing-subsidy-card > div:nth-child(2) {
    background: rgba(225,189,125,.07) !important;
    border-left-color: #c99d63 !important;
}

body.zerkalo-mode.zerkalo-dark #welcome-modal > .panel,
body.zerkalo-mode.zerkalo-dark #welcome-modal .welcome-section-item {
    background: #0d0c09 !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #welcome-modal .welcome-section-item b,
body.zerkalo-mode.zerkalo-dark #welcome-modal .welcome-section-item p,
body.zerkalo-mode.zerkalo-dark #welcome-modal > .panel > button:first-child {
    color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #welcome-modal .btn-gold {
    background: #c99d63 !important;
    border-color: #e1bd7d !important;
    color: #0a0805 !important;
}

body.zerkalo-mode.zerkalo-dark #athena-loader,
body.zerkalo-mode.zerkalo-dark #athena-ai .loader-overlay {
    background: rgba(5,4,3,.94) !important;
    color: #fff6e5 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="background: #f"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="background:#f"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="background: white"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="background:white"],
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-structured-bullet-box,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-signal-card,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-analysis-card,
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-report-section {
    background: #11100d !important;
    background-image: none !important;
    border-color: #4b3a25 !important;
    color: #f3ead8 !important;
    box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color: #2"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color:#2"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color: #4"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color:#4"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color: #5"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color:#5"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color: #6"],
body.zerkalo-mode.zerkalo-dark #athena-ai [style*="color:#6"],
body.zerkalo-mode.zerkalo-dark #athena-ai p,
body.zerkalo-mode.zerkalo-dark #athena-ai li,
body.zerkalo-mode.zerkalo-dark #athena-ai span:not(.athena-deck-tab) {
    color: #f0e5d1 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai button:not(.athena-deck-tab.active) {
    background: #17130d !important;
    border-color: #6b5532 !important;
    color: #f3ead8 !important;
}

body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler {
    background: #0d0c09 !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color: #2d3748"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color:#2d3748"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color: #4a5568"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color:#4a5568"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color: #455a64"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color:#455a64"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color: #555"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color:#555"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color: #666"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="color:#666"] {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background:var(--blue)"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background: var(--blue)"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background:#455a64"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background: #455a64"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background:#7b1fa2"],
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background: #7b1fa2"] {
    background: #211a10 !important;
    border: 1px solid #765a31 !important;
    color: #fff4df !important;
}
body.zerkalo-mode.zerkalo-dark #forecast .forecast-math-spoiler [style*="background: var(--ivory)"] {
    background: #11100d !important;
    border-color: #765a31 !important;
}

body.zerkalo-mode .tab-content:not(.hidden) > .panel,
body.zerkalo-mode .tab-content:not(.hidden) .zerkalo-composed-tab:not(.hidden) > .panel,
body.zerkalo-mode .tab-content:not(.hidden) [id$="-chart"] canvas {
    animation: zerkaloReveal .42s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes zerkaloReveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

body.zerkalo-mode.zerkalo-dark #expenses-order-details-panel,
body.zerkalo-mode.zerkalo-dark #order-economics-table,
body.zerkalo-mode.zerkalo-dark #order-economics-body .expense-row,
body.zerkalo-mode.zerkalo-dark #order-economics-body .expense-row > td {
    background: #0d0c09 !important;
    color: #f3ead8 !important;
    border-color: #4b3a25 !important;
}
body.zerkalo-mode.zerkalo-dark #order-economics-body .order-item-detail,
body.zerkalo-mode.zerkalo-dark #order-economics-body .order-item-line,
body.zerkalo-mode.zerkalo-dark #order-economics-body [style*="color: #222"],
body.zerkalo-mode.zerkalo-dark #order-economics-body [style*="color: #333"],
body.zerkalo-mode.zerkalo-dark #order-economics-body [style*="color: #555"],
body.zerkalo-mode.zerkalo-dark #order-economics-body [style*="color: #666"] {
    color: #e7dcc5 !important;
}
body.zerkalo-mode.zerkalo-dark #order-economics-body .order-cost-track {
    background: transparent !important;
    border-color: #4b3a25 !important;
}

@media (max-width: 768px) {
    body.zerkalo-mode .app-header {
        height: 68px;
        padding-inline: 12px;
        gap: 10px;
    }
    body.zerkalo-mode .header-logo {
        flex: 1 1 auto;
        font-size: .92rem !important;
        letter-spacing: .7px !important;
        gap: 4px !important;
    }
    body.zerkalo-mode .header-logo .ver-tag { font-size: .58rem; }
    body.zerkalo-mode .header-right { flex: 0 0 auto; gap: 8px !important; }
    body.zerkalo-mode .header-right > #status-dot { display: none !important; }
    body.zerkalo-mode .account-hub-mobile {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 14px;
    }
    body.zerkalo-mode #kpi-overview-toggle { border-radius: 18px !important; clip-path: inset(0 round 18px); }

    body.zerkalo-mode .profit-chart-legend {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        padding: 10px 2px 0 !important;
        gap: 7px !important;
        scrollbar-width: none !important;
    }
    body.zerkalo-mode .profit-legend-row {
        min-width: 0;
        align-items: center;
        gap: 8px;
    }
    body.zerkalo-mode .profit-legend-name {
        min-width: 0;
        white-space: normal !important;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }
    body.zerkalo-mode #economics-chart,
    body.zerkalo-mode #orders-cancel-pie {
        width: 100% !important;
        min-width: 0 !important;
        margin-inline: auto !important;
    }

    body.zerkalo-mode #expenses-order-details-panel {
        margin-top: 22px !important;
        padding: 14px !important;
        border-width: 1.5px !important;
        overflow: visible !important;
    }
    body.zerkalo-mode #expenses-order-details-panel > div:first-child { display: grid !important; }
    body.zerkalo-mode #transaction-search { max-width: none !important; }
    body.zerkalo-mode #expenses-order-details-panel .table-container {
        overflow: visible !important;
        width: 100% !important;
    }
    body.zerkalo-mode #order-economics-table,
    body.zerkalo-mode #order-economics-table tbody,
    body.zerkalo-mode #order-economics-table tr,
    body.zerkalo-mode #order-economics-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    body.zerkalo-mode #order-economics-table thead { display: none !important; }
    body.zerkalo-mode #order-economics-table { border-spacing: 0 !important; }
    body.zerkalo-mode #order-economics-body .expense-row {
        margin-bottom: 14px;
        padding: 13px;
        border: 1.5px solid var(--gold-light);
        border-radius: 16px;
        box-shadow: 0 7px 22px rgba(0,0,0,.06);
        overflow: hidden;
    }
    body.zerkalo-mode #order-economics-body .expense-row > td {
        position: relative;
        padding: 10px 0 !important;
        border-radius: 0 !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(138,122,95,.2) !important;
        overflow-wrap: anywhere;
    }
    body.zerkalo-mode #order-economics-body .expense-row > td:not(.exp-col-1)::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--gold-dark);
        font-size: .67rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
    body.zerkalo-mode #order-economics-body .expense-row > td:last-child { border-bottom: 0 !important; }
    body.zerkalo-mode #order-economics-body .exp-col-4 > div:first-child,
    body.zerkalo-mode #order-economics-body .exp-col-4 > div:first-child span {
        display: block !important;
        width: 100%;
        line-height: 1.4;
    }
    body.zerkalo-mode #order-economics-body .expense-spacer { display: none !important; }
    body.zerkalo-mode #order-economics-body .order-cost-track { height: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
    body.zerkalo-mode .tab-content:not(.hidden) > .panel,
    body.zerkalo-mode .tab-content:not(.hidden) [id$="-chart"] canvas { animation: none !important; }
}

/* Zerkalo v40: live QA refinements. */
body.zerkalo-mode.zerkalo-dark #athena-report-container > div,
body.zerkalo-mode.zerkalo-dark #athena-report-container [style*="opacity: 0.5"],
body.zerkalo-mode.zerkalo-dark #athena-report-container [style*="opacity:0.5"],
body.zerkalo-mode.zerkalo-dark #athena-report-container [style*="opacity: 0.6"],
body.zerkalo-mode.zerkalo-dark #athena-report-container [style*="opacity:0.6"] {
    opacity: 1 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-report-container p,
body.zerkalo-mode.zerkalo-dark #athena-report-container small {
    color: #f0e5d1 !important;
    opacity: .94 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-refresh-btn {
    background: #c99d63 !important;
    border-color: #e1bd7d !important;
    color: #090603 !important;
}
@media (max-width: 768px) {
    body.zerkalo-mode .app-header { height: 68px !important; min-height: 68px !important; }
    body.zerkalo-mode #order-economics-body .expense-row {
        margin-bottom: 14px !important;
        padding: 14px !important;
    }
    body.zerkalo-mode #order-economics-body .expense-row > td {
        width: 100% !important;
        margin: 0 !important;
        font-size: .9rem !important;
        line-height: 1.45 !important;
    }
    body.zerkalo-mode #order-economics-body .order-item-line {
        font-size: .78rem !important;
        line-height: 1.4 !important;
    }
    body.zerkalo-mode #order-economics-body .order-item-detail {
        padding-left: 0 !important;
        font-size: .74rem !important;
        line-height: 1.45 !important;
    }
}

/* Zerkalo v41: keep forecast methodology available on phones. */
@media (max-width: 768px) {
    body.zerkalo-mode #forecast .forecast-math-spoiler {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
    }
    body.zerkalo-mode #forecast .forecast-math-spoiler > div > div[style*="display: flex"],
    body.zerkalo-mode #forecast .forecast-math-spoiler [style*="display: flex; gap: 40px"] {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }
    body.zerkalo-mode #forecast .forecast-math-spoiler [style*="min-width: 350px"],
    body.zerkalo-mode #forecast .forecast-math-spoiler [style*="min-width: 250px"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    body.zerkalo-mode #forecast .forecast-math-spoiler summary {
        padding: 14px 10px !important;
        font-size: .78rem !important;
        line-height: 1.45 !important;
        text-align: center;
    }
}

/* Zerkalo v42: interaction, alignment and cross-theme QA. */
html[data-zerkalo-theme]:not([data-zerkalo-theme="dark"]) {
    background-color: #f7f4ec !important;
    background-image: radial-gradient(rgba(96, 76, 42, .14) 1.3px, transparent 1.3px) !important;
    background-size: 18px 18px !important;
    background-attachment: fixed !important;
}
body.zerkalo-mode .desktop-controls #conn-select {
    height: 42px !important; padding: 0 36px 0 14px !important; line-height: 42px !important;
    text-align: center; text-align-last: center;
}
body.zerkalo-mode #settings-menu .panel-header { position: relative; justify-content: center !important; text-align: center; }
body.zerkalo-mode #settings-menu .panel-header h3 { width: 100%; padding-inline: 76px; text-align: center; }
body.zerkalo-mode #settings-menu .panel-header > button { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
body.zerkalo-mode #settings-menu .panel-body,
body.zerkalo-mode #settings-menu .control-group,
body.zerkalo-mode #settings-menu .account-hub-tools { text-align: center; }
body.zerkalo-mode #settings-menu .control-group { align-items: center; }
body.zerkalo-mode #settings-menu select,
body.zerkalo-mode #settings-menu input { text-align: center; text-align-last: center; }
body.zerkalo-mode #settings-menu .account-hub-action { justify-content: center !important; text-align: center !important; }
@media (min-width: 769px) {
    body.zerkalo-mode #abc-xyz .abc-cell.tooltip-open .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell:hover .abc-cell-tooltip,
    body.zerkalo-mode #abc-xyz .abc-cell:focus-within .abc-cell-tooltip,
    body.zerkalo-mode #forecast .data-card.tooltip-open .ledger-tooltip,
    body.zerkalo-mode #forecast .data-card:hover .ledger-tooltip,
    body.zerkalo-mode #forecast .data-card:focus-within .ledger-tooltip {
        opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
    }
}
body.zerkalo-mode.zerkalo-dark #user-account .admin-kpi-grid { background: transparent !important; }
body.zerkalo-mode.zerkalo-dark #user-account .admin-kpi-box {
    background: #17130d !important; border: 1.5px solid #765a31 !important;
    color: #f3ead8 !important; box-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #user-account .admin-kpi-box small,
body.zerkalo-mode.zerkalo-dark #user-account .admin-kpi-box strong { color: #f3ead8 !important; }
body.zerkalo-mode.zerkalo-dark #user-account .admin-kpi-box strong[style*="var(--blue)"] { color: #e1bd7d !important; }
body.zerkalo-mode.zerkalo-dark #athena-modal .panel,
body.zerkalo-mode.zerkalo-dark #athena-live-status,
body.zerkalo-mode.zerkalo-dark #athena-floating-indicator {
    background: #11100d !important; background-image: none !important;
    border-color: #765a31 !important; color: #fff4df !important;
}
body.zerkalo-mode.zerkalo-dark #athena-live-message,
body.zerkalo-mode.zerkalo-dark #athena-live-percent,
body.zerkalo-mode.zerkalo-dark #athena-floating-indicator * { color: #fff4df !important; }
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-card-stack,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-card-deck,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-deck-panes,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-deck-pane,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-structured-section,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-structured-graph-card,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-graph,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-graph-frame,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-graph-placeholder {
    background: #0d0c09 !important; background-image: none !important;
    border-color: #4b3a25 !important; color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-report-container h2,
body.zerkalo-mode.zerkalo-dark #athena-report-container h3,
body.zerkalo-mode.zerkalo-dark #athena-report-container h4,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-card-deck-title,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-card-stack-label { color: #fff4df !important; }
body.zerkalo-mode.zerkalo-dark #athena-report-container svg,
body.zerkalo-mode.zerkalo-dark #athena-report-container canvas,
body.zerkalo-mode.zerkalo-dark #athena-report-container .main-svg,
body.zerkalo-mode.zerkalo-dark #athena-report-container .svg-container { background: #0d0c09 !important; }
body.zerkalo-mode.zerkalo-dark #athena-report-container svg rect.bg,
body.zerkalo-mode.zerkalo-dark #athena-report-container svg rect[fill="#fff"],
body.zerkalo-mode.zerkalo-dark #athena-report-container svg rect[fill="#ffffff"] { fill: #0d0c09 !important; }
body.zerkalo-mode.zerkalo-dark #athena-report-container svg text { fill: #f3ead8 !important; }
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay,
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-shell,
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-body,
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-stage,
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-canvas {
    background: #070604 !important; color: #f3ead8 !important;
}
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-topbar {
    background: #11100d !important; border-color: #6b5532 !important; color: #fff4df !important;
}
body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-back {
    background: #c99d63 !important; border-color: #e1bd7d !important;
    color: #090603 !important; font-weight: 900;
}
@media (max-width: 768px) {
    body.zerkalo-mode #settings-menu .panel-header h3 { padding-inline: 58px; font-size: .94rem !important; }
    body.zerkalo-mode #settings-menu .panel-header > button { right: 10px; padding-inline: 9px !important; }
    body.zerkalo-mode #expenses-order-details-panel { padding-inline: 9px !important; }
    body.zerkalo-mode #order-economics-body .expense-row { padding-inline: 10px !important; }
    body.zerkalo-mode #order-economics-body .expense-row > td { padding-inline: 0 !important; }
    body.zerkalo-mode.zerkalo-dark #athena-graph-overlay .athena-graph-overlay-back {
        min-width: 76px; min-height: 44px; color: #090603 !important;
    }
}

/* Zerkalo v43: fixed overlays must not inherit transformed containing blocks. */
body.zerkalo-mode #abc-xyz .abc-cell,
body.zerkalo-mode #abc-xyz .abc-cell:hover,
body.zerkalo-mode #abc-xyz .abc-cell:focus,
body.zerkalo-mode #abc-xyz .abc-cell:focus-within,
body.zerkalo-mode #abc-xyz .abc-cell.active,
body.zerkalo-mode #abc-xyz .abc-cell.tooltip-open,
body.zerkalo-mode #forecast .data-card:hover,
body.zerkalo-mode #forecast .data-card:focus-within,
body.zerkalo-mode #forecast .data-card.tooltip-open {
    transform: none !important;
}

/* Zerkalo v44: mobile account header uses two centered rows. */
@media (max-width: 768px) {
    body.zerkalo-mode #settings-menu .panel-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-items: center !important;
        gap: 10px !important;
    }
    body.zerkalo-mode #settings-menu .panel-header h3 {
        width: 100% !important;
        padding-inline: 0 !important;
        text-align: center !important;
    }
    body.zerkalo-mode #settings-menu .panel-header > button {
        position: static !important;
        width: min(160px, 100%) !important;
        min-height: 38px;
        transform: none !important;
    }
}


/* Zerkalo v45: anchored overlays, compact scrolling and paired-order controls. */
body.zerkalo-mode #abc-xyz,
body.zerkalo-mode #abc-xyz .panel,
body.zerkalo-mode #abc-matrix-container { height: auto !important; min-height: 0 !important; overflow: visible !important; }
body.zerkalo-mode #abc-xyz .table-container { max-height: none !important; overflow-x: auto !important; overflow-y: hidden !important; }
@media (min-width: 769px) {
    body.zerkalo-mode #abc-xyz .abc-cell-tooltip {
        position: fixed !important; inset: auto !important; width: min(360px, calc(100vw - 24px)) !important;
        max-height: min(55vh, 360px) !important; transform: none !important; overflow-y: auto !important;
    }
}
body.zerkalo-mode #settings-menu .panel-header {
    display: grid !important; grid-template-columns: 120px minmax(0, 1fr) 120px !important;
    align-items: center !important; gap: 12px !important;
}
body.zerkalo-mode #settings-menu .panel-header h3 { grid-column: 2; width: 100% !important; padding: 0 !important; }
body.zerkalo-mode #settings-menu .panel-header > button {
    grid-column: 3; position: static !important; width: 100% !important; transform: none !important;
}
body.zerkalo-mode #settings-menu .account-hub-action b { font-size: .9rem !important; font-weight: 950 !important; }
body.zerkalo-mode #settings-menu .account-hub-action small { font-weight: 750 !important; }
body.zerkalo-mode .order-tools { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 8px; width: min(100%, 760px); }
body.zerkalo-mode .order-tools #transaction-search { max-width: none !important; }
body.zerkalo-mode .related-orders-toggle { min-height: 42px; font-size: .75rem; background: #3D5C95; }
body.zerkalo-mode .related-orders-toggle.active { background: #2d5a27; }
body.zerkalo-mode .incomplete-orders-toggle { min-height: 42px; font-size: .75rem; background: #7a5330; }
body.zerkalo-mode .incomplete-orders-toggle.active { background: #2d5a27; }
body.zerkalo-mode .related-orders-toggle,
body.zerkalo-mode .incomplete-orders-toggle { white-space: nowrap; padding-inline: 14px; }
body.zerkalo-mode .related-orders-badge {
    display: inline-block; margin-top: 6px; padding: 3px 7px; border-radius: 999px;
    background: #e8dfcf; color: #602A1D; font-size: .65rem; font-weight: 900;
}
body.zerkalo-mode .related-orders-list { margin-top: 5px; color: #6d6459; font-size: .62rem; line-height: 1.35; }
body.zerkalo-mode .related-orders-summary { margin-top: 5px; color: #2d5a27; font-size: .68rem; font-weight: 900; }
html.zerkalo-theme-switching,
html.zerkalo-theme-switching body.zerkalo-mode,
html.zerkalo-theme-switching body.zerkalo-mode .panel,
html.zerkalo-theme-switching body.zerkalo-mode .tab-content,
html.zerkalo-theme-switching body.zerkalo-mode button,
html.zerkalo-theme-switching body.zerkalo-mode input,
html.zerkalo-theme-switching body.zerkalo-mode select,
html.zerkalo-theme-switching body.zerkalo-mode details,
html.zerkalo-theme-switching body.zerkalo-mode summary {
    transition: background-color .5s ease, color .38s ease, border-color .45s ease, box-shadow .45s ease !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-tab,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-deck-tab,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-viz-title {
    background: #21190f !important; border-color: #765a31 !important; color: #fff4df !important; text-shadow: none !important;
}
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-tab *,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-deck-tab *,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-viz-title * { color: inherit !important; }
body.zerkalo-mode.zerkalo-dark #athena-ai .athena-deck-tab.active,
body.zerkalo-mode.zerkalo-dark #athena-report-container .athena-deck-tab.active { background: #c99d63 !important; color: #090603 !important; }
body.zerkalo-mode.zerkalo-dark .related-orders-badge { background: #3a2b1a; color: #f1d7a6; }
body.zerkalo-mode.zerkalo-dark .related-orders-list { color: #cfc3ae; }
body.zerkalo-mode.zerkalo-dark .related-orders-summary { color: #b9d9a8; }
@media (max-width: 768px) {
    body.zerkalo-mode #settings-menu .panel-header { grid-template-columns: minmax(0, 1fr) !important; }
    body.zerkalo-mode #settings-menu .panel-header h3,
    body.zerkalo-mode #settings-menu .panel-header > button { grid-column: 1; }
    body.zerkalo-mode #forecast .ledger-tooltip {
        inset: auto 10px calc(82px + env(safe-area-inset-bottom)) 10px !important;
        width: auto !important; height: auto !important; max-height: min(68vh, 540px) !important;
        transform: none !important; overflow-y: auto !important;
    }
    body.zerkalo-mode #forecast .data-card:hover .ledger-tooltip,
    body.zerkalo-mode #forecast .data-card:focus-within .ledger-tooltip { transform: none !important; }
    body.zerkalo-mode #expenses-order-details-panel,
    body.zerkalo-mode #expenses-order-details-panel .table-container,
    body.zerkalo-mode #order-economics-table,
    body.zerkalo-mode #order-economics-body { width: 100% !important; max-width: 100% !important; }
    body.zerkalo-mode #expenses-order-details-panel { margin-inline: auto !important; padding: 14px 8px !important; }
    body.zerkalo-mode #expenses-order-details-panel > div:first-child { justify-items: center !important; text-align: center; }
    body.zerkalo-mode .order-tools { width: 100%; justify-items: center; grid-template-columns: minmax(0, 1fr); }
    body.zerkalo-mode #transaction-search,
    body.zerkalo-mode .related-orders-toggle,
    body.zerkalo-mode .incomplete-orders-toggle { width: 100% !important; max-width: 100% !important; }
    body.zerkalo-mode .order-tools-status { right: 16px; bottom: 84px; }
    body.zerkalo-mode #order-economics-body .expense-row {
        width: calc(100% - 4px) !important; margin: 0 auto 14px !important; padding: 14px 12px !important;
        box-sizing: border-box !important; text-align: center !important;
    }
    body.zerkalo-mode #order-economics-body .expense-row .exp-col-4 span { font-size: 0.68rem !important; }
    body.zerkalo-mode #order-economics-body .expense-row > td,
    body.zerkalo-mode #order-economics-body .expense-row > td::before,
    body.zerkalo-mode #order-economics-body .order-item-line,
    body.zerkalo-mode #order-economics-body .order-item-detail { text-align: center !important; }
}

@media (max-width: 768px) {
    body.zerkalo-mode #forecast .panel { transform: none !important; }
}

@media (max-width: 768px) {
    body.zerkalo-mode #forecast .data-card.tooltip-open .ledger-tooltip {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }
}

@media (max-width: 768px) {
    body.zerkalo-mode #forecast .data-card.tooltip-open .ledger-tooltip {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    body.zerkalo-mode > .mobile-ledger-tooltip-portal {
        display: block !important;
        position: fixed !important;
        inset: auto 10px calc(82px + env(safe-area-inset-bottom)) 10px !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: min(68vh, 540px) !important;
        margin: 0 !important;
        overflow-y: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        z-index: 100005 !important;
    }
}

body.zerkalo-mode.zerkalo-dark > .mobile-ledger-tooltip-portal,
body.zerkalo-mode.zerkalo-dark > .mobile-ledger-tooltip-portal * {
    color: #f4ead6 !important;
    border-color: #5b452b !important;
}
body.zerkalo-mode.zerkalo-dark > .mobile-ledger-tooltip-portal {
    background: #080705 !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .78) !important;
}
body.zerkalo-mode.zerkalo-dark > .mobile-ledger-tooltip-portal [style*="background"] {
    background: #15120d !important;
}

/* Zerkalo v46: one root scroll, bounded contextual overlays and visible grouping feedback. */
body.zerkalo-mode {
    overflow-x: clip !important;
    overflow-y: visible !important;
}
@media (min-width: 769px) {
    body.zerkalo-mode #abc-xyz .abc-cell.active:not(:hover):not(:focus-within):not(.tooltip-open) .abc-cell-tooltip {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
body.zerkalo-mode .order-tools-status {
    position: fixed; right: 24px; bottom: 24px; z-index: 1400;
    width: min(380px, calc(100vw - 32px)); padding: 11px 14px;
    border: 1px solid rgba(61, 92, 149, .28); border-radius: 12px;
    background: rgba(250, 247, 240, .98); color: #273b62;
    font-size: .84rem; line-height: 1.45; text-align: center;
    box-shadow: 0 14px 38px rgba(31, 39, 55, .2);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
body.zerkalo-mode .order-tools-status.visible { opacity: 1; visibility: visible; transform: translateY(0); }
body.zerkalo-mode .related-order-group { outline: 2px solid rgba(50, 140, 94, .55); outline-offset: -2px; }
body.zerkalo-mode.zerkalo-dark .order-tools-status {
    background: rgba(201, 157, 99, .11); border-color: rgba(201, 157, 99, .42); color: #f1dfbd;
}



/* Admin dark theme: final override for markup and dynamically injected controls. */
body.zerkalo-dark #admin-panel,
body.zerkalo-dark #admin-panel .admin-workspace-shell{color:#f4ead6}
body.zerkalo-dark #admin-panel :is(.admin-template-hero,.admin-template-hero-note,.admin-settings-shell,.admin-settings-card,.admin-athena-tier,.admin-section-block,.admin-dashboard-shell,.admin-overview-card,.admin-filter-panel,.admin-user-card,.admin-content-card,.admin-doc-card,.admin-preview,.panel,.table-container),
body.zerkalo-dark :is(.admin-user-modal,.admin-user-modal-shell .panel,#sub-mgmt-modal .panel,#templates-modal .panel,#backup-modal .panel){
 background:#151411!important;color:#f4ead6!important;border-color:rgba(201,157,99,.3)!important;box-shadow:0 18px 50px rgba(0,0,0,.38)!important
}
body.zerkalo-dark #admin-panel :is(.admin-template-eyebrow,.admin-template-anchorbar a,.admin-anchor-chip){background:#1c1914!important;color:#dfbd84!important;border-color:rgba(201,157,99,.34)!important}
body.zerkalo-dark #admin-panel :is(h2,h3,h4,h5,strong,b,.panel-title,.admin-template-title,.admin-settings-header h3,.admin-settings-card-head h4){color:#f4ead6!important}
body.zerkalo-dark #admin-panel :is(p,span,small,.admin-template-subtitle,.admin-template-hero-note span,.admin-settings-header p,.admin-settings-card-head span,.admin-settings-help),
body.zerkalo-dark .admin-user-modal :is(p,span,small){color:#c9bead!important}
body.zerkalo-dark #admin-panel :is(input,select,textarea),
body.zerkalo-dark .admin-user-modal :is(input,select,textarea),
body.zerkalo-dark :is(#sub-mgmt-modal,#templates-modal,#backup-modal) :is(input,select,textarea){background:#0b0b0a!important;color:#f4ead6!important;border-color:rgba(201,157,99,.38)!important}
body.zerkalo-dark #admin-panel :is(table,thead,tbody,tr,th,td){background:#151411!important;color:#eee4d2!important;border-color:rgba(201,157,99,.22)!important}
body.zerkalo-dark #admin-panel [style*="background:white"],
body.zerkalo-dark #admin-panel [style*="background: white"],
body.zerkalo-dark #admin-panel [style*="background:#fff"],
body.zerkalo-dark #admin-panel [style*="background: #fff"],
body.zerkalo-dark .admin-user-modal [style*="background:#fff"],
body.zerkalo-dark .admin-user-modal [style*="background: #fff"]{background:#171511!important;color:#f4ead6!important}
body.zerkalo-dark #admin-panel [style*="color:#444"],
body.zerkalo-dark #admin-panel [style*="color: #444"],
body.zerkalo-dark #admin-panel [style*="color:#555"],
body.zerkalo-dark #admin-panel [style*="color:#667085"],
body.zerkalo-dark .admin-user-modal [style*="color:#444"],
body.zerkalo-dark .admin-user-modal [style*="color:#555"]{color:#c9bead!important}
body.zerkalo-dark #admin-panel .admin-recovery-note{background:#211c12!important;color:#e3c58f!important;border-color:rgba(201,157,99,.4)!important}
body.zerkalo-dark #admin-panel .admin-progress-track{background:#2a2721!important}
body.zerkalo-dark #admin-panel code{background:#242019!important;color:#e3c58f!important}
body.zerkalo-dark #admin-panel .admin-alert{filter:saturate(.72) brightness(.82);color:#fff!important}
body.zerkalo-dark #admin-panel .admin-alert *{color:inherit!important}
body.zerkalo-dark :is(#sub-mgmt-modal,#templates-modal,#backup-modal,.admin-user-modal-shell){background:rgba(0,0,0,.78)!important;backdrop-filter:blur(10px)}
@media(max-width:720px){body.zerkalo-dark #admin-panel :is(.admin-template-hero,.admin-settings-shell,.admin-section-block){padding:16px!important;border-radius:20px!important}}


/* Keep the spring season readable on the restrained dark palette. */
body.zerkalo-mode.zerkalo-dark #seasons-cards .spring .progress-fill{background:#72c77c!important}
body.zerkalo-mode.zerkalo-dark #seasons-cards .spring :is(.stat-value,[id^="season-spring-"]){color:#8bd694!important}
/* Zerkalo UX round 1: decisions first and compact mobile KPI carousel. */
@media (max-width: 768px) {
    body.zerkalo-mode #demo-banner {
        padding: 15px !important;
        gap: 10px !important;
        border-radius: 16px !important;
    }
    body.zerkalo-mode #demo-banner h3 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
        letter-spacing: .04em !important;
    }
    body.zerkalo-mode #demo-banner p {
        margin-top: 4px !important;
        font-size: .8rem !important;
        line-height: 1.4 !important;
    }
    body.zerkalo-mode #demo-banner > button {
        min-height: 44px !important;
        padding: 10px 14px !important;
        font-size: .78rem !important;
    }
    body.zerkalo-mode #kpi-overview-toggle > .zerkalo-collapsible-body {
        overflow: visible !important;
    }
    body.zerkalo-mode #kpi-area {
        display: grid !important;
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 84vw);
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
        padding: 4px 4px 12px !important;
        margin: 0 !important;
    }
    body.zerkalo-mode #kpi-area .kpi-card {
        min-width: 260px !important;
        width: auto !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}
/* Keep optional dashboard details after the decision path on phones. */
@media (max-width: 768px) {
    body.zerkalo-mode #main-dash .executive-dashboard-grid > details:not(#kpi-overview-toggle) {
        order: 5 !important;
    }
}

body.zerkalo-mode #kpi-overview-toggle[open],
body.zerkalo-mode #kpi-area .kpi-card { overflow: visible !important; }




/* Zerkalo: KPI help stays beside its card without escaping the viewport. */
body.zerkalo-mode #kpi-area .metric-tooltip {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
}
body.zerkalo-mode #kpi-area .kpi-card.tooltip-open .metric-tooltip,
body.zerkalo-mode #kpi-area .kpi-card:focus-within .metric-tooltip {
    opacity: 1;
    visibility: visible;
}
body.zerkalo-mode #kpi-area .metric-tooltip::after { display: none; }

/* Zerkalo: KPI floating layer is not clipped by the mobile carousel. */
body.zerkalo-mode #kpi-area .kpi-card > .metric-tooltip { display: none !important; }
body.zerkalo-mode > .kpi-floating-tooltip {
    display: block !important;
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
    z-index: 200000 !important;
    pointer-events: none;
}
body.zerkalo-mode > .kpi-floating-tooltip.tooltip-open {
    opacity: 1 !important;
    visibility: visible !important;
}
body.zerkalo-mode.zerkalo-dark > .kpi-floating-tooltip {
    background: #11100d !important;
    color: #f4ead8 !important;
    border-color: #c99d63 !important;
}

/* Zerkalo v47: fixed ABC tooltips need an untransformed containing block. */
@media (min-width: 769px) {
    body.zerkalo-mode #abc-xyz .panel {
        animation-name: zerkaloRevealOpacity !important;
    }
}
@keyframes zerkaloRevealOpacity {
    from { opacity: 0; }
    to { opacity: 1; }
}


body.zerkalo-mode #forecast > .forecast-loader-overlay {
    pointer-events: none;
}


/* SKU price guidance */
.price-guidance-panel{overflow:hidden;border:1px solid #d8d0c2;background:#f8f6f1;box-shadow:0 14px 32px rgba(72,53,34,.08)}
.price-guidance-head{display:block;margin-bottom:16px}.price-guidance-head p{max-width:820px;margin:6px 0 0;line-height:1.55;font-weight:700;color:#665f55}.price-guidance-kicker{display:block;color:#8D0E07;text-transform:uppercase;letter-spacing:1.2px;font-size:.72em;font-weight:900;margin-bottom:7px}
.price-guidance-picker{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(360px,1.25fr);align-items:center;gap:20px;padding:18px;border:2px solid #C99D63;border-radius:16px;background:#fff}.price-guidance-picker-label{display:flex;align-items:center;gap:12px;min-width:0}.price-guidance-picker-label>span{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#602A1D;color:#fff;font-weight:950}.price-guidance-picker-label div{min-width:0;display:flex;flex-direction:column;gap:3px}.price-guidance-picker-label strong{font-size:1.02em}.price-guidance-picker-label small{color:#70675d;line-height:1.35}.price-guidance-picker select{width:100%;min-width:0;min-height:54px;padding:0 44px 0 16px;border:2px solid #602A1D;border-radius:12px;background-color:#fff;color:#2f2a24;font-weight:850;font-size:.96em}
.price-guidance-portfolio{display:grid;grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr);gap:14px;margin-top:18px}.price-guidance-portfolio-main{padding:18px;border-radius:15px;background:#602A1D;color:#fff;display:flex;flex-direction:column;justify-content:center;gap:5px}.price-guidance-portfolio-main>span{font-size:.7em;font-weight:900;letter-spacing:.8px;text-transform:uppercase;color:#e8d5b4}.price-guidance-portfolio-main>strong{font-size:2em;line-height:1}.price-guidance-portfolio-main>p{margin:3px 0 0;font-size:.78em;line-height:1.4;color:#f3e8d8}.price-guidance-portfolio-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.price-guidance-portfolio-stats>div{min-width:0;padding:13px 10px;border:1px solid #ddd5c9;border-radius:13px;background:#fff;text-align:center;display:flex;flex-direction:column;justify-content:center;gap:5px}.price-guidance-portfolio-stats span{font-size:.68em;font-weight:900;color:#70675d;text-transform:uppercase}.price-guidance-portfolio-stats strong{overflow-wrap:anywhere}
.price-guidance-selected{margin-top:14px;padding:13px 16px;border-left:4px solid #C99D63;border-radius:10px;background:#efe9df;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px}.price-guidance-selected>span{font-size:.68em;font-weight:900;text-transform:uppercase;color:#6d5b44}.price-guidance-selected>strong{min-width:0;overflow-wrap:anywhere}.price-guidance-selected>small{color:#665f55;font-weight:800}
.price-guidance-metrics{display:grid;grid-template-columns:repeat(5,minmax(135px,1fr));gap:10px;margin-top:14px}.price-guidance-metrics>div{min-width:0;padding:15px 11px;border:1px solid #ddd5c9;border-radius:14px;background:#fff;display:flex;flex-direction:column;justify-content:center;gap:7px;text-align:center}.price-guidance-metrics span{font-size:.7em;font-weight:900;text-transform:uppercase;letter-spacing:.45px;color:#70675d;line-height:1.35}.price-guidance-metrics strong{font-size:1.16em;overflow-wrap:anywhere}.price-guidance-metrics .primary{background:#602A1D;color:#fff;border-color:#602A1D}.price-guidance-metrics .primary span{color:#eadbc7}
.price-guidance-verdict{margin-top:16px;padding:17px 19px;border-radius:14px;background:#fff;border:1px solid #d8d0c2;border-left:5px solid #8D0E07;display:grid;grid-template-columns:minmax(180px,.7fr) minmax(260px,1.3fr);gap:8px 20px;align-items:center;line-height:1.45}.price-guidance-verdict strong{font-size:1.06em;overflow-wrap:anywhere}.price-guidance-verdict span{font-weight:850}.price-guidance-verdict small{grid-column:2;color:#665f55}
.price-guidance-comparison{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.price-guidance-comparison>div{min-width:0;padding:15px;border:1px solid #ddd5c9;border-radius:14px;background:#fff;display:flex;flex-direction:column;gap:6px}.price-guidance-comparison span{font-size:.7em;font-weight:900;text-transform:uppercase;color:#70675d}.price-guidance-comparison strong{font-size:1.18em;overflow-wrap:anywhere}.price-guidance-comparison small{color:#665f55;line-height:1.45}.price-guidance-comparison .recommended{border-color:#C99D63;background:#fbf6ea}.price-guidance-comparison .condition{border-color:#b8c0cf}
.price-guidance-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.price-guidance-step{min-width:0;display:flex;align-items:flex-start;gap:11px;padding:14px;border:1px solid #ddd5c9;border-radius:14px;background:#fff}.price-guidance-step>span{flex:0 0 30px;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#C99D63;color:#2f2117;font-weight:950}.price-guidance-step strong{display:block;margin-bottom:5px;font-size:.86em}.price-guidance-step p{margin:0;font-size:.78em;line-height:1.5;color:#665f55}.price-guidance-equation{margin-top:10px;padding:13px 16px;display:flex;align-items:center;justify-content:center;gap:12px;border-radius:12px;border:1px solid #C99D63;background:#f1ece3;color:#2f2a24;text-align:center;line-height:1.45}.price-guidance-equation span{color:#8D0E07;font-size:.72em;font-weight:950;text-transform:uppercase;letter-spacing:1px}
.price-guidance-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr);gap:18px;margin-top:18px;align-items:stretch}#price-guidance-chart{min-width:0;height:410px;border:1px solid #ddd5c9;border-radius:16px;background-color:#fff}.price-guidance-explain{display:flex;flex-direction:column;gap:12px;min-width:0}.price-guidance-explain h4{margin:0;font-size:.95em}.price-guidance-factors{display:grid;gap:7px}.price-guidance-factors>div{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #ddd5c9;font-size:.82em}.price-guidance-factors span{min-width:0;display:flex;flex-direction:column;gap:3px}.price-guidance-factors span small{color:#70675d;line-height:1.35}.price-guidance-factors>div>strong{flex:0 0 auto;text-align:right;overflow-wrap:anywhere}.price-guidance-note,.price-guidance-empty{margin:14px 0 0;padding:12px 14px;border-radius:11px;background:#f1ece3;color:#602A1D;font-size:.8em;font-weight:750;line-height:1.5}
html[data-theme="dark"] .price-guidance-panel,body.dark-mode .price-guidance-panel{background:#090909;border-color:#37322c;box-shadow:none}html[data-theme="dark"] .price-guidance-head p,body.dark-mode .price-guidance-head p{color:#cfc7bb}html[data-theme="dark"] .price-guidance-picker,body.dark-mode .price-guidance-picker{background:#111;border-color:#8c704d}html[data-theme="dark"] .price-guidance-picker-label small,body.dark-mode .price-guidance-picker-label small{color:#bbb2a5}html[data-theme="dark"] .price-guidance-picker select,body.dark-mode .price-guidance-picker select{background:#080808;color:#f4ead7;border-color:#C99D63}html[data-theme="dark"] .price-guidance-portfolio-main,body.dark-mode .price-guidance-portfolio-main,html[data-theme="dark"] .price-guidance-metrics .primary,body.dark-mode .price-guidance-metrics .primary{background:#1d1812;border-color:#C99D63;color:#fff7e8}
html[data-theme="dark"] .price-guidance-portfolio-stats>div,body.dark-mode .price-guidance-portfolio-stats>div,html[data-theme="dark"] .price-guidance-metrics>div,body.dark-mode .price-guidance-metrics>div,html[data-theme="dark"] .price-guidance-comparison>div,body.dark-mode .price-guidance-comparison>div,html[data-theme="dark"] .price-guidance-step,body.dark-mode .price-guidance-step,html[data-theme="dark"] .price-guidance-factors>div,body.dark-mode .price-guidance-factors>div,html[data-theme="dark"] .price-guidance-verdict,body.dark-mode .price-guidance-verdict{background:#131313;color:#f4ead7;border-color:#3d3933}html[data-theme="dark"] .price-guidance-comparison .recommended,body.dark-mode .price-guidance-comparison .recommended{background:#1b1711;border-color:#C99D63}html[data-theme="dark"] .price-guidance-selected,body.dark-mode .price-guidance-selected{background:#18140f;color:#f4ead7;border-left-color:#C99D63}
html[data-theme="dark"] .price-guidance-selected span,body.dark-mode .price-guidance-selected span,html[data-theme="dark"] .price-guidance-selected small,body.dark-mode .price-guidance-selected small,html[data-theme="dark"] .price-guidance-metrics span,body.dark-mode .price-guidance-metrics span,html[data-theme="dark"] .price-guidance-portfolio-stats span,body.dark-mode .price-guidance-portfolio-stats span,html[data-theme="dark"] .price-guidance-comparison span,body.dark-mode .price-guidance-comparison span,html[data-theme="dark"] .price-guidance-comparison small,body.dark-mode .price-guidance-comparison small,html[data-theme="dark"] .price-guidance-verdict small,body.dark-mode .price-guidance-verdict small,html[data-theme="dark"] .price-guidance-step p,body.dark-mode .price-guidance-step p,html[data-theme="dark"] .price-guidance-factors small,body.dark-mode .price-guidance-factors small{color:#c8bfb2}html[data-theme="dark"] .price-guidance-equation,body.dark-mode .price-guidance-equation{background:#15120e;color:#f4ead7;border-color:#8c704d}html[data-theme="dark"] #price-guidance-chart,body.dark-mode #price-guidance-chart{background-color:#0d0d0d;border-color:#3d3933}html[data-theme="dark"] .price-guidance-note,body.dark-mode .price-guidance-note,html[data-theme="dark"] .price-guidance-empty,body.dark-mode .price-guidance-empty{background:#17130e;color:#e8d5b4}
@media(max-width:1100px){.price-guidance-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.price-guidance-layout{grid-template-columns:1fr}.price-guidance-portfolio{grid-template-columns:1fr}}@media(max-width:900px){.price-guidance-picker{grid-template-columns:1fr;gap:12px}.price-guidance-verdict{grid-template-columns:1fr}.price-guidance-verdict small{grid-column:auto}.price-guidance-comparison,.price-guidance-steps{grid-template-columns:1fr}.price-guidance-selected{grid-template-columns:1fr;gap:4px}}@media(max-width:620px){.price-guidance-panel{padding:17px 13px!important}.price-guidance-picker{padding:14px}.price-guidance-picker-label{align-items:flex-start}.price-guidance-picker select{min-height:56px;font-size:.88em}.price-guidance-portfolio-stats{grid-template-columns:1fr 1fr}.price-guidance-metrics{grid-template-columns:1fr 1fr;gap:8px}.price-guidance-metrics>div{min-height:82px;padding:12px 8px}.price-guidance-metrics .primary{grid-column:1/-1}.price-guidance-verdict{padding:14px}#price-guidance-chart{height:380px}.price-guidance-factors>div{flex-direction:column;gap:5px}.price-guidance-factors>div>strong{text-align:left}.price-guidance-equation{align-items:flex-start;flex-direction:column;text-align:left}}@media(max-width:420px){.price-guidance-metrics{grid-template-columns:1fr}.price-guidance-metrics .primary{grid-column:auto}.price-guidance-portfolio-stats{grid-template-columns:1fr}#price-guidance-chart{height:400px}}

/* Zerkalo price decision hierarchy */
.zerkalo-mode #price-guidance-content>.price-guidance-portfolio{margin-top:0}
.zerkalo-mode #price-guidance-content>.price-guidance-picker{margin-top:22px;clear:both}
.zerkalo-mode .price-guidance-portfolio{position:relative;z-index:1}
.zerkalo-mode .price-guidance-picker{position:relative;z-index:0}
.zerkalo-mode .price-guidance-metrics{grid-template-columns:repeat(3,minmax(150px,1fr))}
.zerkalo-mode .price-guidance-indicator{align-self:center;display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:3px 8px;border-radius:999px;font-size:.66em!important;font-weight:950!important;line-height:1.2;text-transform:none!important;letter-spacing:0!important;white-space:normal;text-align:center}
.zerkalo-mode .price-guidance-indicator.up{color:#1f6b37!important;background:#e7f6eb;border:1px solid #9bc9a8}
.zerkalo-mode .price-guidance-indicator.down{color:#9f2232!important;background:#fdecef;border:1px solid #e8a8b1}
.zerkalo-mode .price-guidance-indicator.neutral{color:#6d5b44!important;background:#f1ece3;border:1px solid #d8d0c2}
.zerkalo-mode.zerkalo-dark .price-guidance-indicator.up{color:#9ee6ad!important;background:#102619;border-color:#356f45}
.zerkalo-mode.zerkalo-dark .price-guidance-indicator.down{color:#ffabb5!important;background:#2b1115;border-color:#7d303a}
.zerkalo-mode.zerkalo-dark .price-guidance-indicator.neutral{color:#e3d2b6!important;background:#211b14;border-color:#66523b}
.zerkalo-mode .price-guidance-step{gap:12px;padding:18px;border:2px solid #C99D63;border-radius:16px;box-shadow:0 8px 18px rgba(72,53,34,.05)}
.zerkalo-mode .price-guidance-step>span{flex-basis:36px;width:36px;height:36px;background:#602A1D;color:#fff}
.zerkalo-mode .price-guidance-step strong{font-size:1.02em;line-height:1.3}
.zerkalo-mode .price-guidance-step p{font-size:.84em;line-height:1.55}
.zerkalo-mode .price-guidance-equation{display:grid;grid-template-columns:auto minmax(0,1fr);justify-content:stretch;text-align:left;padding:17px 18px}
.zerkalo-mode .price-guidance-equation>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.zerkalo-mode .price-guidance-equation strong{font-size:1.06em}
.zerkalo-mode .price-guidance-equation small{color:#665f55;line-height:1.5;font-weight:750}
.zerkalo-mode.zerkalo-dark .price-guidance-step{box-shadow:none}
.zerkalo-mode.zerkalo-dark .price-guidance-step>span{background:#C99D63;color:#090909}
.zerkalo-mode.zerkalo-dark .price-guidance-equation small{color:#d7c6a7}
@media(max-width:900px){.zerkalo-mode .price-guidance-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.zerkalo-mode #price-guidance-content>.price-guidance-picker{margin-top:18px}.zerkalo-mode .price-guidance-picker-label{width:100%}.zerkalo-mode .price-guidance-picker-label small{max-width:100%;overflow-wrap:anywhere}.zerkalo-mode .price-guidance-equation{grid-template-columns:1fr}.zerkalo-mode .price-guidance-equation>span{margin-bottom:2px}}
@media(max-width:420px){.zerkalo-mode .price-guidance-metrics{grid-template-columns:1fr}}
/* Zerkalo dark coverage for the complete price decision module */
.zerkalo-mode.zerkalo-dark .price-guidance-panel{background:#090909;border-color:#34291f;color:#f4ead7}
.zerkalo-mode.zerkalo-dark .price-guidance-head p,.zerkalo-mode.zerkalo-dark .price-guidance-picker-label small,.zerkalo-mode.zerkalo-dark .price-guidance-selected small,.zerkalo-mode.zerkalo-dark .price-guidance-verdict small,.zerkalo-mode.zerkalo-dark .price-guidance-comparison small,.zerkalo-mode.zerkalo-dark .price-guidance-step p,.zerkalo-mode.zerkalo-dark .price-guidance-factors span small{color:#d7c6a7}
.zerkalo-mode.zerkalo-dark .price-guidance-picker,.zerkalo-mode.zerkalo-dark .price-guidance-portfolio-stats>div,.zerkalo-mode.zerkalo-dark .price-guidance-metrics>div,.zerkalo-mode.zerkalo-dark .price-guidance-verdict,.zerkalo-mode.zerkalo-dark .price-guidance-comparison>div,.zerkalo-mode.zerkalo-dark .price-guidance-step,.zerkalo-mode.zerkalo-dark .price-guidance-factors>div,.zerkalo-mode.zerkalo-dark #price-guidance-chart{background:#111;border-color:#3c3025;color:#f4ead7}
.zerkalo-mode.zerkalo-dark .price-guidance-picker{border-color:#C99D63}
.zerkalo-mode.zerkalo-dark .price-guidance-picker select{background:#15110d;border-color:#C99D63;color:#f4ead7;color-scheme:dark}
.zerkalo-mode.zerkalo-dark .price-guidance-portfolio-stats span,.zerkalo-mode.zerkalo-dark .price-guidance-metrics span,.zerkalo-mode.zerkalo-dark .price-guidance-comparison span{color:#d7c6a7}
.zerkalo-mode.zerkalo-dark .price-guidance-selected{background:#17120e;border-color:#C99D63;color:#f4ead7}
.zerkalo-mode.zerkalo-dark .price-guidance-selected>span{color:#C99D63}
.zerkalo-mode.zerkalo-dark .price-guidance-metrics .primary{background:#602A1D;border-color:#C99D63;color:#fff}
.zerkalo-mode.zerkalo-dark .price-guidance-comparison .recommended{background:#21180f;border-color:#C99D63}
.zerkalo-mode.zerkalo-dark .price-guidance-comparison .condition{background:#141414;border-color:#5d6573}
.zerkalo-mode.zerkalo-dark .price-guidance-equation,.zerkalo-mode.zerkalo-dark .price-guidance-note,.zerkalo-mode.zerkalo-dark .price-guidance-empty{background:#17120e;border-color:#C99D63;color:#f4ead7}
/* Price decision evidence and scenario table */
.price-guidance-scenarios{margin-top:14px;border:1px solid #ddd5c9;border-radius:16px;background:#fff;overflow:hidden}
.price-guidance-scenarios-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:16px 18px;background:#f7f2e9;border-bottom:1px solid #e2d9ca}
.price-guidance-scenarios-head span{display:block;color:#8D0E07;font-size:.68em;font-weight:950;text-transform:uppercase;letter-spacing:.08em}
.price-guidance-scenarios-head h4{margin:4px 0 0;font-size:1em;color:#2f2a24}
.price-guidance-scenarios-head p{max-width:480px;margin:0;color:#665f55;font-size:.78em;font-weight:800;line-height:1.45;text-align:right}
.price-guidance-scenario-scroll{overflow-x:auto;overscroll-behavior-inline:contain}
.price-guidance-scenarios table{width:100%;min-width:680px;border-collapse:collapse}
.price-guidance-scenarios th,.price-guidance-scenarios td{padding:12px 14px;border-bottom:1px solid #eee7dc;text-align:right;font-size:.78em;white-space:nowrap}
.price-guidance-scenarios th{background:#fbf8f2;color:#6d6257;font-size:.67em;text-transform:uppercase;letter-spacing:.04em}
.price-guidance-scenarios th:first-child,.price-guidance-scenarios td:first-child{text-align:left;font-weight:900}
.price-guidance-scenarios tbody tr:last-child td{border-bottom:0}
.price-guidance-scenarios td.positive{color:#2d6a3f;font-weight:950}.price-guidance-scenarios td.negative{color:#a32f3e;font-weight:950}
.price-guidance-confidence{margin-top:14px;padding:16px 18px;border:1px solid #ddd5c9;border-radius:16px;background:#fff}
.price-guidance-confidence-head{display:flex;justify-content:space-between;align-items:center;gap:18px}
.price-guidance-confidence-head>div{display:flex;align-items:baseline;gap:10px}.price-guidance-confidence-head span{font-weight:950}.price-guidance-confidence-head strong{font-size:1.5em;color:#8D0E07}.price-guidance-confidence-head p{max-width:520px;margin:0;color:#665f55;font-size:.78em;font-weight:750;line-height:1.45;text-align:right}
.price-guidance-confidence-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}
.price-guidance-confidence-grid>div{min-width:0;padding:11px;border-radius:11px;background:#f7f2e9;border:1px solid #e3d9ca}.price-guidance-confidence-grid span,.price-guidance-confidence-grid strong{display:block}.price-guidance-confidence-grid span{min-height:2.5em;color:#665f55;font-size:.68em;font-weight:850;line-height:1.25}.price-guidance-confidence-grid strong{margin-top:4px;font-size:1.02em}.price-guidance-confidence-grid i{display:block;height:5px;margin-top:8px;border-radius:999px;background:#ddd5c9;overflow:hidden}.price-guidance-confidence-grid i b{display:block;height:100%;border-radius:inherit;background:#C99D63}
.zerkalo-mode.zerkalo-dark .price-guidance-scenarios,.zerkalo-mode.zerkalo-dark .price-guidance-confidence{background:#111;color:#f4ead7;border-color:#3c3025}
.zerkalo-mode.zerkalo-dark .price-guidance-scenarios-head,.zerkalo-mode.zerkalo-dark .price-guidance-scenarios th,.zerkalo-mode.zerkalo-dark .price-guidance-confidence-grid>div{background:#17130f;color:#f4ead7;border-color:#3c3025}
.zerkalo-mode.zerkalo-dark .price-guidance-scenarios-head h4,.zerkalo-mode.zerkalo-dark .price-guidance-confidence-head strong{color:#f4ead7}
.zerkalo-mode.zerkalo-dark .price-guidance-scenarios-head span{color:#F1C03D}
.zerkalo-mode.zerkalo-dark .price-guidance-scenarios-head p,.zerkalo-mode.zerkalo-dark .price-guidance-confidence-head p,.zerkalo-mode.zerkalo-dark .price-guidance-confidence-grid span{color:#d7c6a7}
.zerkalo-mode.zerkalo-dark .price-guidance-scenarios th,.zerkalo-mode.zerkalo-dark .price-guidance-scenarios td{border-color:#302820}.zerkalo-mode.zerkalo-dark .price-guidance-scenarios td.positive{color:#8fd3a3}.zerkalo-mode.zerkalo-dark .price-guidance-scenarios td.negative{color:#ff9eaa}
.zerkalo-mode.zerkalo-dark .price-guidance-confidence-grid i{background:#302820}.zerkalo-mode.zerkalo-dark .price-guidance-confidence-grid i b{background:#C99D63}
@media(max-width:760px){.price-guidance-scenarios-head,.price-guidance-confidence-head{flex-direction:column;align-items:flex-start}.price-guidance-scenarios-head p,.price-guidance-confidence-head p{text-align:left;max-width:none}.price-guidance-confidence-grid{grid-template-columns:1fr 1fr}.price-guidance-scenario-scroll{padding-bottom:4px}}
@media(max-width:420px){.price-guidance-confidence-grid{grid-template-columns:1fr}.price-guidance-scenarios{border-radius:14px}.price-guidance-scenarios-head,.price-guidance-confidence{padding:14px}.price-guidance-scenarios table{min-width:620px}}
.price-guidance-bridge{margin-top:14px;padding:16px 18px;border:1px solid #ddd5c9;border-radius:16px;background:#fff}
.price-guidance-bridge-head span{display:block;color:#8D0E07;font-size:.68em;font-weight:950;text-transform:uppercase;letter-spacing:.08em}.price-guidance-bridge-head h4{margin:4px 0 0;color:#2f2a24;font-size:1em}
.price-guidance-bridge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.price-guidance-bridge-grid>div{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 12px;border-radius:11px;background:#f7f2e9;border:1px solid #e3d9ca}.price-guidance-bridge-grid span{color:#665f55;font-size:.72em;font-weight:800}.price-guidance-bridge-grid strong{font-size:.86em;white-space:nowrap}.price-guidance-bridge-grid .positive strong{color:#2d6a3f}.price-guidance-bridge-grid .negative strong{color:#a32f3e}.price-guidance-bridge-grid .result{grid-column:span 2;background:#eee5d5;border-color:#c99d63}.price-guidance-bridge-grid .result strong{font-size:1.04em}
.price-guidance-reconciliation{margin:12px 0 0;padding:9px 11px;border-radius:10px;font-size:.75em;font-weight:800;line-height:1.45}.price-guidance-reconciliation.ok{color:#285c38;background:#e9f4eb}.price-guidance-reconciliation.alert{color:#8D0E07;background:#f8e6e3}
.price-guidance-confidence-head.demand{margin-top:12px;padding-top:12px;border-top:1px solid #e3d9ca}
.zerkalo-mode.zerkalo-dark .price-guidance-bridge{background:#111;color:#f4ead7;border-color:#3c3025}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-head h4{color:#f4ead7}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-head span{color:#F1C03D}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-grid>div{background:#17130f;border-color:#3c3025}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-grid span{color:#d7c6a7}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-grid .positive strong{color:#8fd3a3}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-grid .negative strong{color:#ff9eaa}.zerkalo-mode.zerkalo-dark .price-guidance-bridge-grid .result{background:#211a13;border-color:#80633e}.zerkalo-mode.zerkalo-dark .price-guidance-reconciliation.ok{color:#b8e7c4;background:#15251a}.zerkalo-mode.zerkalo-dark .price-guidance-reconciliation.alert{color:#ffb1b9;background:#2b1719}.zerkalo-mode.zerkalo-dark .price-guidance-confidence-head.demand{border-color:#3c3025}
@media(max-width:760px){.price-guidance-bridge-grid{grid-template-columns:1fr 1fr}.price-guidance-bridge-grid .result{grid-column:span 2}}
@media(max-width:420px){.price-guidance-bridge{padding:14px}.price-guidance-bridge-grid{grid-template-columns:1fr}.price-guidance-bridge-grid .result{grid-column:auto}.price-guidance-bridge-grid>div{min-width:0}.price-guidance-bridge-grid span{overflow-wrap:anywhere}.price-guidance-bridge-grid strong{flex:0 0 auto}}