/* ═══════════════════════════════════════════════
   VOICE AI PRICING CALCULATOR — STYLESHEET v2
   Dark-mode dashboard with glassmorphism + docs tab
   ═══════════════════════════════════════════════ */

/* ── 1. CSS Variables ── */
:root {
    --bg:           #060811;
    --bg-card:      rgba(12, 15, 30, 0.65);
    --bg-input:     rgba(0, 0, 0, 0.35);
    --border:       rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);
    --indigo:       #6366f1;
    --purple:       #a78bfa;
    --emerald:      #10b981;
    --green:        #22c55e;
    --amber:        #f59e0b;
    --rose:         #f43f5e;
    --text-1:       #f1f5f9;
    --text-2:       #94a3b8;
    --text-3:       #64748b;
    --text-4:       #475569;
    --font:         'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono:         'JetBrains Mono', ui-monospace, monospace;
    --radius:       14px;
    --radius-sm:    8px;
}

/* ── 2. Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--indigo) var(--bg); }
body { font-family: var(--font); background: var(--bg); color: var(--text-1); min-height: 100vh; overflow-x: hidden; line-height: 1.5; }
body::before, body::after { content: ''; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
body::before { width: 600px; height: 600px; top: -220px; left: -120px; background: radial-gradient(circle, var(--indigo) 0%, transparent 70%); opacity: 0.08; }
body::after  { width: 500px; height: 500px; bottom: -180px; right: -100px; background: radial-gradient(circle, var(--emerald) 0%, transparent 70%); opacity: 0.06; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ── 3. Header ── */
.app-header { position: sticky; top: 0; z-index: 50; background: rgba(6, 8, 17, 0.85); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1440px; margin: 0 auto; padding: 1.1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 0.9rem; }
.logo-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--indigo), #818cf8); border-radius: 10px; font-size: 1.15rem; color: #fff; box-shadow: 0 0 18px rgba(99, 102, 241, 0.35); flex-shrink: 0; }
.app-header h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tagline { color: var(--text-3); font-size: 0.78rem; margin-top: 0.1rem; }

/* ── 4. Tab Navigation ── */
.tab-nav { background: rgba(6, 8, 17, 0.7); border-bottom: 1px solid var(--border); position: sticky; top: 64px; z-index: 45; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tab-nav-inner { max-width: 1440px; margin: 0 auto; padding: 0 2rem; display: flex; gap: 0.25rem; }
.tab-btn { background: transparent; border: none; color: var(--text-3); padding: 0.85rem 1.25rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; display: flex; align-items: center; gap: 0.4rem; }
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { color: var(--text-1); border-bottom-color: var(--indigo); }
.tab-content { display: none; }
.tab-content.active { display: grid; }

/* ── 5. Dashboard Layout ── */
.dashboard { max-width: 1440px; margin: 0 auto; padding: 2rem; grid-template-columns: 1fr; gap: 2rem; position: relative; z-index: 1; }
@media (min-width: 1080px) {
    .dashboard { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
    .col-results { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow-y: auto; scrollbar-width: thin; }
}
.col-controls, .col-results { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── 6. Cards ── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color 0.25s ease; }
.card:hover { border-color: var(--border-hover); }
.card-compact { padding: 1.25rem 1.5rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--border); }
.card-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; font-weight: 700; }
.ic { font-size: 1rem; }
.ic-indigo { color: var(--indigo); }
.ic-green { color: var(--green); }
.ic-purple { color: var(--purple); }
.ic-emerald { color: var(--emerald); }
.ic-amber { color: var(--amber); }

/* ── 7. Tooltips ── */
.tip { position: relative; cursor: help; color: var(--text-4); font-size: 0.85rem; transition: color 0.2s; }
.tip:hover { color: var(--text-2); }
.tip::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 0.7rem 0.85rem; background: #1e293b; border: 1px solid var(--border-hover); border-radius: var(--radius-sm); color: var(--text-2); font-size: 0.72rem; font-weight: 400; line-height: 1.45; z-index: 60; box-shadow: 0 12px 28px -4px rgba(0,0,0,0.6); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s, visibility 0.2s; }
.tip:hover::after { opacity: 1; visibility: visible; }

