/* ═══════════════════════════════════════════════════════════════════
   Leap Metrics – Global Stylesheet
   Design System: Inter font · Slate palette · CSS Grid responsive
═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────────────────── */
:root {
    --font:        'Inter', system-ui, sans-serif;

    /* Brand */
    --primary:     #3B82F6;
    --primary-dim: rgba(59,130,246,.12);

    /* Semantic */
    --green:  #10B981;
    --amber:  #F59E0B;
    --red:    #EF4444;

    /* Surfaces (Light mode) */
    --bg:          #F1F5F9;
    --surface:     #FFFFFF;
    --surface-2:   #F8FAFC;
    --border:      rgba(0,0,0,.06);

    /* Text */
    --text-1:  #0F172A;
    --text-2:  #475569;
    --text-3:  #94A3B8;

    /* Sidebar */
    --sidebar-w:    240px;
    --sidebar-w-sm: 64px;
    --topbar-bg:    #0F172A;
    --topbar-text:  #CBD5E1;
    --mobile-bar-h: 56px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.12);

    /* Radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;

    /* Animation */
    --ease: cubic-bezier(.25,.8,.25,1);
}

/* Dark mode: JS always sets data-theme from localStorage or system preference */
[data-theme="dark"] {
    --bg:        #0F172A;
    --surface:   #1E293B;
    --surface-2: #273549;
    --border:    rgba(255,255,255,.06);
    --text-1:    #F1F5F9;
    --text-2:    #94A3B8;
    --text-3:    #64748B;
    --topbar-bg: #020617;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text-1); min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select { font-family: var(--font); }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--topbar-bg);
    display: flex; flex-direction: column;
    z-index: 100;
    overflow: hidden;
    transition: width .25s var(--ease);
    border-right: 1px solid rgba(255,255,255,.05);
}
html.sidebar-collapsed .sidebar { width: var(--sidebar-w-sm); }

/* Brand row */
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 16px; min-height: 64px; flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo-icon {
    font-size: 1.25rem; color: var(--primary);
    background: var(--primary-dim); border-radius: 8px;
    padding: 5px; flex-shrink: 0;
}
.sidebar-brand-name {
    font-size: .9rem; font-weight: 800; color: #F1F5F9;
    white-space: nowrap;
    opacity: 1; transition: opacity .12s var(--ease);
}
html.sidebar-collapsed .sidebar-brand-name { opacity: 0; pointer-events: none; }

/* Scrollable nav area */
.sidebar-nav {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.sidebar-section { margin-bottom: 4px; }
.sidebar-section-label {
    display: block; padding: 10px 20px 4px;
    font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em;
    color: rgba(255,255,255,.28);
    white-space: nowrap;
    opacity: 1; transition: opacity .1s var(--ease);
}
html.sidebar-collapsed .sidebar-section-label { opacity: 0; }

/* Nav links */
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 14px;
    margin: 1px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,.58);
    font-size: .875rem; font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background .14s var(--ease), color .14s var(--ease);
    text-decoration: none;
    min-width: 0;
    border: none; background: none;
    text-align: left; width: calc(100% - 16px);
    font-family: var(--font);
}
.sidebar-link .material-symbols-rounded {
    font-size: 1.1rem; flex-shrink: 0; width: 22px; text-align: center;
}
.sidebar-link-label {
    overflow: hidden; text-overflow: ellipsis;
    opacity: 1; transition: opacity .1s var(--ease);
}
html.sidebar-collapsed .sidebar-link-label { opacity: 0; }
.sidebar-link:hover { background: rgba(255,255,255,.07); color: #F1F5F9; }
.sidebar-link.active { background: rgba(59,130,246,.18); color: var(--primary); }
.sidebar-link.active .material-symbols-rounded { color: var(--primary); }

/* Bottom section */
.sidebar-bottom {
    flex-shrink: 0; padding: 4px 0 8px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 14px; margin: 1px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,.38);
    font-size: .8rem; white-space: nowrap;
}
.sidebar-user .material-symbols-rounded {
    font-size: 1.1rem; flex-shrink: 0; width: 22px; text-align: center;
}
.sidebar-logout { color: rgba(239,68,68,.75) !important; }
.sidebar-logout:hover { background: rgba(239,68,68,.12) !important; color: var(--red) !important; }

