@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
/* Tema claro siempre (como Ecomm). El oscuro queda solo si se pide con data-theme="dark". */
:root {
  color-scheme: light;
  --bg: #f2f4f9;
  --card: #ffffff;
  --text: #1f2541;
  --muted: #6b7190;
  --line: #e3e6ef;
  --accent: #3157d5;
  --accent-soft: #e8edfc;
  --pos: #16a34a;
  --neg: #dc2626;
  --warn-bg: #fff7e6;
  --warn-line: #f5c26b;
  --bar-venta: #b9c8f3;
  --bar-gan: #3157d5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111318; --card: #1a1d24; --text: #e6e8ec; --muted: #9aa1ad; --line: #2a2f39;
  --accent: #7c9cf5; --accent-soft: #232b40; --pos: #4ade80; --neg: #f87171;
  --warn-bg: #2b2414; --warn-line: #8a6a2a; --bar-venta: #34405e; --bar-gan: #7c9cf5;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }

.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 16px; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; }
nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
h2 { font-size: 15px; margin: 0 0 12px; }
h2 .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
.nota { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

button, .btn { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost { background: transparent; color: var(--accent); }
button.small { padding: 2px 8px; font-size: 12px; }
input, select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }

.filtros { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filtros label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.presets { display: flex; gap: 4px; flex-wrap: wrap; }
.presets button { background: var(--card); color: var(--text); border-color: var(--line); padding: 5px 10px; }
.presets button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpi .t { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi.main { border-color: var(--accent); }

.tabla-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.prod { max-width: 380px; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.tag.gris { background: var(--line); color: var(--muted); }

.aviso { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: var(--accent-soft); border: 1px solid var(--accent); }
.aviso.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.aviso.err { background: var(--warn-bg); border-color: var(--neg); }

.chart { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 8px; overflow-x: auto; }
.chart .dia { flex: 1 0 8px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart .bv { background: var(--bar-venta); border-radius: 2px 2px 0 0; }
.chart .bg { background: var(--bar-gan); position: absolute; bottom: 0; left: 25%; width: 50%; border-radius: 2px 2px 0 0; }
.chart .dia:hover { outline: 1px solid var(--accent); }
.leyenda { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

.cuenta { display: grid; grid-template-columns: 1.2fr 1fr 1fr 0.5fr 1fr 1.4fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cuenta:last-child { border-bottom: 0; }
.cuenta .nick { font-weight: 600; }
.cuenta .estado { font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .cuenta { grid-template-columns: 1fr; } }

.pasos li { margin-bottom: 8px; }
.pegar { display: flex; gap: 8px; margin-top: 8px; max-width: 720px; }
.pegar input { flex: 1; }
code { background: var(--accent-soft); padding: 2px 6px; border-radius: 4px; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; }

.importar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 16px; }
.importar .nota { margin: 0; }
.importar #importar-msg { flex-basis: 100%; }
#buscar-prod { width: 100%; max-width: 420px; margin-bottom: 12px; }
input.costo { width: 120px; text-align: right; }
input.costo.saved { border-color: var(--pos); }

dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); padding: 18px 20px; width: min(560px, 92vw); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
dialog .pegar { align-items: flex-end; margin-top: 14px; }
dialog .pegar label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.dlg-pie { display: flex; justify-content: flex-end; margin-top: 14px; }
.opciones-cambio { display: grid; gap: 10px; margin-top: 12px; }
.opciones-cambio button { text-align: left; padding: 10px 14px; }
.opciones-cambio span { font-size: 12px; color: var(--muted); }
.link { background: none; border: 0; color: var(--accent); padding: 0 4px; cursor: pointer; font-size: 12px; }
.zonas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.zonas .zona { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.zonas .zona input[name=nombre] { width: 90px; }
.zonas .zona input[name=costo] { width: 80px; text-align: right; }
select.sin-zona { border-color: var(--warn-line); background: var(--warn-bg); }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 4px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form input[type=number] { max-width: 140px; }
.ok { color: var(--pos); }
.vacio { color: var(--muted); padding: 20px 0; text-align: center; }
a { color: var(--accent); }
.sin-cuentas > .card, .sin-cuentas > .grid2, .sin-cuentas > .nota { display: none; }
.barra { height: 6px; background: var(--line); border-radius: 3px; margin-top: 3px; min-width: 120px; }
.barra i { display: block; height: 100%; border-radius: 3px; }
.pos-bg { background: var(--pos); } .neg-bg { background: var(--neg); } .warn-txt-bg { background: var(--warn-line); }
.warn-txt { color: var(--warn-line); }
tr.clic { cursor: pointer; }
tr.clic:hover td { background: var(--accent-soft); }
tr.det td { font-size: 12px; color: var(--muted); border-bottom-style: dashed; }
.neg-tag { background: var(--warn-bg); color: var(--neg); }
.ok-tag { background: var(--accent-soft); color: var(--pos); }
#stock-buscar { min-width: 260px; }
.modos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.modos label { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.modos label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 900px) { .modos { grid-template-columns: 1fr; } }
.rep-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.rep-head img { width: 90px; height: 90px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: white; }
#rep-buscar { width: 100%; max-width: 520px; margin-bottom: 10px; }
.tabla-wrap.falt { max-height: 420px; overflow-y: auto; }
#falt-buscar { min-width: 260px; }
.cta-falta { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 0 0 0 6px; margin: 1px 0; font-size: 12px; }
.cta-falta .link { color: var(--muted); padding: 0 5px; }
.cta-falta .link:hover { color: var(--neg); }

/* Revisar descripciones de Tiendanube */
.desc-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.desc-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.desc-head img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.desc-head .nombre { font-weight: 600; flex: 1; min-width: 200px; }
.desc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.desc-grid h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.desc-grid iframe { width: 100%; height: 320px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.desc-vacia { height: 320px; border: 1px dashed var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }
.desc-acciones { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .desc-grid { grid-template-columns: 1fr; } }

/* Indicador de productos sin marca */
.marca-wrap { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.marca-num .v { font-size: 38px; font-weight: 700; line-height: 1; }
.marca-num .s { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 260px; }
.marca-meses { display: flex; gap: 10px; align-items: flex-end; flex: 1; min-width: 280px; }
.marca-mes { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.marca-mes .barra { height: 70px; display: flex; align-items: flex-end; background: var(--line); border-radius: 4px; overflow: hidden; margin: 4px 0; }
.marca-mes .barra i { display: block; width: 100%; background: var(--accent); }
.marca-mes b { color: var(--text, inherit); font-size: 13px; }
#marca-det summary { cursor: pointer; color: var(--accent); margin: 8px 0; }

/* Mensajes */
.globo { background: #e5484d; color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; margin-left: 2px; }
.msj { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.msj img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 6px; flex: none; }
.msj-cuerpo { flex: 1; min-width: 0; }
.msj-cab .nota { margin: 0 0 0 6px; }
.msj-texto { font-size: 15px; margin: 8px 0; }
.msj textarea { width: 100%; box-sizing: border-box; background: transparent; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: inherit; resize: vertical; }
.msj-botones { margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msj-botones .nota { margin: 0; }
.msj-hilo p { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: var(--line); max-width: 80%; }
.msj-hilo p.mio { margin-left: auto; background: var(--accent-soft); }

/* Celular: el menú pasa a una fila que se desliza de costado, y se achican márgenes para que el contenido no quede apretado */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .top { padding: 8px 12px; gap: 6px 10px; flex-wrap: wrap; }
  .brand { font-size: 15px; flex: 1; }
  #btn-sync { padding: 5px 10px; font-size: 13px; }
  .top nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px; margin: 0 -12px; padding: 0 12px 2px; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; padding: 6px 10px; }
  main { padding: 12px 12px 48px; }
  .card { padding: 12px; border-radius: 8px; }
  h2 { font-size: 16px; line-height: 1.3; }
  .kpis { gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .v { font-size: 19px; }
  .filtros { gap: 8px; }
  .filtros > *, .filtros label, .filtros input, .filtros select { min-width: 0; }
  .filtros input[type=search], #stock-buscar, #falt-buscar, #buscar-prod, #rep-buscar { min-width: 0; width: 100%; max-width: none; flex: 1 1 100%; }
  .presets { width: 100%; }
  .pegar { flex-wrap: wrap; }
  .pegar input { flex: 1 1 100%; }
  .rep-head { flex-wrap: wrap; }
  td.prod { min-width: 180px; max-width: none; }
  th, td { padding: 6px; }
  .tabla-wrap { margin: 0 -12px; padding: 0 12px; }
  .chart { height: 140px; }
  .marca-meses { min-width: 0; }
  .msj img { width: 48px; height: 48px; }
  .msj-hilo p { max-width: 92%; }
  .importar label.btn { width: 100%; text-align: center; }
  dialog { padding: 14px; }
}

/* Menú agrupado (public/menu.js) */
nav.menu { align-items: center; }
nav.menu .menu-btn { background: transparent; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-weight: 500; }
nav.menu .menu-btn:hover, nav.menu .menu-grupo.abierto .menu-btn { background: var(--accent-soft); color: var(--accent); }
nav.menu .menu-grupo.actual .menu-btn { color: var(--accent); font-weight: 600; }
nav.menu .menu-btn .flecha { font-size: 10px; opacity: .7; }
nav.menu .menu-lista { display: none; position: fixed; z-index: 50; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
nav.menu .menu-grupo.abierto .menu-lista { display: block; }
nav.menu .menu-lista a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); white-space: nowrap; }
nav.menu .menu-lista a:hover { background: var(--accent-soft); }
nav.menu .menu-lista a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
nav.menu .menu-solo { font-weight: 500; }
@media (max-width: 720px) { nav.menu .menu-btn { white-space: nowrap; padding: 6px 10px; } }

/* Foto chica del producto en las tablas */
.conimg { display: flex; gap: 10px; align-items: center; }
.conimg .mini { width: 44px; height: 44px; flex: none; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
span.mini { display: inline-block; background: var(--bg); }

/* ===== Estilo unificado (aplica a todas las pantallas) ===== */
:root { --radio: 12px; --sombra: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06); --hover: rgba(45,91,215,.06); }
:root[data-theme="dark"] { --sombra: none; --hover: rgba(124,156,245,.08); }
body { -webkit-font-smoothing: antialiased; }
.top { box-shadow: var(--sombra); }
.brand { letter-spacing: -.2px; }
.card { border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px 20px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
h3 { font-size: 15px; }
p { margin: 8px 0; }

/* Botones: principal, ghost y link con estados */
button, .btn { transition: background .15s, border-color .15s, opacity .15s; font-weight: 500; }
button:hover:not(:disabled), .btn:hover { filter: brightness(1.06); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
button.ghost:hover:not(:disabled) { background: var(--hover); border-color: var(--accent); filter: none; }
button.link, .link { background: none; border: 0; color: var(--accent); padding: 0 4px; filter: none; }
button.link:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Campos */
input, select, textarea { transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -3px; }
input[type=search] { min-height: 36px; }

/* Tablas: encabezado fijo, fila resaltada al pasar */
.tabla-wrap { border-radius: 8px; }
th { background: var(--card); position: sticky; top: 0; z-index: 1; text-transform: none; letter-spacing: .1px; }
tbody tr:hover td, table tr:not(:first-child):hover td { background: var(--hover); }
td { vertical-align: middle; }

/* Etiquetas tipo píldora */
.tag { border-radius: 999px; padding: 2px 8px; font-weight: 500; }
.nota { line-height: 1.5; }
.pos { font-weight: 500; } .neg { font-weight: 500; }

@media (max-width: 720px) {
  .card { padding: 14px; border-radius: 10px; }
  h2 { font-size: 16px; }
  button, .btn { padding: 8px 14px; }
  input, select { min-height: 38px; }
  input[type=checkbox], input[type=radio] { min-height: 0; }
}

/* Contadores del encabezado */
.contadores { display: flex; gap: 6px; align-items: center; }
.contador { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.contador b { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.contador.rojo { background: rgba(229,72,77,.12); color: var(--neg); }
.contador.rojo b { background: #e5484d; }
.contador.cero { opacity: .55; }
.contador.cero b { background: var(--muted); }
@media (max-width: 720px) { .contadores { order: 2; width: 100%; overflow-x: auto; } .contador { font-size: 12px; padding: 4px 8px; } }

/* Panel "Para hacer hoy" */
.hoy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.hoy-t { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: var(--text); border: 1px solid transparent; transition: transform .1s, border-color .15s; }
.hoy-t:hover { transform: translateY(-1px); border-color: var(--line); }
.hoy-t b { font-size: 26px; line-height: 1.1; }
.hoy-t span { font-size: 13px; color: var(--muted); }
.hoy-t.cero { opacity: .5; }
.hoy-t.amarillo { background: rgba(245,194,107,.22); }
.hoy-t.violeta { background: rgba(167,139,250,.20); }
.hoy-t.verde { background: rgba(74,222,128,.18); }
.hoy-t.rojo { background: rgba(248,113,113,.18); }
.hoy-t.naranja { background: rgba(251,146,60,.20); }
.hoy-t.azul { background: rgba(96,165,250,.18); }

/* ===== Menú lateral (compu, desde 900 px) — en el celular sigue arriba con desplegables ===== */
nav.menu .ico { width: 18px; height: 18px; flex: none; }
.side-brand { display: none; }
@media (max-width: 899px) { nav.menu .ico { display: none; } }
@media (min-width: 900px) {
  :root { --side: 232px; --side-bg: #15203b; --side-txt: #b9c3d8; }
  body { padding-left: var(--side); }
  .top { justify-content: flex-end; }
  .top .brand { display: none; }
  nav.menu { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); flex: none; flex-direction: column; align-items: stretch; flex-wrap: nowrap;
    gap: 2px; background: var(--side-bg); padding: 14px 10px 24px; overflow-y: auto; z-index: 20; }
  .side-brand { display: block; color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; padding: 6px 10px 18px; letter-spacing: -.3px; }
  .side-brand span { display: block; font-weight: 400; font-size: 12px; color: var(--side-txt); }
  nav.menu .menu-grupo { width: 100%; }
  nav.menu .menu-btn, nav.menu .menu-solo { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--side-txt); background: transparent;
    padding: 9px 10px; border-radius: 8px; font-weight: 500; text-decoration: none; }
  nav.menu .menu-btn .flecha { margin-left: auto; transition: transform .15s; }
  nav.menu .menu-grupo.cerrado .menu-btn .flecha { transform: rotate(-90deg); }
  nav.menu .menu-btn:hover, nav.menu .menu-solo:hover { background: rgba(255,255,255,.06); color: #fff; filter: none; }
  nav.menu .menu-grupo.actual .menu-btn, nav.menu .menu-solo.active { color: #fff; }
  nav.menu .menu-grupo.abierto .menu-btn { background: transparent; color: #fff; }
  nav.menu .menu-lista { display: block; position: static; min-width: 0; background: transparent; border: 0; box-shadow: none; padding: 2px 0 8px 28px; }
  nav.menu .menu-grupo.cerrado .menu-lista { display: none; }
  nav.menu .menu-lista a { color: var(--side-txt); padding: 7px 10px; font-size: 13.5px; white-space: normal; }
  nav.menu .menu-lista a:hover { background: rgba(255,255,255,.06); color: #fff; }
  nav.menu .menu-lista a.active { background: rgba(124,156,245,.18); color: #fff; font-weight: 600; }
}

/* ===== Estilo tipo Ecomm: fondo claro, menú azul, tarjetas blancas, tipografía Poppins ===== */
body { font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; }
h1, h2, h3, .kpi .v, .hoy-t b, .brand { font-family: "Poppins", system-ui, sans-serif; }
h2 { font-weight: 600; color: var(--text); }
.top { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(31,37,65,.06); }
.card, .kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 6px rgba(31,37,65,.05); }
.kpi .t { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .v { font-weight: 600; font-size: 23px; color: var(--text); }
.kpi.main { border: 1.5px solid var(--accent); box-shadow: 0 2px 10px rgba(49,87,213,.12); }
button, .btn { border-radius: 8px; font-weight: 500; }
button.ghost { background: #fff; }
.presets button { border-radius: 8px; background: #fff; }
.presets button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
input, select, textarea { border-radius: 8px; background: #fff; }
th { background: #f7f8fc; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.tag { background: var(--accent-soft); }

/* Contadores del encabezado */
.contador { background: var(--accent-soft); color: var(--accent); }
.contador.cero { opacity: .6; }

/* "Para hacer hoy": tarjetas de color con el número en el tono de la tarjeta */
.hoy-t { border: 1px solid transparent; }
.hoy-t span { color: #4b5170; }
.hoy-t.cero { opacity: .45; }
.hoy-t.amarillo { background: #fff6dc; } .hoy-t.amarillo b { color: #b7791f; }
.hoy-t.violeta { background: #efe9ff; } .hoy-t.violeta b { color: #6d48d6; }
.hoy-t.verde { background: #e3f7ea; } .hoy-t.verde b { color: #15803d; }
.hoy-t.rojo { background: #fde8e8; } .hoy-t.rojo b { color: #c62828; }
.hoy-t.naranja { background: #ffeedd; } .hoy-t.naranja b { color: #c2570c; }
.hoy-t.azul { background: #e5efff; } .hoy-t.azul b { color: #2a56c6; }

/* Menú lateral azul como Ecomm */
@media (min-width: 900px) {
  :root { --side: 236px; --side-bg: linear-gradient(180deg, #3047b8 0%, #2a3c9e 55%, #24338a 100%); --side-txt: rgba(255,255,255,.82); }
  nav.menu { background: var(--side-bg); box-shadow: 2px 0 8px rgba(31,37,65,.12); }
  .side-brand { font-size: 20px; padding: 8px 12px 20px; }
  .side-brand span { color: rgba(255,255,255,.7); }
  nav.menu .menu-btn, nav.menu .menu-solo { color: #fff; font-weight: 500; }
  nav.menu .menu-btn:hover, nav.menu .menu-solo:hover, nav.menu .menu-lista a:hover { background: rgba(255,255,255,.12); color: #fff; }
  nav.menu .menu-lista { padding-left: 30px; }
  nav.menu .menu-lista a { color: var(--side-txt); border-radius: 8px; }
  nav.menu .menu-lista a.active, nav.menu .menu-solo.active { background: #fff; color: #2a3c9e; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
  nav.menu .globo { background: #ef4444; color: #fff; }
}
/* En el celular el menú de arriba también va azul */
@media (max-width: 899px) {
  .top { background: linear-gradient(90deg, #3047b8, #2a3c9e); border-bottom: 0; }
  .top .brand { color: #fff; }
  nav.menu .menu-btn, nav.menu .menu-solo { color: #fff; background: transparent; }
  .contador { background: rgba(255,255,255,.18); color: #fff; }
  .contador b { background: #fff; color: #2a3c9e; }
}