/* ── 8. Sliders ── */
.ctrl { margin-bottom: 1.1rem; }
.ctrl:last-child { margin-bottom: 0; }
.ctrl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; font-size: 0.82rem; font-weight: 500; color: var(--text-2); }
.badge { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--emerald); background: rgba(16, 185, 129, 0.12); padding: 0.15rem 0.55rem; border-radius: 5px; }
.badge-amber { color: var(--amber); background: rgba(245, 158, 11, 0.12); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); outline: none; cursor: pointer; margin: 0.35rem 0 0.2rem; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--indigo); box-shadow: 0 0 8px rgba(99, 102, 241, 0.45); cursor: grab; transition: transform 0.12s, box-shadow 0.2s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); box-shadow: 0 0 14px rgba(99, 102, 241, 0.6); }
input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--indigo); box-shadow: 0 0 8px rgba(99, 102, 241, 0.45); cursor: grab; }
.range-edge { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--text-4); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── 9. Editable Badge Inputs ── */
.badge-edit { display: flex; align-items: center; gap: 0.25rem; }
.badge-input {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.18rem 0.35rem;
    border-radius: 5px;
    width: 72px;
    text-align: right;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}
.badge-input::-webkit-inner-spin-button,
.badge-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.badge-input:focus { border-color: var(--emerald); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15); }
.badge-suffix { font-size: 0.65rem; color: var(--text-4); font-weight: 500; }

/* ── 10. Number Inputs ── */
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.75rem; font-weight: 500; color: var(--text-3); }
.field .unit { color: var(--text-4); font-weight: 400; }
.num-input { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-1); padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); font-family: var(--mono); font-size: 0.82rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.num-input:focus { border-color: var(--indigo); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
.field-row, .pricing-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.pricing-row { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) { .pricing-row { grid-template-columns: 1fr; } }
.hint { font-size: 0.7rem; color: var(--text-4); margin-top: 0.35rem; display: flex; align-items: center; gap: 0.35rem; line-height: 1.35; }

/* ── 11. Pill Toggle ── */
.pill-group { display: flex; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 1rem; }
.pill { flex: 1; background: transparent; border: none; color: var(--text-3); padding: 0.45rem 0.5rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.pill:hover { color: var(--text-2); }
.pill.active { background: var(--indigo); color: #fff; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35); }

/* ── 12. Toggle Switch ── */
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; background: rgba(255, 255, 255, 0.015); border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 10px; margin-bottom: 0.75rem; }
.toggle-text { display: flex; flex-direction: column; gap: 0.1rem; }
.toggle-title { font-size: 0.82rem; font-weight: 600; color: var(--text-1); }
.toggle-desc { font-size: 0.68rem; color: var(--text-4); }
.switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.1); border-radius: 22px; cursor: pointer; transition: background 0.3s; }
.switch-track::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.25s; }
.switch input:checked + .switch-track { background: var(--emerald); }
.switch input:checked + .switch-track::before { transform: translateX(20px); }

/* ── 13. Sub-config ── */
.sub-config { padding: 1rem; margin-top: 0.25rem; border-top: 1px dashed rgba(255,255,255,0.06); }
.hidden { display: none !important; }
.tool-total-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    margin-top: 0.85rem;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    color: var(--text-2);
    font-weight: 500;
}
.tool-total-bar i { color: var(--amber); font-size: 0.8rem; }
.tool-total-bar strong { color: var(--amber); font-family: var(--mono); }

/* ── 14. Preset Bar ── */
.preset-bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.preset-label { font-size: 0.78rem; font-weight: 600; color: var(--text-3); display: flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.preset-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.preset-btn { background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-3); padding: 0.45rem 0.85rem; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.preset-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-1); }
.preset-btn.active { background: rgba(99, 102, 241, 0.15); border-color: var(--indigo); color: var(--text-1); box-shadow: 0 0 12px rgba(99, 102, 241, 0.12); }