/* Collapse button */
.sidebar-collapse-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 14px; margin: 1px 8px;
    border-radius: 8px; width: calc(100% - 16px);
    background: none; border: none;
    color: rgba(255,255,255,.4);
    font-size: .875rem; font-weight: 500; font-family: var(--font);
    cursor: pointer; white-space: nowrap;
    transition: background .14s, color .14s;
    text-align: left;
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,.07); color: #F1F5F9; }
.sidebar-collapse-btn .collapse-icon {
    font-size: 1.1rem; flex-shrink: 0; width: 22px; text-align: center;
    transition: transform .25s var(--ease);
}
html.sidebar-collapsed .sidebar-collapse-btn .collapse-icon { transform: rotate(180deg); }
.sidebar-collapse-btn .sidebar-link-label { opacity: 1; transition: opacity .1s var(--ease); }
html.sidebar-collapsed .sidebar-collapse-btn .sidebar-link-label { opacity: 0; }

/* ── Mobile: thin topbar + overlay ──────────────────────────────── */
.mobile-topbar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 101;
    height: var(--mobile-bar-h);
    background: var(--topbar-bg);
    align-items: center; gap: 12px;
    padding: 0 16px;
    box-shadow: var(--shadow-md);
}
.mobile-topbar-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 800; color: #F1F5F9;
}
.hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--r-sm);
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.7);
    transition: background .14s var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,.08); }

.sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 99;
    background: rgba(0,0,0,.5);
}
.sidebar-overlay.open { display: block; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-topbar { display: flex; }
    .sidebar {
        width: var(--sidebar-w) !important;
        transform: translateX(-100%);
        transition: transform .25s var(--ease);
        z-index: 200;
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .sidebar-collapse-btn { display: none; }
}

/* ── Main Content ─────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    padding: 28px 32px;
    transition: margin-left .25s var(--ease);
}
html.sidebar-collapsed .main-content { margin-left: var(--sidebar-w-sm); }
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding: calc(var(--mobile-bar-h) + 20px) 16px 24px;
    }
}

/* ── Page Header ──────────────────────────────────────────────────── */
.page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    margin-bottom: 24px;
}
.page-title    { font-size: 1.5rem; font-weight: 800; color: var(--text-1); }
.page-subtitle { font-size: .85rem; color: var(--text-3); margin-top: 2px; }

/* ── Filters Bar ──────────────────────────────────────────────────── */
.filters-bar {
    display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: .75rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }

.filter-select {
    height: 38px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text-1);
    font-size: .875rem; cursor: pointer;
    transition: border-color .15s var(--ease);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* Multi-select dropdown */
.multiselect-wrapper { position: relative; }
.multiselect-btn {
    display: flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text-1);
    font-size: .875rem; min-width: 180px;
    transition: border-color .15s var(--ease);
}
.multiselect-btn:hover, .multiselect-btn:focus { border-color: var(--primary); outline: none; }
.multiselect-btn .material-symbols-rounded { margin-left: auto; font-size: 1rem; color: var(--text-3); }

.multiselect-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
    z-index: 50; max-height: 220px; overflow-y: auto;
    padding: 6px;
}
.multiselect-dropdown.hidden { display: none; }
.multiselect-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 6px;
    font-size: .875rem; cursor: pointer;
    transition: background .1s;
}
.multiselect-option:hover { background: var(--surface-2); }
.multiselect-option input[type="checkbox"] { accent-color: var(--primary); width: 14px; height: 14px; }

.btn-refresh {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--r-sm);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-2);
    transition: background .15s, color .15s, border-color .15s;
    align-self: flex-end;
}
.btn-refresh:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── KPI Cards Grid ───────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 1023px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px)  { .cards-grid { grid-template-columns: 1fr; } }

