/* Tema Arcanio para el panel de administración: negro y oro (y variante oro + azul).
   El panel usa variables de color; aquí se reemplazan para todo el sistema. */
:root, :root[data-tema="oro"] {
  --bg: #0a0907; --shell: #0f0d0a; --panel: #15120d; --panel-2: #1e1912; --line: #3a2f1c;
  --ink: #f6eedb; --muted: #b6a888; --faint: #7a6f58;
  --magenta: #e3b230; --violet: #b8862b; --cyan: #f2d27c; --blue: #8a7656; --pink: #d9a85a;
  --ok: #4ade80; --bad: #f87171; --cell: #1e1912; --cell-focus: #2b2215;
  --grad-a: linear-gradient(135deg, #f6d985 0%, #d9a83a 45%, #9c6f1e 100%);
  --grad-b: linear-gradient(135deg, #3a2c14 0%, #6d5124 55%, #b8862b 100%);
  --display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --glow: 0 0 0 1px rgba(227, 178, 48, .28), 0 8px 28px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 230, 160, .06);
}
:root[data-tema="azul"] {
  --cyan: #3b82f6; --blue: #2563eb; --pink: #60a5fa;
  --grad-b: linear-gradient(135deg, #0b1b3a 0%, #1d4ed8 60%, #3b82f6 100%);
}
html, body { background: radial-gradient(1200px 600px at 70% -10%, rgba(227, 178, 48, .10), transparent 60%), var(--bg); }
body::before { background: var(--shell); }
.side { background: linear-gradient(180deg, #13100b 0%, #0b0907 100%); border-right: 1px solid rgba(227, 178, 48, .35); box-shadow: 4px 0 24px rgba(0, 0, 0, .5); }
.brand { font-family: var(--display); letter-spacing: .12em; text-transform: uppercase; color: #f2d27c; font-weight: 600; }
.brand small { font-family: var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.top h1, .card h2, .hcard .hv, .hero .val, .mini .t span:last-child, #mes-label { font-family: var(--display); letter-spacing: .02em; }
.top h1 { color: #f2d27c; font-weight: 600; }
.card, .mini, .hcard, .acc, .loan, .gpost { background: linear-gradient(180deg, rgba(255, 220, 140, .035), rgba(0, 0, 0, 0)) , var(--panel); box-shadow: var(--glow); border: 0; }
.card { border-radius: 14px; }
.hero { box-shadow: var(--glow); }
.hero.a { color: #1c1408; } .hero.a .sub, .hero.a .lbl { color: #2a1e09; }
.hero.b { color: #fff3d6; }
.modnav button { color: #d9cba8; border-radius: 10px; }
.modnav button:hover { background: rgba(227, 178, 48, .08); color: #f6eedb; }
.modnav button.on { color: #1c1408; background: var(--grad-a); box-shadow: 0 0 0 1px rgba(255, 230, 160, .6), 0 6px 22px rgba(227, 178, 48, .35); }
.gbtn, .menu-btn { background: var(--grad-a); color: #1c1408; }
.obtn { border-color: rgba(227, 178, 48, .45); }
.obtn:hover { border-color: #e3b230; }
.pill, .tc, .picker { background: var(--panel); border-color: rgba(227, 178, 48, .35); }
.seg { background: var(--panel-2); }
.seg button.on { background: var(--grad-a); color: #1c1408; box-shadow: none; }
.nav a.on { background: linear-gradient(90deg, rgba(227, 178, 48, .25), rgba(227, 178, 48, .03)); border-left-color: #e3b230; }
.chip.up { background: rgba(74, 222, 128, .14); }
.tip { background: #e3b230; color: #1c1408; } .tip.c { background: #8a7656; color: #fff; }
.ovl span { background: rgba(10, 9, 7, .85); }
.sheet th, .er th, .bud th, .rh th, .gt th, .compare th { color: #c9b98f; }
.er tr.big td { background: rgba(227, 178, 48, .12); } .er tr.big td:first-child { background: #2a2215; }
.sheet tfoot td { background: rgba(227, 178, 48, .12); }
.compare tr.sel td { background: rgba(227, 178, 48, .12); }
.strip div.on, .cal .day.today, .mcal .dy.tod, .wkstrip div.on { box-shadow: inset 0 0 0 2px #e3b230; }
input:focus, select:focus, .form input:focus, .form select:focus, .sheet input:focus { border-color: #e3b230 !important; box-shadow: 0 0 0 3px rgba(227, 178, 48, .2) !important; }
.demo { background: linear-gradient(90deg, rgba(227, 178, 48, .18), rgba(227, 178, 48, .05)); border-color: rgba(227, 178, 48, .45); }
:root[data-tema="azul"] .side { background: linear-gradient(180deg, #0c1222 0%, #070a12 100%); }
:root[data-tema="azul"] { --bg: #070a12; --shell: #0a0f1c; --panel: #0d1424; --panel-2: #121b30; --line: #24314f; --cell: #121b30; --cell-focus: #18233d; }
:root[data-tema="azul"] .card, :root[data-tema="azul"] .mini, :root[data-tema="azul"] .hcard { background: linear-gradient(180deg, rgba(96, 165, 250, .04), rgba(0, 0, 0, 0)), var(--panel); }

/* ===== Tablero de Inicio (estilo azul marino y oro) ===== */
.tb { display: grid; gap: 18px; }
.tb-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.tb-hola { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; background: linear-gradient(180deg, #fbe7a8, #e3b230 60%, #b8862b); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .02em; }
.tb-sub { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.tb-date { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--panel); box-shadow: var(--glow); }
.tb-date svg { width: 28px; height: 28px; color: #60a5fa; }
.tb-date div { display: grid; } .tb-date span { color: var(--muted); font-size: .8rem; } .tb-date b { font-family: var(--display); font-size: 1.35rem; color: var(--ink); }
.tb-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.tb-kpi { position: relative; overflow: hidden; border-radius: 14px; padding: 14px 14px 46px; background: linear-gradient(180deg, rgba(96,165,250,.06), rgba(0,0,0,0)), var(--panel); box-shadow: var(--glow); display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; min-height: 6.6rem; }
.tb-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #f6d985; background: radial-gradient(circle at 30% 30%, rgba(246,217,133,.25), rgba(227,178,48,.08)); box-shadow: inset 0 0 0 1px rgba(227,178,48,.55), 0 0 18px rgba(227,178,48,.18); }
.tb-ico svg { width: 24px; height: 24px; }
.tb-kt { display: grid; gap: 3px; min-width: 0; }
.tb-kl { color: #cbd5e1; font-size: .8rem; font-weight: 600; }
.tb-kv { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-kd { font-size: .78rem; font-weight: 800; color: var(--muted); } .tb-kd.up { color: #34d399; } .tb-kd.down { color: #f87171; }
.tb-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40px; }
.tb-row { display: grid; gap: 16px; }
.tb-row.r3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 75rem) { .tb-row.r3 { grid-template-columns: 1fr 1fr; } .tb-row.r3 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 46rem) { .tb-row.r3 { grid-template-columns: 1fr; } }
.tb-card { border-radius: 14px; padding: 16px 18px; background: linear-gradient(180deg, rgba(96,165,250,.05), rgba(0,0,0,0)), var(--panel); box-shadow: var(--glow); display: grid; gap: 10px; align-content: start; min-width: 0; }
.tb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tb-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.tb-pill { font-size: .72rem; font-weight: 700; color: #cbd5e1; padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(148,163,184,.25); background: rgba(15,23,42,.6); white-space: nowrap; }
.tb-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: .74rem; color: #cbd5e1; }
.tb-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.tb-chart { width: 100%; height: auto; display: block; }
.tb-ax { fill: #94a3b8; font: 600 14px var(--body); }
.tb-dw { display: grid; grid-template-columns: minmax(8rem, 10rem) 1fr; gap: 14px; align-items: center; }
@media (max-width: 30rem) { .tb-dw { grid-template-columns: 1fr; justify-items: center; } }
.tb-donut { width: 100%; max-width: 10rem; height: auto; }
.tb-dn1 { fill: var(--ink); font: 600 26px var(--display); } .tb-dn2 { fill: #94a3b8; font: 600 11px var(--body); }
.tb-lg { display: grid; gap: 9px; font-size: .82rem; }
.tb-lgr { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; color: #cbd5e1; }
.tb-lgr i { width: 11px; height: 11px; border-radius: 50%; } .tb-lgr b { color: var(--ink); } .tb-lgr small { color: #94a3b8; min-width: 3rem; text-align: right; }
.tb-chk { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .84rem; color: #cbd5e1; }
.tb-chk li { display: flex; gap: 10px; align-items: center; } .tb-chk i { width: 11px; height: 11px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; flex: none; }
.tb-chk li.no i { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.tb-hb, .tb-metas { display: grid; gap: 11px; }
.tb-hbr, .tb-mt { display: grid; grid-template-columns: minmax(5.5rem, 8.5rem) 1fr auto; gap: 10px; align-items: center; font-size: .82rem; color: #cbd5e1; }
.tb-hbr b, .tb-mt b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tb-hbb { height: 12px; border-radius: 3px; background: rgba(148,163,184,.12); overflow: hidden; } .tb-hbb i { display: block; height: 100%; border-radius: 3px; box-shadow: 0 0 10px rgba(59,130,246,.45); }
.tb-ob { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tb-ob li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(15,23,42,.55); box-shadow: inset 0 0 0 1px rgba(148,163,184,.12); font-size: .82rem; color: #e2e8f0; }
.tb-dd { display: grid; place-items: center; width: 34px; padding: 3px 0; border-radius: 6px; background: rgba(59,130,246,.15); box-shadow: inset 0 0 0 1px rgba(96,165,250,.4); line-height: 1.05; }
.tb-dd b { font-size: .9rem; } .tb-dd small { font-size: .55rem; color: #93c5fd; }
.tb-st { color: #94a3b8; } .tb-note, .tb-empty { margin: 0; color: #94a3b8; font-size: .76rem; }
.tb-qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tb-q { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; border: 0; cursor: pointer; color: #e2e8f0; font: 700 .74rem var(--body); text-align: center; background: rgba(15,23,42,.6); box-shadow: inset 0 0 0 1px rgba(148,163,184,.18); }
.tb-q svg { width: 26px; height: 26px; color: #f6d985; filter: drop-shadow(0 0 6px rgba(227,178,48,.45)); }
.tb-q:hover { box-shadow: inset 0 0 0 1px rgba(227,178,48,.6), 0 0 16px rgba(227,178,48,.2); }
#mod-inicio > #h-kpis { display: none !important; }
/* menú con íconos */
.modnav .mi { width: 20px; height: 20px; flex: none; color: #60a5fa; }
.modnav button.on .mi { color: #1c1408; }
:root[data-tema="oro"] .modnav .mi { color: #e3b230; }

.main:has(#mod-inicio:not([hidden])) #titulo { visibility: hidden; }
.main:has(#mod-citas:not([hidden])) #resumen { display: none; }
