/* Suite theme — modo día + paleta (hub, formulación) */
.suite-theme-controls {
    display: inline-flex;
    align-items: center;
}
.suite-theme-toggle {
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d !important;
}
.suite-theme-toggle:hover:not(:disabled) {
    border-color: rgba(251, 191, 36, 0.55) !important;
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fde68a !important;
}
body.light-mode .suite-theme-toggle {
    border-color: rgba(79, 70, 229, 0.35) !important;
    color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.08) !important;
}

/* ─── Modo día — portal unidad + formulación ─── */
body.unit-hub-body.light-mode {
    --uh-bg: #f1f5f9;
    --uh-panel: #ffffff;
    --uh-border: rgba(15, 23, 42, 0.1);
    --uh-txt: #0f172a;
    --uh-muted: #64748b;
    --uh-accent: #059669;
    background: var(--uh-bg) !important;
    color: var(--uh-txt) !important;
}
body.unit-hub-body.light-mode .unit-hub-hdr,
body.unit-hub-body.light-mode .form-page-hdr {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--uh-border);
}
body.unit-hub-body.light-mode .unit-hub-logo,
body.unit-hub-body.light-mode .form-hdr-meta {
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode .unit-hub-logo span { color: var(--uh-accent); }
body.unit-hub-body.light-mode .unit-hub-hero p,
body.unit-hub-body.light-mode .form-hint,
body.unit-hub-body.light-mode .form-compare-note {
    color: var(--uh-muted);
}
body.unit-hub-body.light-mode .unit-hub-card {
    background: var(--uh-panel);
    border-color: var(--uh-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
body.unit-hub-body.light-mode .unit-hub-card p { color: var(--uh-muted); }
body.unit-hub-body.light-mode .suite-premium-btn {
    background: #fff;
    border-color: var(--uh-border);
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode .period-control {
    background: #fff !important;
    border-color: var(--uh-border) !important;
}
body.unit-hub-body.light-mode .period-select,
body.unit-hub-body.light-mode #userLabel {
    color: var(--uh-txt) !important;
}
body.unit-hub-body.light-mode .suite-unit-select {
    background-color: #fff;
    border-color: var(--uh-border);
    color: var(--uh-txt);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
body.unit-hub-body.light-mode .suite-unit-select:hover {
    border-color: rgba(5, 150, 105, 0.45);
    color: var(--uh-accent);
}
body.unit-hub-body.light-mode .suite-unit-select option {
    background: #fff;
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode .form-table-wrap {
    background: var(--uh-panel);
    border-color: var(--uh-border);
}
body.unit-hub-body.light-mode .form-table th {
    background: #f8fafc;
    color: var(--uh-muted);
    border-color: var(--uh-border);
}
body.unit-hub-body.light-mode .form-table td {
    border-color: rgba(15, 23, 42, 0.06);
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode .form-table input,
body.unit-hub-body.light-mode .form-table select,
body.unit-hub-body.light-mode .form-notas,
body.unit-hub-body.light-mode .form-neg-compose textarea {
    background: #f8fafc;
    border-color: var(--uh-border);
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode .select2-container--default .select2-selection--single {
    background: #f8fafc !important;
    border-color: var(--uh-border) !important;
}
body.unit-hub-body.light-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--uh-txt) !important;
}
body.unit-hub-body.light-mode .select2-dropdown {
    background: #fff !important;
    border-color: var(--uh-border) !important;
}
body.unit-hub-body.light-mode .select2-container--default .select2-results__option {
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #059669 !important;
    color: #fff !important;
}
body.unit-hub-body.light-mode.formulacion-page {
    --form-freeze-bg: #ffffff;
    --form-freeze-foot: #d1fae5;
}
body.unit-hub-body.light-mode .form-vista2-wrap .form-vista2-table thead th {
    background: #f8fafc !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table .col-del-action,
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table .col-owner,
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table .col-partida-sel,
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table .col-detalle,
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table td.col-freeze-merge {
    background: var(--form-freeze-bg) !important;
    border-right-color: rgba(5, 150, 105, 0.2);
}
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table tfoot .col-del-action,
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table tfoot .col-owner,
body.unit-hub-body.light-mode .form-vista2-wrap.freeze-cols .form-vista2-table tfoot td.col-freeze-merge {
    background: var(--form-freeze-foot) !important;
}
body.unit-hub-body.light-mode .form-vista2-table tfoot td {
    background: #d1fae5;
    border-top-color: #059669;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08);
}
body.unit-hub-body.light-mode .form-vista2-table tr.partida-subtotal-row td {
    background: #ecfdf5;
    border-color: rgba(5, 150, 105, 0.35);
}
body.unit-hub-body.light-mode .v1-chip-prev { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
body.unit-hub-body.light-mode .v1-chip-proy { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
body.unit-hub-body.light-mode .v1-chip-ppto { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
body.unit-hub-body.light-mode .v1-chip-real { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
body.unit-hub-body.light-mode .v1-chip-vard,
body.unit-hub-body.light-mode .v1-chip-varpct { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
body.unit-hub-body.light-mode .v1-chip-vard.mag-neg,
body.unit-hub-body.light-mode .v1-chip-varpct.mag-neg { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
body.unit-hub-body.light-mode .v1-chip-vard.mag-pos.mag-high,
body.unit-hub-body.light-mode .v1-chip-varpct.mag-pos.mag-high,
body.unit-hub-body.light-mode .v1-chip-vard.mag-pos.mag-top,
body.unit-hub-body.light-mode .v1-chip-varpct.mag-pos.mag-top { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
body.unit-hub-body.light-mode .form-vista1-table td.col-v1-prev { background: rgba(16, 185, 129, 0.04); }
body.unit-hub-body.light-mode .form-vista1-table td.col-v1-proy { background: rgba(59, 130, 246, 0.04); }
body.unit-hub-body.light-mode .form-vista1-table td.col-v1-ppto { background: rgba(139, 92, 246, 0.04); }
body.unit-hub-body.light-mode .form-vista1-table td.col-v1-real,
body.unit-hub-body.light-mode .form-vista1-table td.col-v1-ytd { background: rgba(245, 158, 11, 0.05); }
body.unit-hub-body.light-mode .form-tab {
    color: var(--uh-muted);
}
body.unit-hub-body.light-mode .form-tab.active {
    color: var(--uh-accent);
    border-bottom-color: var(--uh-accent);
}
body.unit-hub-body.light-mode .form-nav-wrap {
    border-color: var(--uh-border);
}
body.unit-hub-body.light-mode .form-nav-scope-kicker {
    color: var(--uh-muted);
}
body.unit-hub-body.light-mode .form-hdr-total-chip {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.25);
}
body.unit-hub-body.light-mode .form-neg-panel {
    background: #ffffff;
    border-color: var(--uh-border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}
body.unit-hub-body.light-mode .form-neg-hdr {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0f9ff 100%);
    border-bottom-color: var(--uh-border);
}
body.unit-hub-body.light-mode .form-neg-bubble.gerencia .form-neg-bubble-inner {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
}
body.unit-hub-body.light-mode .form-neg-bubble.unidad .form-neg-bubble-inner {
    background: #ecfdf5;
    border-color: rgba(5, 150, 105, 0.25);
    color: #064e3b;
}

/* ─── Modo día — formulación P0 (toolbar, scope, V1/V2) · DeepSeek técnica 1 ─── */
body.unit-hub-body.light-mode.formulacion-page .form-hdr-meta-item strong {
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode.formulacion-page .form-hdr-meta-dim strong {
    color: #475569;
}
body.unit-hub-body.light-mode.formulacion-page .form-hdr-user-chip {
    background: #fff;
    border-color: var(--uh-border);
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode.formulacion-page .form-btn {
    background: #fff;
    border-color: var(--uh-border);
    color: #334155;
}
body.unit-hub-body.light-mode.formulacion-page .form-btn:hover:not(:disabled) {
    border-color: rgba(5, 150, 105, 0.45);
    color: var(--uh-accent);
    background: #f0fdf4;
}
body.unit-hub-body.light-mode.formulacion-page .form-btn-primary {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.35);
    color: #047857;
}
body.unit-hub-body.light-mode.formulacion-page .form-btn-active {
    background: rgba(5, 150, 105, 0.18) !important;
    border-color: rgba(5, 150, 105, 0.55) !important;
    color: #047857 !important;
}
body.unit-hub-body.light-mode.formulacion-page .form-btn .form-ico,
body.unit-hub-body.light-mode.formulacion-page .form-tab .form-tab-ico {
    color: currentColor;
    stroke: currentColor;
}
body.unit-hub-body.light-mode.formulacion-page .form-partidas-scope-toggle {
    background: #fff;
    border-color: rgba(5, 150, 105, 0.35);
}
body.unit-hub-body.light-mode.formulacion-page .form-partidas-scope-toggle .form-scope-opt {
    color: #64748b;
}
body.unit-hub-body.light-mode.formulacion-page .form-partidas-scope-toggle .form-scope-opt:hover:not(:disabled) {
    color: #047857;
    background: #f0fdf4;
}
body.unit-hub-body.light-mode.formulacion-page .form-partidas-scope-toggle .form-scope-opt.is-active {
    background: rgba(5, 150, 105, 0.15);
    color: #047857;
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.35);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-table thead th {
    background: #f1f5f9 !important;
    color: #475569;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-table .grupo-toggle-row td {
    background: #ecfdf5;
    color: #065f46;
    border-bottom-color: rgba(5, 150, 105, 0.2);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-table .total-grupo-row td {
    background: #f8fafc;
    color: var(--uh-txt);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-table tfoot .total-unidad-row td {
    background: #d1fae5;
    color: #065f46;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-table tfoot .total-unidad-row td strong {
    color: #047857;
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-aportes {
    background: #f5f3ff;
    border-color: rgba(91, 33, 182, 0.2);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista1-aportes-label {
    color: #5b21b6;
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table select.ln-partida,
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table input.ln-detalle,
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table input.ln-num,
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table input.mes-input {
    background: #fff !important;
    border-color: var(--uh-border) !important;
    color: var(--uh-txt) !important;
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table .col-total {
    color: #047857;
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table tr.grupo-v2-header td.grupo-v2-tree-cell {
    background: #ecfdf5;
    border-top-color: rgba(5, 150, 105, 0.25);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table .grupo-v2-toggle {
    color: #065f46;
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table .grupo-v2-name {
    color: #334155;
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table .partida-run-start-inner {
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.12) 0%, rgba(5, 150, 105, 0.04) 48px, #f8fafc 100%);
}
body.unit-hub-body.light-mode.formulacion-page .form-vista2-table .partida-run-start-label {
    color: #047857;
}
body.unit-hub-body.light-mode.formulacion-page .form-table .col-total {
    color: #047857;
}
body.unit-hub-body.light-mode.formulacion-page .form-estado-borrador {
    background: #fef9c3;
    color: #854d0e;
}