/* ── KPI Card ─────────────────────────────────────────────────────── */
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: card-in .35s var(--ease) both;
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.kpi-card-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 12px;
}
.kpi-card-name {
    font-size: .72rem; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .06em;
    line-height: 1.3;
    max-width: calc(100% - 48px);
}
.kpi-icon-badge {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; flex-shrink: 0;
    background: var(--primary-dim); border-radius: var(--r-sm);
    color: var(--primary);
}
.kpi-icon-badge .material-symbols-rounded { font-size: 1.1rem; }

.kpi-value {
    font-size: 2.1rem; font-weight: 800;
    letter-spacing: -1.5px; line-height: 1;
    color: var(--text-1); margin-bottom: 8px;
}

.kpi-badges {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 16px;
}
.badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 999px;
    font-size: .78rem; font-weight: 600;
}
.badge .material-symbols-rounded { font-size: .85rem; }
.badge-green { background: rgba(16,185,129,.12); color: var(--green); }
.badge-amber { background: rgba(245,158,11,.12); color: var(--amber); }
.badge-red   { background: rgba(239,68,68,.12);  color: var(--red);   }
.badge-gray  { background: rgba(148,163,184,.12); color: var(--text-3); }

/* Progress bar */
.progress-labels {
    display: flex; justify-content: space-between;
    margin-bottom: 5px;
}
.progress-label { font-size: .72rem; font-weight: 500; color: var(--text-3); }
.progress-track {
    width: 100%; height: 5px;
    background: var(--border); border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: 999px;
    transition: width .6s var(--ease);
}
.prog-green { background: var(--green); }
.prog-amber { background: var(--amber); }
.prog-red   { background: var(--red);   }

/* ── Loading / Error States ───────────────────────────────────────── */
.loading-state, .error-state {
    grid-column: 1 / -1;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px;
    padding: 60px 20px;
    color: var(--text-3); font-size: .95rem;
}
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.modal-overlay.hidden { display: none; }

.modal {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 28px;
    width: 100%; max-width: 680px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modal-in .22s var(--ease);
}
@keyframes modal-in {
    from { opacity: 0; transform: scale(.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 20px; gap: 12px;
}
.modal-title   { font-size: 1.2rem; font-weight: 800; }
.modal-subtitle { font-size: .8rem; color: var(--text-3); margin-top: 2px; }
.modal-close {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--surface-2); color: var(--text-2);
    flex-shrink: 0;
    transition: background .15s;
}
.modal-close:hover { background: var(--border); }

.modal-kpi-row {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.modal-kpi {
    flex: 1; min-width: 120px;
    background: var(--surface-2); border-radius: var(--r-sm);
    padding: 12px 14px;
}
.modal-kpi-label { font-size: .7rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.modal-kpi-value { font-size: 1.3rem; font-weight: 800; }

.modal-chart-wrap { position: relative; height: 280px; }

/* ── Login Page ───────────────────────────────────────────────────── */
.login-body {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 16px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 40px 36px;
    width: 100%; max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: card-in .4s var(--ease);
}

.login-logo {
    display: flex; justify-content: center; margin-bottom: 16px;
}
.login-logo-icon {
    font-size: 2.2rem; color: var(--primary);
    background: var(--primary-dim); border-radius: var(--r-md);
    padding: 10px;
}
.login-title    { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 4px; }
.login-subtitle { font-size: .85rem; color: var(--text-3); text-align: center; margin-bottom: 28px; }

.login-error {
    display: flex; align-items: center; gap: 6px;
    background: rgba(239,68,68,.1); color: var(--red);
    border-radius: var(--r-sm); padding: 10px 12px;
    font-size: .85rem; font-weight: 500;
    margin-bottom: 16px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--text-2); }

.input-wrapper { position: relative; }
.input-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-size: 1.1rem; color: var(--text-3); pointer-events: none;
}
.input-wrapper input {
    width: 100%; height: 44px; padding: 0 12px 0 40px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface-2); color: var(--text-1);
    font-size: .95rem;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input-wrapper input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; border-radius: var(--r-sm);
    background: var(--primary); color: #fff;
    font-size: .95rem; font-weight: 700;
    transition: opacity .15s, transform .1s;
    margin-top: 8px;
}
.btn-primary:hover  { opacity: .9; }
.btn-primary:active { transform: scale(.98); }

