/* Tema común del sistema: NEGRO con letras blancas. Se carga AL FINAL de cada página.
   Para cambiar el aspecto de todo el sitio, edita solo este archivo.
   Cada página usa nombres de variable distintos (--panel/--card, --text/--ink, --muted/--mute…):
   aquí todos reciben el mismo valor. (Los nombres --verde* se conservan por compatibilidad: ahora son blancos.) */
:root:root:root {
  --verde: #ffffff; --verde-claro: #e4e4e7; --verde-suave: #1f1f23; --verde-oscuro: #000000; --sobre-verde: #000000;
  --bg: #000000; --panel: #0d0d0f; --card: #0d0d0f; --card2: #151518;
  --text: #fafafa; --ink: #fafafa; --muted: #a1a1aa; --mute: #a1a1aa; --line: #27272a;
  --accent: #ffffff; --accent2: #ffffff; --accent-light: #e4e4e7; --accent-soft: #1f1f23; --accent-texto: #000000;
  --warn: #fbbf24; --warn-soft: #2a2108; --warnbg: #2a2108; --error: #f87171; --error-soft: #2d1212; --ok: #4ade80;
  --up: #fb923c; --up-soft: #2a1608; --down: #60a5fa; --down-soft: #0f1d33; --user: #3f3f46;
  /* Colores de datos del dashboard (factura / boleta / PP) */
  --fact: #fafafa; --bol: #71717a; --pp: #f59e0b;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, Menlo, monospace;
  --radio: 12px; --espacio: 16px;
  --shadow: 0 0 0 1px #27272a, 0 8px 30px rgba(0,0,0,.6);
  color-scheme: dark;
}
html { color-scheme: dark; background: #000; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; color: var(--text); }
input, select, textarea { background: #0a0a0b; border-color: var(--line); }
input::placeholder, textarea::placeholder { color: #71717a; }
option { background: #0d0d0f; color: var(--text); }
/* Botones: principal blanco con texto negro; secundarios con borde */
button, .btn, .btn2, .btn-link, .file-btn { border-color: var(--line); }
button.primary, .btn:not(.ghost), .file-btn:not(.ghost), button[type="submit"] { background: #fff; border-color: #fff; color: #000; background-image: none; box-shadow: none; }
button.primary:hover, .btn:not(.ghost):hover, .file-btn:not(.ghost):hover, button[type="submit"]:hover { background: #d4d4d8; }
.subir label, .msg.user, .seg .chip.on, .tab-btn.on, .filtro button.on { background: #fff; color: #000; }
a { color: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Tablas y tarjetas */
header, .top, .card, .caja, table, th, td { border-color: var(--line); }
header, .top { background: #000 !important; }
th { background: #0a0a0b; color: var(--muted); }
::selection { background: #fff; color: #000; }
/* Barra de módulos */
#navGlobal { background: #000 !important; border-bottom: 1px solid #27272a; }
#navGlobal .marca { color: #fff; font-weight: 800; letter-spacing: .18em; font-size: 12px; margin-right: 14px; text-decoration: none; }
#navGlobal a { color: #a1a1aa !important; }
#navGlobal a:hover { background: #18181b !important; color: #fff !important; }
#navGlobal a.on { background: #fff !important; color: #000 !important; }
/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* ---- Cabecera de módulo (Compras, Precios): foto + escena animada ---- */
.mh-hero { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; margin: 0 0 20px; padding: clamp(18px, 2.6vw, 34px); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; isolation: isolate; background: url(/img/hero.jpg) center 45% / cover; }
.mh-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(0,0,0,.93) 0%, rgba(0,0,0,.74) 55%, rgba(0,0,0,.45) 100%); }
.mh-etq { margin: 0 0 8px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #a1a1aa; }
.mh-hero h2 { margin: 0; font-size: clamp(24px, 3vw, 38px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; color: #fff; }
.mh-sub { margin: 12px 0 0; color: #d4d4d8; max-width: 46ch; font-size: 14px; text-wrap: pretty; }
.mh-hero .escena { position: relative; top: auto; left: auto; right: auto; height: 170px; width: 100%; }
@media (max-width: 760px) { .mh-hero { grid-template-columns: 1fr; } .mh-hero .escena { height: 140px; } }
/* Tarjetas con más aire y respuesta al pasar el mouse */
.card { border-radius: 16px; transition: border-color .25s, transform .25s; }
.card:hover { border-color: #3f3f46; }
.kpi { background: linear-gradient(160deg, #131316 0%, #0d0d0f 70%); }
.kpi:hover { transform: translateY(-2px); border-color: #fff; }
.kpi .v { font-size: 28px; }
@media (prefers-reduced-motion: reduce) { .card, .kpi { transition: none; } .kpi:hover { transform: none; } }
.mh-hero h2 { text-transform: none; letter-spacing: -.03em; font-size: clamp(24px, 3vw, 38px); color: #fff; margin: 0; }