/* ── 15. KPI Grid ── */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.kpi { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem 1.15rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; overflow: hidden; backdrop-filter: blur(10px); }
.kpi::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; }
.kpi-indigo::before  { background: linear-gradient(90deg, var(--indigo), #818cf8); }
.kpi-emerald::before { background: linear-gradient(90deg, var(--emerald), #34d399); }
.kpi-amber::before   { background: linear-gradient(90deg, var(--amber), #fbbf24); }
.kpi-rose::before    { background: linear-gradient(90deg, var(--rose), #fb7185); }
.kpi-icon { font-size: 0.95rem; margin-bottom: 0.15rem; color: var(--text-4); }
.kpi-indigo .kpi-icon  { color: var(--indigo); }
.kpi-emerald .kpi-icon { color: var(--emerald); }
.kpi-amber .kpi-icon   { color: var(--amber); }
.kpi-rose .kpi-icon    { color: var(--rose); }
.kpi-label { font-size: 0.68rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-family: var(--mono); font-size: 1.65rem; font-weight: 800; color: var(--text-1); letter-spacing: -0.02em; margin: 0.1rem 0; }
.kpi-sub { font-size: 0.68rem; color: var(--text-4); }

/* ── 16. Context Summary Bar ── */
.context-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    color: var(--text-2);
    font-weight: 500;
}
.context-summary i { color: var(--indigo); font-size: 0.85rem; }

/* ── 17. Breakdown ── */
.breakdown-layout { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 640px) { .breakdown-layout { flex-direction: row; align-items: center; } }
.chart-wrap { position: relative; flex-shrink: 0; }
.pie-wrap { width: 180px; height: 180px; margin: 0 auto; }
@media (min-width: 640px) { .pie-wrap { margin: 0; } }
.line-wrap { width: 100%; height: 260px; }
.breakdown-table { flex: 1; width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.breakdown-table th { text-align: left; color: var(--text-4); font-weight: 600; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--border); }
.breakdown-table th.r, .breakdown-table td.r { text-align: right; }
.breakdown-table td { padding: 0.7rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-2); }
.breakdown-table tr:last-child td { border-bottom: none; }
.breakdown-table tfoot td { padding: 0.7rem 0.4rem; }
.breakdown-table .tfoot-total td { border-top: 1.5px solid var(--accent); font-weight: 700; color: #f1f5f9; font-size: 0.82rem; letter-spacing: 0.01em; }
.breakdown-table .tfoot-permin td { color: var(--accent); font-weight: 600; font-size: 0.76rem; border-bottom: none; }
.mono { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; }

/* ═══════════════════════════════════
   DOCUMENTATION TAB
   ═══════════════════════════════════ */
.docs-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}
.docs-page.active { display: block !important; }
.docs-container { display: flex; flex-direction: column; gap: 1.5rem; }

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.25s;
}
.doc-card:hover { border-color: var(--border-hover); }
.doc-card h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.55rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.doc-card h3 { font-size: 0.92rem; font-weight: 700; color: var(--text-1); margin: 1.25rem 0 0.5rem; }
.doc-card p { color: var(--text-2); font-size: 0.85rem; line-height: 1.7; margin-bottom: 0.75rem; }
.doc-card p:last-child { margin-bottom: 0; }
.doc-card strong { color: var(--text-1); }
.doc-card em { color: var(--purple); font-style: italic; }
.doc-card code { font-family: var(--mono); font-size: 0.8rem; color: var(--amber); background: rgba(245, 158, 11, 0.1); padding: 0.1rem 0.4rem; border-radius: 4px; }
.doc-card ul { color: var(--text-2); font-size: 0.85rem; line-height: 1.7; margin: 0.5rem 0; padding-left: 1.25rem; }
.doc-card li { margin-bottom: 0.35rem; }

/* Pipeline Flow */
.pipeline-flow { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 1.5rem 0; flex-wrap: wrap; }
.pipe-step { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1rem 0.75rem; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; min-width: 160px; text-align: center; }
.pipe-step strong { font-size: 0.82rem; color: var(--text-1); }
.pipe-step span { font-size: 0.7rem; color: var(--text-3); max-width: 150px; }
.pipe-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff; }
.bg-green { background: linear-gradient(135deg, var(--green), var(--emerald)); }
.bg-purple { background: linear-gradient(135deg, var(--indigo), var(--purple)); }
.bg-emerald { background: linear-gradient(135deg, var(--emerald), #34d399); }
.pipe-arrow { color: var(--text-4); font-size: 0.85rem; }

/* Formula Box */
.formula-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-left: 3px solid var(--indigo);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.25rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-2);
    margin: 0.75rem 0;
    overflow-x: auto;
}
.formula-box strong { color: var(--amber); }

/* Callout Boxes */
.callout {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    font-size: 0.8rem;
    line-height: 1.6;
}
.callout i { font-size: 0.95rem; margin-top: 0.15rem; flex-shrink: 0; }
.callout-warning { background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15); }
.callout-warning i { color: var(--amber); }
.callout-info { background: rgba(99, 102, 241, 0.06); border: 1px solid rgba(99, 102, 241, 0.15); }
.callout-info i { color: var(--indigo); }

/* Data Tables in Docs */
.example-table { margin: 0.75rem 0; overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.doc-table th { text-align: left; color: var(--text-3); font-weight: 600; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.doc-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-2); }
.doc-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-note { font-size: 0.68rem; color: var(--text-4); margin-top: 0.4rem; font-style: italic; }
.ref-table td:first-child { min-width: 130px; }

/* Rate Comparison */
.rate-comparison { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 1.25rem 0; flex-wrap: wrap; }
.rate-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem 1.25rem; text-align: center; display: flex; flex-direction: column; gap: 0.25rem; }
.rate-label { font-size: 0.68rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.rate-value { font-family: var(--mono); font-size: 1.2rem; font-weight: 800; color: var(--text-1); }
.rate-value small { font-size: 0.6rem; color: var(--text-3); font-weight: 500; }
.rate-cached { border-color: rgba(16, 185, 129, 0.25); background: rgba(16, 185, 129, 0.06); }
.rate-cached .rate-value { color: var(--emerald); }
.rate-arrow { color: var(--text-4); }
.rate-savings { font-size: 0.78rem; font-weight: 700; color: var(--emerald); background: rgba(16, 185, 129, 0.12); padding: 0.25rem 0.7rem; border-radius: 5px; }

/* Tool Call Diagram */
.two-calls { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.call-box { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; }
.call-box p { margin-bottom: 0.25rem; font-size: 0.8rem; }
.call-num { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; color: var(--indigo); background: rgba(99, 102, 241, 0.12); padding: 0.15rem 0.55rem; border-radius: 4px; display: inline-block; margin-bottom: 0.5rem; }
.call-connector { text-align: center; color: var(--text-4); font-size: 0.75rem; font-weight: 500; padding: 0.35rem; }
.call-connector i { margin-right: 0.35rem; }

/* STT Model Cards */
.stt-model-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; padding: 1.15rem; }
.stt-model-card h3 { margin-top: 0 !important; }

/* Result Box (Worked Example) */
.example-params { font-size: 0.78rem !important; color: var(--text-3) !important; background: rgba(255,255,255,0.02); padding: 0.75rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 1rem !important; }
.result-box { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0; margin: 0.75rem 0; }
.result-row { display: flex; justify-content: space-between; padding: 0.5rem 1.15rem; font-size: 0.8rem; color: var(--text-2); }
.result-row span:last-child { font-family: var(--mono); font-weight: 600; }
.result-total { border-top: 1px solid var(--border); margin-top: 0.25rem; padding-top: 0.75rem; font-weight: 700; }
.result-total span { color: var(--text-1) !important; font-size: 0.9rem; }
.result-permin span { color: var(--emerald) !important; font-weight: 600; }

/* ── 18. Responsive ── */
@media (max-width: 1079px) {
    .dashboard { padding: 1.25rem; }
    .header-inner { padding: 0.85rem 1.25rem; }
    .app-header h1 { font-size: 1.15rem; }
    .tab-nav { top: 56px; }
    .col-results { top: 100px; }
}
@media (max-width: 640px) {
    html { font-size: 14px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
    .kpi { padding: 1rem 0.75rem; }
    .kpi-value { font-size: 1.3rem; }
    .row-2 { grid-template-columns: 1fr; }
    .header-inner { padding: 0.75rem 1rem; }
    .card { padding: 1.15rem; }
    .doc-card { padding: 1.25rem; }
    .docs-page { padding: 1.25rem; }
    .pipeline-flow { flex-direction: column; }
    .pipe-arrow { transform: rotate(90deg); }
}
@media (max-width: 380px) {
    .kpi-grid { grid-template-columns: 1fr; }
}