.login-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; color: var(--text-3); font-size: .8rem;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn-google {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 11px 16px; border-radius: var(--r-sm);
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-1); font-size: .9rem; font-weight: 500;
    cursor: pointer; transition: background .15s;
}
.btn-google:hover { background: var(--bg); }
.btn-google:disabled { opacity: .6; cursor: not-allowed; }

/* ── Accordions (Scorecard & Pivot) ────────────────────────────────── */
.accordion {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.accordion-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    background: var(--surface-2);
    user-select: none;
    transition: background .15s;
}
.accordion-header:hover { background: var(--border); }
.accordion-title { font-size: .9rem; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: 8px;}
.accordion-icon { font-size: 1.2rem; color: var(--text-3); transition: transform .2s var(--ease); }
.accordion.open > .accordion-header .accordion-icon { transform: rotate(180deg); }
.accordion-content {
    display: none;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}
.accordion.open > .accordion-content { display: block; }

/* ── Scorecard Rows ───────────────────────────────────────────────── */
.scorecard-header-row {
    display: grid;
    grid-template-columns: 20px 2.5fr 1fr 1fr 1fr 1fr 1fr 1fr 40px 1fr;
    gap: 12px;
    padding: 0 10px 10px 10px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 12px;
}
.scorecard-col-title { font-size: .75rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.scorecard-row {
    display: grid;
    grid-template-columns: 20px 2.5fr 1fr 1fr 1fr 1fr 1fr 1fr 40px 1fr;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background .15s;
}
.scorecard-row:hover { background: var(--surface-2); }
.scorecard-row:last-child { border-bottom: none; }
.sc-val { font-size: .85rem; font-weight: 500; color: var(--text-1); }
.sc-name { font-size: .85rem; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 6px;}
.sc-dot { font-size: 1rem; }
.sc-trend { font-size: 1.1rem; font-weight: bold; }
.sc-source { font-size: .7rem; color: var(--text-3); }
@media (max-width: 1024px) {
    .scorecard-header-row, .scorecard-row {
        grid-template-columns: 20px 2fr 1fr 1fr 1fr;
    }
    .scorecard-header-row > div:nth-child(n+6), .scorecard-row > div:nth-child(n+6) {
        display: none;
    }
}
@media (max-width: 600px) {
    .scorecard-header-row, .scorecard-row {
        grid-template-columns: 20px 1fr 1fr;
    }
    .scorecard-header-row > div:nth-child(n+4), .scorecard-row > div:nth-child(n+4) {
        display: none;
    }
}

/* ── Settings Page ────────────────────────────────────────────────── */
.settings-section {
    max-width: 760px;
}
.settings-accordion {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.settings-accordion-header {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: none;
    border: none;
    text-align: left;
    transition: background .15s;
    gap: 12px;
}
.settings-accordion-header:hover { background: var(--surface-2); }
.settings-accordion-title {
    display: flex; align-items: center; gap: 10px;
    font-size: .95rem; font-weight: 700; color: var(--text-1);
}
.settings-accordion-title .material-symbols-rounded { font-size: 1.2rem; color: var(--primary); }
.settings-accordion-meta { font-size: .78rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.settings-accordion-chevron {
    font-size: 1.3rem; color: var(--text-3);
    transition: transform .25s var(--ease); flex-shrink: 0;
}
.settings-accordion.open .settings-accordion-chevron { transform: rotate(180deg); }

.settings-accordion-body {
    border-top: 1px solid var(--border);
}
/* hidden attr hides body; JS toggles it along with .open class */

/* ── Settings Table ───────────────────────────────────────────────── */
.settings-table {
    width: 100%;
    border-collapse: collapse;
}
.settings-table thead th {
    padding: 8px 16px;
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.settings-table .col-eye  { width: 130px; }
.settings-table .col-name { }

.settings-row {
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--surface-2); }
.settings-row td { padding: 10px 16px; vertical-align: middle; }

/* Card info cell */
.settings-card-info {
    display: flex; align-items: center; gap: 12px;
}
.settings-card-icon-wrap {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex-shrink: 0;
    background: var(--primary-dim); border-radius: var(--r-sm);
    color: var(--primary);
}
.settings-card-icon-wrap .material-symbols-rounded { font-size: .95rem; }
.settings-card-name {
    font-size: .875rem; font-weight: 500; color: var(--text-1);
    transition: color .15s;
}

/* Hidden row dims the card name */
.settings-row.row-hidden .settings-card-name { color: var(--text-3); }
.settings-row.row-hidden .settings-card-icon-wrap { opacity: .4; }

/* ── Eye Toggle Button ────────────────────────────────────────────── */
.eye-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 5px 10px;
    cursor: pointer;
    font-size: .78rem; font-weight: 500;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.eye-toggle .material-symbols-rounded { font-size: 1rem; }
.eye-toggle .eye-label { color: var(--text-2); }

.eye-toggle.is-visible {
    border-color: var(--green);
    color: var(--green);
}
.eye-toggle.is-visible .eye-label { color: var(--green); }
.eye-toggle.is-visible:hover { background: color-mix(in srgb, var(--green) 12%, transparent); }

.eye-toggle.is-hidden {
    border-color: var(--border);
    color: var(--text-3);
}
.eye-toggle.is-hidden .eye-label { color: var(--text-3); }
.eye-toggle.is-hidden:hover { background: var(--surface-2); }

.eye-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Toast notification */
.toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
    font-size: .875rem; font-weight: 500; color: var(--text-1);
    animation: toast-in .2s var(--ease);
    transition: opacity .3s;
}
.toast.fade-out { opacity: 0; }
.toast .material-symbols-rounded { color: var(--green); font-size: 1.1rem; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Settings Card (Partner Info panel) ──────────────────────────── */
.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.settings-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    user-select: none;
    transition: background .15s;
}
.settings-card-header:hover { background: var(--surface-2); }

.settings-card-title {
    display: flex; align-items: center; gap: 10px;
    font-size: .875rem; font-weight: 600; color: var(--text-1);
}
.settings-card-title .material-symbols-rounded { color: var(--primary); font-size: 1.2rem; }

#partner-info-body {
    padding: 16px 18px;
}

.settings-count {
    font-size: .75rem; font-weight: 600; color: var(--text-3);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; padding: 2px 10px;
}

/* Partner Info table inputs */
.pi-input {
    width: 100%; padding: 5px 8px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text-1);
    font-size: .82rem; font-family: inherit;
    outline: none; transition: border-color .15s;
}
.pi-input:focus { border-color: var(--primary); }
.pi-input::placeholder { color: var(--text-3); }

