/* Farmacia La Ceiba — estilo "libro contable sin color": el marco no lleva color; el azul va solo en el dato principal. */
:root {
  --ground: #f2f4f7; --surface: #ffffff; --raised: #eef0f3; --active: #e6e9ee;
  --border: #e1e4e9; --rule: #eef0f3; --control: #cfd4dc;
  --text: #0a0a0a; --muted: #5d6470; --faint: #666d79;
  --accent: #1d5fbf; --primary: #141414; --primary-ink: #ffffff;
  --positive: #2e7d32; --negative: #c4242a; --warning: #92400e;
  --chart-1: #1d5fbf; --chart-2: #8a8f98; --chart-muted: #c9ced6; --grid: #e6e9ee;
  --pill-neutral-bg: #eef0f3; --pill-neutral-ink: #3d424b;
  --pill-accent-bg: #e8f0fb; --pill-accent-ink: #123f80;
  --radius-card: 8px; --radius-control: 6px; --row-height: 44px;
  --sidebar-width: 240px; --gap: 12px; --pad: 32px; --card-pad: 20px; --control-height: 36px;
  --fs-title: 24px; --fs-section: 16px; --fs-kpi: 30px; --fs-body: 14px; --fs-small: 12px;
  --font: "Geist", Inter, system-ui, sans-serif;
}
.sidebar { border-right: 1px solid var(--border); }
.kpi-value { font-weight: 700; }
.kpi-value.plain { font-weight: 500; }

/* Inicio */
#g-inicio { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c7 { grid-column: span 7; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c12 { grid-column: 1 / -1; } .c8 { grid-column: span 8; } .c4 { grid-column: span 4; }

/* la línea de vencimiento de cada lote: dónde cae dentro de los próximos 90 días */
.vence { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; align-items: baseline; }
.vence + .vence { border-top: 1px solid var(--rule); }
.vence .t { height: 4px; border-radius: 2px; background: var(--raised); grid-column: 1 / -1; position: relative; }
.vence .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--chart-2); }
.vence.urge .t i { background: var(--negative); }
.vence .t::after { content: ""; position: absolute; left: 33.33%; top: -2px; bottom: -2px; width: 1px; background: var(--control); }
.eje { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-top: 4px; }

/* Vender */
#g-vender { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--gap); align-items: start; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cats button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--control); background: var(--surface); cursor: pointer; font-size: 13px; }
.cats button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.modo { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--raised); }
.modo button { height: 28px; padding: 0 8px; white-space: nowrap; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--muted); font-size: 13px; }
.modo button[aria-pressed="true"] { background: var(--surface); color: var(--text); outline: 1px solid var(--border); }
.vuelto { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: var(--radius-control); background: var(--raised); font-variant-numeric: tabular-nums; }
.vuelto b { font-size: 20px; font-weight: 700; }
@media (max-width: 1100px) { #g-vender { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  #cobrarBar { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); background: var(--surface); margin: 0 calc(var(--card-pad) * -1) calc(var(--card-pad) * -1); padding: 12px var(--card-pad); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-card) var(--radius-card); }
}
@media (max-width: 860px) { .modo button { height: 36px; } }
@media (max-width: 860px) { :root { --fs-small: 13px; } }