.pi-save-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--primary); border-radius: var(--r-sm);
    background: transparent; color: var(--primary);
    font-size: .78rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .15s;
}
.pi-save-btn:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.pi-save-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Metric Dictionary ────────────────────────────────────────────── */
.md-filters {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap;
}
.md-search-wrap {
    position: relative; flex: 1; min-width: 220px;
}
.md-search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-size: 1.1rem; color: var(--text-3); pointer-events: none;
}
.md-search {
    width: 100%; padding: 9px 12px 9px 38px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text-1);
    font-size: .875rem; outline: none; transition: border-color .15s;
}
.md-search:focus { border-color: var(--primary); }
.md-stage-select {
    padding: 9px 32px 9px 12px; min-width: 150px;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text-1);
    font-size: .875rem; appearance: none; outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    cursor: pointer;
}
.md-stage-select:focus { border-color: var(--primary); }

.md-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.md-table {
    width: 100%; border-collapse: collapse; font-size: .875rem;
}
.md-table th {
    padding: 11px 14px; text-align: left;
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.md-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-1);
}
.md-row:last-child td { border-bottom: none; }
.md-row:hover td { background: var(--surface-2); }

/* Column widths */
.md-table .col-stage   { width: 110px; }
.md-table .col-metric  { min-width: 180px; }
.md-table .col-formula { min-width: 200px; color: var(--text-2); }
.md-table .col-desc    { min-width: 220px; max-width: 320px; color: var(--text-2); }
.md-table .col-type    { width: 90px; text-align: center; }
.md-table .col-owner   { width: 130px; color: var(--text-2); }
.md-table .col-actions { width: 72px; text-align: right; }
.md-table th.col-type  { text-align: center; }

.md-desc-text  { font-size: .82rem; }
.md-desc-empty { color: var(--text-3); }

/* Stage pills */
.stage-pill {
    display: inline-block;
    padding: 3px 9px; border-radius: 999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .02em;
    white-space: nowrap;
}
.stage-onboarding { background: rgba(59,130,246,.13);  color: #3B82F6; }
.stage-quote      { background: rgba(139,92,246,.13);  color: #8B5CF6; }
.stage-pay        { background: rgba(245,158,11,.15);  color: #D97706; }
.stage-transfer   { background: rgba(20,184,166,.13);  color: #0D9488; }
.stage-delivery   { background: rgba(34,197,94,.13);   color: #16A34A; }
.stage-global     { background: rgba(100,116,139,.12); color: #64748B; }

/* Type badges */
.type-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums;
    border: 1px solid currentColor;
}
.type-rate     { color: var(--primary); border-color: rgba(59,130,246,.3); background: rgba(59,130,246,.07); }
.type-count    { color: var(--green);   border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.07); }
.type-currency { color: var(--amber);  border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.07); }

/* Action buttons */
.md-actions { display: flex; gap: 4px; justify-content: flex-end; }
.md-btn-edit, .md-btn-delete {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: var(--r-sm);
    background: none; border: none; cursor: pointer;
    color: var(--text-3); transition: background .12s, color .12s;
}
.md-btn-edit:hover   { background: var(--primary-dim); color: var(--primary); }
.md-btn-delete:hover { background: rgba(239,68,68,.1); color: var(--red); }
.md-btn-edit .material-symbols-rounded,
.md-btn-delete .material-symbols-rounded { font-size: 1rem; }

/* Loading / empty / error states */
.md-loading-row td, .md-empty, .md-error {
    text-align: center; padding: 48px; color: var(--text-3);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.md-table .md-loading-row td,
.md-table td.md-empty,
.md-table td.md-error {
    display: table-cell;
}
.md-loading-row td .material-symbols-rounded,
.md-empty .material-symbols-rounded,
.md-error .material-symbols-rounded { font-size: 1.3rem; }

.md-count {
    margin-top: 10px;
    font-size: .78rem; color: var(--text-3);
    text-align: right;
}

/* ── Metric Dictionary Modal ──────────────────────────────────────── */
.md-modal { max-width: 640px; }
.md-form { display: flex; flex-direction: column; gap: 16px; }
.md-form-row { display: flex; gap: 16px; }
.md-form-row.two-col > * { flex: 1; }
.md-field { display: flex; flex-direction: column; gap: 6px; }
.md-field label {
    font-size: .8rem; font-weight: 600; color: var(--text-2);
    text-transform: uppercase; letter-spacing: .04em;
}
.md-field .required { color: var(--red); }
.md-field input,
.md-field select,
.md-field textarea {
    padding: 9px 12px; border: 1px solid var(--border);
    border-radius: var(--r-sm); background: var(--surface-2);
    color: var(--text-1); font-size: .875rem; font-family: var(--font);
    outline: none; transition: border-color .15s; resize: vertical;
}
.md-field input:focus,
.md-field select:focus,
.md-field textarea:focus { border-color: var(--primary); background: var(--surface); }
.md-form-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 4px;
}
@media (max-width: 600px) {
    .md-form-row.two-col { flex-direction: column; }
}

/* ── Pivot Tables ─────────────────────────────────────────────────── */
.pivot-table-wrap { overflow-x: auto; margin-top: 10px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.pivot-table {
    width: 100%; border-collapse: collapse; text-align: right;
    font-size: .85rem;
}
.pivot-table th, .pivot-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.pivot-table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); text-transform: uppercase; font-size: .75rem; border-right: 1px solid var(--border);}
.pivot-table td { color: var(--text-1); border-right: 1px solid var(--border);}
.pivot-table th:first-child, .pivot-table td:first-child { text-align: left; border-right: 2px solid var(--border); }
.pivot-table tr:hover td { background: var(--surface-2); }
.pivot-table tr:last-child td { border-bottom: none; }
.pivot-table th:last-child, .pivot-table td:last-child { border-right: none; }
.pivot-table tr.total-row td { font-weight: 700; border-top: 2px solid var(--border); background: var(--surface-2); }

/* ── Pivot Tabs ───────────────────────────────────────────────────────── */
.pivot-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}
.pivot-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.pivot-tab:hover { color: var(--text-2); }
.pivot-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.pivot-tab .material-symbols-rounded { font-size: 1rem; }

/* ── Chart Toolbar ────────────────────────────────────────────────────── */
.chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--r);
    border: 1px solid var(--border);
}
.chart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 160px;
    flex-wrap: wrap;
}
.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .8rem;
    color: var(--text-3);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    transition: color .15s, background .15s;
}
.breadcrumb-item.active { color: var(--text-1); font-weight: 600; cursor: default; }
.breadcrumb-item:not(.active):hover { color: var(--primary); background: var(--primary-dim); }
.breadcrumb-item .material-symbols-rounded { font-size: .85rem; }
.breadcrumb-sep { color: var(--text-3); font-size: .8rem; margin: 0 2px; }
.chart-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-left: auto;
}
.ctrl-group { display: flex; flex-direction: column; gap: 3px; }
.ctrl-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.ctrl-select {
    font-size: .8rem;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-1);
    cursor: pointer;
}
.ctrl-select:focus { outline: none; border-color: var(--primary); }
.toggle-btns {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
}
.toggle-btn {
    padding: 5px 10px;
    font-size: .78rem;
    font-weight: 500;
    background: var(--surface-2);
    color: var(--text-2);
    border: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.toggle-btn + .toggle-btn { border-left: 1px solid var(--border); }
.toggle-btn.active { background: var(--primary); color: #fff; }
.toggle-btn:hover:not(.active) { background: var(--border); }

/* ── Chart Extra Filters ──────────────────────────────────────────────── */
.chart-extra-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r);
}
.chart-extra-filters[hidden] { display: none; }
.chart-extra-filters .filter-label { color: var(--text-3); font-size: .7rem; }

/* ── Pivot Summary Cards ──────────────────────────────────────────────── */
.pivot-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.pivot-stat-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    border-left: 3px solid var(--primary);
    min-width: 130px;
}
.pivot-stat-card.status-completed { border-left-color: #22C55E; }
.pivot-stat-card.status-failed    { border-left-color: #EF4444; }
.pivot-stat-card.status-onhold    { border-left-color: #F97316; }
.pivot-stat-card.status-other     { border-left-color: #94A3B8; }
.pivot-stat-label {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-3);
    white-space: nowrap;
}
.pivot-stat-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.pivot-stat-tx {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
}
.pivot-stat-amt {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-3);
    white-space: nowrap;
}

/* ── Chart Card ───────────────────────────────────────────────────────── */
.chart-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
    margin-bottom: 20px;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chart-card canvas { width: 100% !important; }
.chart-state-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--surface);
    border-radius: var(--r);
    z-index: 2;
    color: var(--text-3);
    font-size: .9rem;
}
.chart-state-overlay.hidden { display: none; }

/* ── Chart Data Table ─────────────────────────────────────────────────── */
.chart-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
.chart-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.chart-table-title { font-size: .85rem; font-weight: 700; color: var(--text-1); }

/* ── Details toggle btn ───────────────────────────────────────────────── */
.btn-details-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    height: 32px;
}
.btn-details-toggle:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }
.btn-details-toggle.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-details-toggle .material-symbols-rounded { font-size: 1rem; }

/* ── Export Excel btn ─────────────────────────────────────────────────── */
.btn-export-excel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    height: 32px;
}
.btn-export-excel:hover { background: var(--green); color: #fff; border-color: var(--green); }
.btn-export-excel .material-symbols-rounded { font-size: 1rem; }

/* ── Report Config page ───────────────────────────────────────────────── */
.report-config-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .report-config-layout { grid-template-columns: 1fr; }
}

.report-config-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}

.rconfig-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 700; color: var(--text-1);
    margin-bottom: 18px;
}
.rconfig-section-title .material-symbols-rounded { font-size: 1.1rem; color: var(--primary); }

.rconfig-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.rconfig-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .rconfig-row { grid-template-columns: 1fr; } }

.rconfig-label {
    font-size: .78rem; font-weight: 600; color: var(--text-2);
}
.rconfig-select,
.rconfig-input {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-1);
    font-size: .875rem;
    transition: border-color .15s;
    width: 100%;
}
.rconfig-select:focus,
.rconfig-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.rconfig-textarea {
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-1);
    font-size: .875rem;
    font-family: var(--font);
    resize: vertical;
    transition: border-color .15s;
    width: 100%;
    line-height: 1.5;
}
.rconfig-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.btn-save-template {
    display: flex; align-items: center; gap: 6px;
    margin-top: 6px; margin-bottom: 4px;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: .82rem; font-weight: 600; font-family: var(--font);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.btn-save-template .material-symbols-rounded { font-size: 1rem; }
.btn-save-template:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }

.template-status-msg { font-size: .78rem; min-height: 18px; }

.btn-generate-report {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 22px;
    padding: 11px 20px;
    background: var(--primary);
    color: #fff;
    border: none; border-radius: var(--r-sm);
    font-size: .95rem; font-weight: 700; font-family: var(--font);
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    box-shadow: var(--shadow-sm);
}
.btn-generate-report .material-symbols-rounded { font-size: 1.15rem; }
.btn-generate-report:hover { background: #2563EB; box-shadow: var(--shadow-md); }

/* Period mode radio group */
.rconfig-radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.rconfig-radio {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface-2); cursor: pointer;
    font-size: .82rem; font-weight: 500; color: var(--text-2);
    transition: border-color .15s, color .15s, background .15s;
    user-select: none;
}
.rconfig-radio input[type=radio] { display: none; }
.rconfig-radio:has(input:checked) {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-dim);
}

/* Section title with inline toggle */
.rconfig-section-title { display: flex; align-items: center; gap: 8px; }
.rconfig-toggle-label {
    margin-left: auto; display: flex; align-items: center; gap: 6px; cursor: pointer;
    font-size: .75rem; font-weight: 500; color: var(--text-2);
}
.rconfig-toggle-label input[type=checkbox] { accent-color: var(--primary); }
.rconfig-toggle-text { font-weight: 500; }

/* Partner info pill */
.rconfig-partner-info {
    margin-top: 5px; font-size: .75rem; color: var(--text-3);
    padding: 4px 10px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border);
    width: fit-content;
}

/* Hint cards */
.report-config-hint { display: flex; flex-direction: column; gap: 16px; }
.hint-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.hint-icon {
    font-size: 1.4rem; color: var(--primary);
    display: block; margin-bottom: 8px;
}
.hint-card h3 { font-size: .9rem; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.hint-list {
    padding-left: 16px; font-size: .82rem; color: var(--text-2); line-height: 1.7;
}
.hint-list li { margin-bottom: 2px; }

