[hidden] { display: none !important; }
/* Layout: barra lateral fija con navegación por rol + área de trabajo; en móvil la nav pasa arriba y se desplaza. */
:root {
  /* marca Farmacias Grassi: azul #0055B8 + verde #71A850 */
  --bg: #f3f5f9; --surface: #ffffff; --sunk: #e9edf4; --fg: #141b2b; --muted: #5a6478; --line: #d8dee8; --grid: #e5e9f0;
  --accent: #0055b8; --accent-ink: #ffffff; --accent-soft: #e1ebf8;
  --brand-green: #71a850; --brand-green-ink: #3f7a24;
  --ok: #2f7d32; --ok-soft: #e2f1df; --warn: #9a6400; --warn-soft: #fbefd6; --bad: #b0412e; --bad-soft: #f8e3df;
  --info: #2f5f9e; --info-soft: #e1eaf6; --done: #4f5869; --done-soft: #e8ebf0;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151e; --surface: #171e2a; --sunk: #1f2836; --fg: #e8edf5; --muted: #9aa6ba; --line: #2a3446; --grid: #232c3b;
    --accent: #5b9cf0; --accent-ink: #0b1424; --accent-soft: #1a2c47;
    --brand-green: #8cc468; --brand-green-ink: #8cc468;
    --ok: #7cc77f; --ok-soft: #1c3322; --warn: #e3ad4c; --warn-soft: #3a2e15; --bad: #ec8a76; --bad-soft: #3d221d;
    --info: #85aee6; --info-soft: #1d2b40; --done: #b3bcc9; --done-soft: #262e3b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10151e; --surface: #171e2a; --sunk: #1f2836; --fg: #e8edf5; --muted: #9aa6ba; --line: #2a3446; --grid: #232c3b;
  --accent: #5b9cf0; --accent-ink: #0b1424; --accent-soft: #1a2c47;
  --brand-green: #8cc468; --brand-green-ink: #8cc468;
  --ok: #7cc77f; --ok-soft: #1c3322; --warn: #e3ad4c; --warn-soft: #3a2e15; --bad: #ec8a76; --bad-soft: #3d221d;
  --info: #85aee6; --info-soft: #1d2b40; --done: #b3bcc9; --done-soft: #262e3b;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 700; }
h2 { font-size: 1.08rem; font-weight: 650; }
h3 { font-size: 1rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.strong { font-weight: 650; }
.eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
input:disabled { background: var(--sunk); color: var(--muted); }

/* barra demo */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--fg); color: var(--bg); font-size: 0.85rem;
  padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.demo-tag { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid currentColor; padding: 1px 6px; border-radius: 4px; }
.demo-who { display: flex; align-items: center; gap: 8px; }
.demo-who select { width: auto; padding: 3px 8px; background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.demo-who option { color: var(--fg); background: var(--surface); }
.demo-bar .link { color: var(--bg); }

/* shell */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100% - 38px); }
.side { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-iso { width: 34px; height: 34px; border-radius: 8px; display: none; }
.brand-logo { display: flex; flex-direction: column; gap: 6px; padding: 2px 8px 0; }
.brand-logo img { width: 132px; height: auto; display: block; }
.brand-app { font: 600 0.72rem var(--f-body); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand-green-ink); }
/* logo de color en claro, versión blanca en oscuro */
.logo-oscuro { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-claro { display: none !important; } :root:not([data-theme="light"]) .logo-oscuro { display: block !important; } }
:root[data-theme="dark"] .logo-claro { display: none !important; } :root[data-theme="dark"] .logo-oscuro { display: block !important; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--fg); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: var(--sunk); }
.nav-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.badge { min-width: 22px; text-align: center; font: 600 0.75rem var(--f-mono); background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 1px 6px; }
.who { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.who small { color: var(--muted); }
.who-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: 0.85rem; }
.main { min-width: 0; padding-block: 28px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.main > * { max-width: 1180px; margin-inline: auto; }
.loading { color: var(--muted); padding: 40px 0; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; height: auto; overflow: visible; flex-direction: row; align-items: center; gap: 12px; padding: 10px 0 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-logo, .who { display: none; }
  .brand-iso { display: block; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-right: 16px; }
  .nav-item { white-space: nowrap; }
  .main { padding-block: 20px 48px; }
  .hide-sm { display: none; }
}

/* vistas */
.view { display: flex; flex-direction: column; gap: 22px; }
.view-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.view-head > div { display: flex; flex-direction: column; gap: 4px; max-width: 70ch; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.toolbar > input[type=search] { max-width: 320px; }
.filters { justify-content: flex-start; }
.filters select { width: auto; min-width: 180px; }
.block { display: flex; flex-direction: column; gap: 12px; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.notice { background: var(--warn-soft); color: var(--fg); border-left: 3px solid var(--warn); padding: 10px 12px; border-radius: 0 6px 6px 0; }
.note { background: var(--sunk); padding: 10px 12px; border-radius: 6px; }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; color: var(--muted); }
.empty strong { color: var(--fg); font-family: var(--f-display); font-size: 1.05rem; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.hint { color: var(--muted); font-size: 0.78rem; }
.readonly { padding: 8px 10px; border-radius: 6px; background: var(--sunk); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; }
a.btn { color: var(--fg); text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost-bad { color: var(--bad); }
.btn.block { width: 100%; padding-block: 11px; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 0.88rem; align-self: flex-start; }
.icon-btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1rem; line-height: 1; flex: none; }
.icon-btn:hover { background: var(--sunk); }

.pill { display: inline-block; font-size: 0.74rem; font-weight: 650; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); } .pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); } .pill-info { background: var(--info-soft); color: var(--info); }
.pill-done { background: var(--done-soft); color: var(--done); } .pill-muted { background: var(--sunk); color: var(--muted); }
.chip { font: 600 0.72rem var(--f-mono); padding: 1px 7px; border-radius: 4px; background: var(--sunk); color: var(--muted); }
.flag { display: inline-block; margin: 4px 6px 0 0; font-size: 0.74rem; font-weight: 600; color: var(--warn); background: var(--warn-soft); padding: 1px 7px; border-radius: 4px; }
.motivo { display: block; color: var(--muted); font-size: 0.8rem; }

.tabs { display: flex; gap: 4px; background: var(--sunk); padding: 3px; border-radius: 8px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.tab.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.tab-count { font: 600 0.72rem var(--f-mono); color: var(--muted); }

/* tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tbl th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--sunk); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { border-top: 1px solid var(--line); font-weight: 700; background: var(--sunk); }
.tbl .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.hover tbody tr { cursor: pointer; }
.tbl.hover tbody tr:hover { background: var(--sunk); }
.num-input { width: 96px; text-align: right; font-family: var(--f-mono); padding: 5px 8px; }

/* solicitar */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.split-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.resumen { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.resumen-body { display: flex; flex-direction: column; gap: 10px; }
.resumen-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; }
.resumen-list li { display: flex; justify-content: space-between; gap: 8px; }
.resumen-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.resumen-total strong { font-size: 1.2rem; }
.catalogo { display: flex; flex-direction: column; gap: 10px; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cat summary { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; font: 650 1rem var(--f-display); list-style: none; }
.cat summary::-webkit-details-marker { display: none; }
.cat summary .muted { font: 500 0.82rem var(--f-body); }
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); border-top: 1px solid var(--line); }
.prod { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--grid); }
.prod.on { background: var(--accent-soft); }
.prod-name { display: flex; flex-direction: column; min-width: 0; }
.prod-name small { color: var(--muted); font-size: 0.78rem; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper input { width: 52px; text-align: center; padding: 5px 4px; font-family: var(--f-mono); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .resumen { position: static; } }

/* tarjetas de solicitudes */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 12px 14px; background: none; border: 0; text-align: left; cursor: pointer; }
.card-main { display: flex; flex-direction: column; min-width: 0; }
.card-detail { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) { .card-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; } }

/* auditoría */
.audit { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
.queue-wrap { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.queue-item { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.queue-item.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.queue-top { display: flex; justify-content: space-between; gap: 8px; }
.audit-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.audit-panel .table-wrap { border-radius: 6px; }
.audit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.audit-tbl tr[data-st="ajustado"] { background: var(--warn-soft); }
.audit-tbl tr[data-st="rechazado"] { background: var(--bad-soft); }
.audit-tbl tr[data-st="rechazado"] td:first-child > div { text-decoration: line-through; }
.apr { display: inline-flex; gap: 4px; align-items: center; }
.apr input { width: 64px; text-align: right; font-family: var(--f-mono); padding: 5px 6px; }
.mini { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); cursor: pointer; color: var(--ok); font-weight: 700; }
.mini.bad { color: var(--bad); }
.motivo-input { margin-top: 6px; font-size: 0.85rem; padding: 5px 8px; }
.audit-foot { display: flex; flex-direction: column; gap: 10px; }
.audit-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.audit-actions strong { font-size: 1.15rem; margin-left: 6px; }
@media (max-width: 860px) { .audit { grid-template-columns: minmax(0, 1fr); } .queue-wrap { position: static; max-height: none; } .queue { flex-direction: row; overflow-x: auto; } .queue-item { min-width: 200px; } }

/* compras */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tile-num { font-size: 1.25rem; font-weight: 600; margin-top: 4px; }
.oc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.reparto summary { cursor: pointer; font-weight: 600; }
.reparto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.reparto ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 0.85rem; }
.reparto li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--line); padding: 2px 0; }

.ocdoc { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); }
.ocdoc-head { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 2px solid var(--accent); padding-bottom: 14px; }
.ocdoc-head::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 64px; height: 4px; border-radius: 2px; background: var(--brand-green); }
.ocdoc-head h3 { font-size: 1.2rem; }
.ocdoc-logo img { width: 150px; height: auto; display: block; }
.ocdoc-titulo { text-align: right; display: flex; flex-direction: column; gap: 1px; }
.ocdoc-tipo { font: 700 1.05rem var(--f-display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.ocdoc-num { font-size: 1.05rem; font-weight: 600; }
.ocdoc-titulo .muted { font-size: 0.85rem; }
.ocdoc-sub { font-size: 0.9rem; color: var(--muted); }
.ocdoc-sub strong { color: var(--fg); }
.ocdoc .tbl thead th { background: var(--accent); color: var(--accent-ink); }
.ocdoc .eyebrow { color: var(--accent); }
.ocdoc-meta { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 0.88rem; }
.ocdoc-meta dt, .ocdoc-foot dt { color: var(--muted); }
.ocdoc-meta dd, .ocdoc-foot dd { margin: 0; }
.ocdoc-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; font-size: 0.9rem; }
.ocdoc-foot { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; font-size: 0.9rem; }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.kpi-val { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.02em; }
.kpi small { color: var(--muted); font-size: 0.8rem; }
.kpi-warn { box-shadow: inset 0 -3px 0 var(--warn); } .kpi-good { box-shadow: inset 0 -3px 0 var(--ok); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card > select { max-width: 340px; }
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 300px; }
@media (max-width: 860px) { .charts { grid-template-columns: minmax(0, 1fr); } }

/* modal y avisos */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgb(10 18 15 / 0.45); display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--bg); border-radius: 10px; box-shadow: 0 20px 50px rgb(0 0 0 / 0.25); }
.modal-wide { width: min(920px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; overflow-y: auto; min-height: 0; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
#toasts { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100% - 32px)); }
.toast { background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 20px rgb(0 0 0 / 0.2); border-left: 4px solid var(--ok); transition: opacity 0.4s, transform 0.4s; }
.toast-bad { border-left-color: var(--bad); } .toast-warn { border-left-color: var(--warn); }
.toast.out { opacity: 0; transform: translateY(6px); }

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; padding-block: 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(1100px 520px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 2px rgb(15 30 60 / 0.06), 0 12px 32px rgb(15 30 60 / 0.08); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 0 6px; }
.login-logo img { width: 190px; max-width: 70%; height: auto; }
.login-logo .brand-app { font-size: 0.78rem; }
.login-logo::after { content: ''; width: 44px; height: 3px; border-radius: 2px; background: var(--brand-green); margin-top: 2px; }
/* animación de entrada: el logo aparece y después el formulario */
.login-logo { animation: logo-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.login-logo::after { animation: barra-in 0.5s 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; transform-origin: center; }
.login-card > :not(.login-logo), .creditos { animation: sube 0.5s 0.35s ease-out both; }
@keyframes logo-in { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes barra-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sube { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* OC: facturar a y entregas por dirección */
.ocdoc-facturar { background: var(--accent-soft); border-radius: 6px; padding: 10px 12px; border-left: 3px solid var(--accent); }
.ocdoc-entregas { display: flex; flex-direction: column; gap: 8px; }
.entregas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.entrega { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; }
.entrega ul { list-style: none; margin: 6px 0 0; padding: 0; }
.entrega li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--line); padding: 2px 0; }

/* Facturas */
.factura-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.visor { border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); min-height: 420px; display: grid; place-items: center; overflow: hidden; }
.visor iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
.visor img { max-width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.meta-mail { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.control-oc { display: flex; flex-direction: column; gap: 6px; }
.aviso { padding: 8px 10px; border-radius: 6px; font-size: 0.86rem; border-left: 3px solid; }
.aviso-ok { background: var(--ok-soft); border-color: var(--ok); } .aviso-warn { background: var(--warn-soft); border-color: var(--warn); }
.aviso-bad { background: var(--bad-soft); border-color: var(--bad); } .aviso-muted { background: var(--sunk); border-color: var(--line); color: var(--muted); }
.archivo { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); word-break: break-all; }
@media (max-width: 860px) { .factura-layout { grid-template-columns: minmax(0, 1fr); } .visor iframe { height: 50vh; } }

/* recepción por sucursal */
.recepcion-block { border: 1px solid var(--line); border-left: 4px solid var(--brand-green); border-radius: var(--r); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.recepcion-block .block-head { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rec-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--surface); }
.rec-item.pendiente { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.rec-item > div { min-width: 0; flex: 1 1 260px; }
.rec-hechas summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.recepcion-oc { border-top: 1px solid var(--line); padding-top: 12px; }
.recepcion-oc .block-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
tr.fila-dif td { background: var(--warn-soft); }

/* fotos de insumos */
.thumb { flex: none; width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); padding: 0; overflow: hidden; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 1.1rem; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.vacia { background: var(--sunk); border-style: dashed; cursor: default; }
button.thumb.vacia { cursor: pointer; }
button.thumb.vacia:hover { border-color: var(--accent); color: var(--accent); }
.prod-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prod-cell { display: inline-flex; align-items: center; gap: 10px; }
.foto-prev { width: 100%; aspect-ratio: 4 / 3; max-height: 320px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); display: grid; place-items: center; overflow: hidden; }
.foto-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.foto-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.foto-grande img { width: 100%; max-height: 60vh; object-fit: contain; background: #fff; border-radius: var(--r); }
.foto-grande { display: flex; flex-direction: column; gap: 8px; }

/* pedido urgente */
.urgente-box { border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.urgente-box.on { border-style: solid; border-color: var(--bad); background: var(--bad-soft); }
.urgente-box .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.urgente-box .check input { flex: none; accent-color: var(--bad); }
.tag-urg { margin-left: 8px; font-size: 0.68rem; vertical-align: middle; }

/* selector de tema */
.tema-sel { display: inline-flex; gap: 2px; padding: 2px; margin: 8px 0 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); align-self: flex-start; }
.tema-sel button { border: 0; background: transparent; color: var(--muted); font: 600 0.74rem var(--f-body); padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.tema-sel button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }

/* links de compra (Mercado Libre, etc.) */
.link-compra { color: var(--accent); font-weight: 600; font-size: 0.78rem; text-decoration: none; white-space: nowrap; }
.link-compra:hover { text-decoration: underline; }
.links-compra { border: 1px solid var(--line); border-left: 4px solid #ffe600; border-radius: var(--r); padding: 10px 14px; }
.links-compra ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.links-compra li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.9rem; }

/* ---------- carrito (logo) ---------- */
.carrito { display: inline-flex; flex: none; color: var(--accent); }
.carrito svg { width: 100%; height: auto; display: block; overflow: visible; }
.carrito.mini { width: 20px; }
.brand-app { display: inline-flex; align-items: center; gap: 6px; }
.solo-movil { display: none; }
.login-sub { gap: 8px; }
.carrito.llega { width: 38px; animation: carrito-llega 1.1s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; transform-origin: 40% 90%; }
.login-logo:hover .carrito.llega { animation: carrito-baila 0.6s ease-in-out; }
@keyframes carrito-llega { 0% { opacity: 0; transform: translateX(-110px); } 55% { opacity: 1; transform: translateX(6px) rotate(-7deg); } 75% { transform: translateX(-2px) rotate(3deg); } 100% { transform: none; } }
@keyframes carrito-baila { 0%, 100% { transform: none; } 30% { transform: rotate(-8deg) translateY(-2px); } 65% { transform: rotate(5deg); } }
@media (max-width: 860px) { .carrito.solo-movil { display: inline-flex; width: 30px; margin-left: -4px; } }

/* ---------- súper: encabezado con toldo ---------- */
.super-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.toldo { height: 30px; background: repeating-linear-gradient(90deg, var(--accent) 0 28px, var(--brand-green) 28px 56px);
  -webkit-mask: radial-gradient(circle at 14px 16px, #000 14px, transparent 14.5px) 0 100% / 28px 30px repeat-x, linear-gradient(#000 0 0) 0 0 / 100% 16px no-repeat;
  mask: radial-gradient(circle at 14px 16px, #000 14px, transparent 14.5px) 0 100% / 28px 30px repeat-x, linear-gradient(#000 0 0) 0 0 / 100% 16px no-repeat; }
.super-cartel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 6px 20px 18px; }
.super-cartel > div { display: flex; flex-direction: column; gap: 4px; max-width: 70ch; }
.super-cartel h1 { color: var(--accent); }
.buscador { position: relative; }
.buscador > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.buscador input { padding: 11px 12px 11px 38px; font-size: 1rem; border-radius: 999px; }

/* pasillos */
.pasillos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pasillo-btn { position: relative; display: flex; align-items: center; gap: 8px; flex: none; padding: 7px 12px 7px 8px; border-radius: 8px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-left: 4px solid var(--g); background: var(--surface); color: var(--fg); }
.pasillo-btn:hover { background: color-mix(in srgb, var(--g) 10%, var(--surface)); }
.pasillo-emoji { font-size: 1.3rem; }
.pasillo-txt { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 0.88rem; }
.pasillo-txt small { font: 600 0.66rem var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--g); }
:root[data-theme="dark"] .pasillo-txt small { color: color-mix(in srgb, var(--g) 50%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pasillo-txt small { color: color-mix(in srgb, var(--g) 50%, #fff); } }
.pasillo-n { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--g); color: #fff; font: 700 0.72rem/20px var(--f-mono); text-align: center; }

/* góndolas y estantes */
.gondolas { display: flex; flex-direction: column; gap: 22px; }
.gondola { scroll-margin-top: 80px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(circle, color-mix(in srgb, var(--fg) 9%, transparent) 1.2px, transparent 1.6px) 0 0 / 16px 16px, var(--sunk); }
.gondola-cartel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 16px; background: var(--g); color: #fff; }
.gondola-cartel h2 { font-size: 1.15rem; color: #fff; }
.gondola-cartel small { margin-left: auto; opacity: 0.85; font-size: 0.8rem; }
.gondola-num { font: 700 0.7rem var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; background: #fff; color: var(--g); padding: 2px 8px; border-radius: 4px; }
.estantes { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); column-gap: 16px; row-gap: 34px; padding: 18px 16px 34px; }
.producto { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 8px 8px 0 0; transition: transform 0.15s, box-shadow 0.15s; }
.producto:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgb(15 30 60 / 0.10); }
/* el estante: una tabla bajo cada producto que se une con la del vecino */
.producto::after { content: ''; position: absolute; left: -9px; right: -9px; bottom: -14px; height: 14px; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--fg) 14%, var(--surface)) 0 4px, var(--g) 4px 100%); box-shadow: 0 5px 8px rgb(0 0 0 / 0.12); }
.producto.on { box-shadow: inset 0 3px 0 var(--g); border-color: color-mix(in srgb, var(--g) 55%, var(--line)); }
.pack { display: grid; place-items: center; height: 92px; border-radius: 6px; border: 0; padding: 0; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--g) 18%, var(--surface)), color-mix(in srgb, var(--g) 7%, var(--surface))); }
.pack span { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.15)); transition: transform 0.2s; }
.producto:hover .pack span { transform: scale(1.1) rotate(-4deg); }
.pack.foto { cursor: zoom-in; background: #fff; }
.pack.foto img { width: 100%; height: 100%; object-fit: contain; }
.producto-nombre { display: flex; flex-direction: column; gap: 1px; min-height: 3.1em; }
.producto-nombre strong { font-weight: 600; font-size: 0.9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.producto-nombre small { color: var(--muted); font-size: 0.76rem; }
.prod-accion { margin-top: auto; min-height: 34px; display: flex; }
.prod-accion .stepper { width: 100%; justify-content: space-between; }
.prod-accion .stepper input { flex: 1; width: auto; }
.btn-agregar { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-weight: 650;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-agregar:hover { background: var(--accent); color: var(--accent-ink); }
.btn-agregar:hover .carrito { color: var(--accent-ink); }
.etiqueta-precio { position: absolute; z-index: 1; left: 8px; bottom: -19px; font: 700 0.72rem var(--f-mono); padding: 1px 7px; border-radius: 3px;
  background: #ffd84a; color: #2b2300; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transform: rotate(-2deg); }

/* carrito (resumen) como ticket */
.carrito-head { display: flex; align-items: center; gap: 12px; }
.cart-wrap { position: relative; display: inline-flex; }
.carrito.cart-aside { width: 46px; }
.cart-count:not(:empty) { position: absolute; top: -8px; right: -10px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: var(--brand-green); color: #fff; font: 700 0.74rem/21px var(--f-mono); text-align: center; }
.ticket-list { list-style: none; margin: 0; padding: 10px 0; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem;
  border-top: 2px dashed var(--line); }
.ticket-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 22px; align-items: center; gap: 6px; }
.ticket-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-quitar { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--sunk); color: var(--muted); cursor: pointer; line-height: 1; }
.ticket-quitar:hover { background: var(--bad-soft); color: var(--bad); }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 2px dashed var(--line); padding-top: 10px; font-family: var(--f-mono); font-size: 0.82rem; }
.ticket-total strong { font-size: 1.2rem; }
.carrito-vacio { border-top: 2px dashed var(--line); padding-top: 10px; }
.btn-caja { padding-block: 11px; font-size: 1rem; }
.volando { position: fixed; left: 0; top: 0; z-index: 80; font-size: 30px; pointer-events: none; will-change: transform; }

/* barra del carrito en celular */
.carrito-bar { display: none; }
@media (max-width: 860px) {
  .carrito-bar:not([hidden]) { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 20; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px));
    padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgb(0 0 0 / 0.2); }
  .carrito-bar .carrito { width: 30px; }
  .carrito-bar .btn { margin-left: auto; }
  .super { padding-bottom: 64px; }
  .estantes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); column-gap: 12px; padding-inline: 12px; }
  .producto::after { left: -7px; right: -7px; }
  .super-cartel { padding-inline: 14px; }
}
.badge[hidden] { display: none; }

/* botón de cuenta en el celular (tema, contraseña, salir) */
.cuenta-movil { display: none; }
@media (max-width: 860px) {
  .nav { flex: 1; min-width: 0; }
  .cuenta-movil { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-right: max(16px, env(safe-area-inset-right, 0px));
    border-radius: 50%; border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); font: 700 0.95rem var(--f-display); cursor: pointer; }
  .cuenta-body .tema-sel { align-self: flex-start; }
}

/* ayuda de ingreso (contraseñas las maneja IT), app embebida, aviso fuera de fecha */
.login-ayuda { font-size: 0.86rem; margin: 0; }
.login-ayuda a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.abrir-fuera { margin: 6px 0 2px; font-size: 0.82rem; }
.urgente-aviso { background: var(--bad-soft); border-left-color: var(--bad); }

/* ---------- súper: distribución según el tamaño de pantalla ---------- */
/* el súper usa todo el ancho disponible (en pantallas grandes entran más góndolas por fila) */
.main > .super { max-width: 1640px; }
@media (min-width: 861px) {
  .super .split { grid-template-columns: minmax(0, 1fr) clamp(260px, 22vw, 340px); gap: clamp(14px, 1.6vw, 24px); }
  .super .carrito-panel { top: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; gap: 12px; padding: clamp(12px, 1.2vw, 18px); }
  .super .carrito-panel .ticket-list { max-height: none; }
  .super .estantes { grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 10.5vw, 168px), 1fr)); }
}
/* los pasillos quedan a mano mientras se recorren las góndolas */
.super .pasillos { position: sticky; top: 0; z-index: 4; padding: 8px 0; margin: -8px 0; background: var(--bg); }
.super .gondola { scroll-margin-top: 72px; }

/* notebooks (hasta ~1440 px de ancho): menú lateral más angosto y tarjetas más compactas */
@media (min-width: 861px) and (max-width: 1440px) {
  .shell { grid-template-columns: 196px minmax(0, 1fr); }
  .side { padding-inline: 10px; }
  .brand-logo img { width: 120px; }
  .main { padding-block: 20px 48px; }
  .super { gap: 16px; }
  .super-cartel { padding: 4px 16px 14px; }
  .super-cartel h1 { font-size: 1.5rem; }
  .toldo { height: 24px; }
}
/* pantallas bajas (768–900 px de alto): menos alto por tarjeta para ver más productos */
@media (min-width: 861px) and (max-height: 900px) {
  .super .pack { height: 64px; }
  .super .pack span { font-size: 2rem; }
  .super .producto { padding: 8px 8px 10px; gap: 6px; }
  .super .producto-nombre { min-height: 2.7em; }
  .super .estantes { row-gap: 30px; padding: 14px 14px 30px; }
  .super .gondola-cartel { padding: 8px 14px; }
  .super .carrito-panel .field textarea { min-height: 0; height: 64px; }
}
/* pantallas angostas para dos columnas (hasta 1180 px): el carrito pasa abajo, con la barrita fija, como en el celular */
@media (min-width: 861px) and (max-width: 1180px) {
  .super .split { grid-template-columns: minmax(0, 1fr); }
  .super .carrito-panel { position: static; max-height: none; }
  .super .carrito-bar:not([hidden]) { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 20; right: 16px; bottom: 16px; width: min(420px, calc(100% - 228px));
    padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgb(0 0 0 / 0.2); }
  .super .carrito-bar .carrito { width: 30px; }
  .super .carrito-bar .btn { margin-left: auto; }
  .super { padding-bottom: 72px; }
}
@media (max-width: 860px) { .super .pasillos { top: 57px; } }

/* IT Grassi · mesa de ayuda */
.nav-grupo:first-child { padding-top: 0; }
@media (max-width: 860px) { .nav-grupo { align-self: center; padding: 0 2px 0 10px; border-left: 1px solid var(--line); } .nav-grupo:first-child { border-left: 0; padding-left: 0; } }
.card-row:has(.plazo) .card-main, .card-main { min-width: 0; }
.card-atencion { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.card-critica { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.plazo { display: block; font-size: 0.78rem; color: var(--muted); }
.plazo.vencido { color: var(--bad); font-weight: 600; }
.tk-aviso { display: flex; flex-direction: column; gap: 4px; }
.tk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tk-kpis .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.tk-kpis .kpi strong { font: 600 1.35rem var(--f-display); }
.tk-kpis .kpi span { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.tk-kpis .kpi.bad strong { color: var(--bad); } .tk-kpis .kpi.warn strong { color: var(--warn); }
.push-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.push-on { font-size: 0.88rem; }
.tk-form .check-frena, .check-frena { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.check-frena input, .check-mini input { width: auto; margin-top: 3px; }
.check-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.tk-detalle { display: flex; flex-direction: column; gap: 14px; }
.tk-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-cab .muted { font-size: 0.85rem; flex-basis: 100%; }
.tk-gestion { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 10px 12px; background: var(--sunk); border-radius: var(--r); }
.tk-gestion .tk-mini { width: auto; min-width: 150px; }
.tk-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.link.danger { color: var(--bad); }
.tk-linea { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.msg-suc { align-self: flex-start; }
.msg-it { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg-interno { background: var(--warn-soft); border-style: dashed; border-color: var(--warn); }
.evt { align-self: center; font-size: 0.75rem; color: var(--muted); }
.tk-archivos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-archivo { border: 1px solid var(--line); background: var(--sunk); border-radius: 999px; padding: 3px 10px; font-size: 0.8rem; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-solucion { padding: 10px 12px; border-left: 3px solid var(--ok); background: var(--ok-soft); border-radius: 0 6px 6px 0; }
.tk-confirmar { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--ok); border-radius: var(--r); }
.tk-confirmar textarea[hidden] { display: none; }
.tk-responder { display: flex; flex-direction: column; gap: 8px; }
.tk-responder .toolbar { justify-content: flex-end; }
@media (max-width: 860px) { .msg { max-width: 100%; } .tk-acciones { margin-left: 0; } }

/* ================= Grassi Operaciones: plataforma con módulos ================= */
:root { --navy: #0a3a82; --navy-ink: #c9d8f0;
  --m-drogueria: #915ebd; --m-drogueria-ink: #6f3f99; --m-drogueria-soft: #f1e8f8;
  --m-compras: #e07a2e; --m-compras-ink: #a8501a; --m-compras-soft: #fcebdd;
  --m-it: #0e9fb3; --m-it-ink: #0a6c79; --m-it-soft: #dff3f6;
  --m-rrhh: #d9467a; --m-rrhh-ink: #a8285a; --m-rrhh-soft: #fbe4ed;
  --m-analytics: #1f9d6b; --m-analytics-ink: #13724c; --m-analytics-soft: #dcf3e9; }
:root[data-theme="dark"] { --navy: #0b2a5c; --m-drogueria-ink: #c7a6ea; --m-drogueria-soft: #2c2240; --m-compras-ink: #f2a463; --m-compras-soft: #3a2a1c; --m-it-ink: #6fd6e4; --m-it-soft: #173539; --m-rrhh-ink: #f08fb2; --m-rrhh-soft: #3a1f2b; --m-analytics-ink: #6fd3a5; --m-analytics-soft: #173a2c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --navy: #0b2a5c; --m-drogueria-ink: #c7a6ea; --m-drogueria-soft: #2c2240; --m-compras-ink: #f2a463; --m-compras-soft: #3a2a1c; --m-it-ink: #6fd6e4; --m-it-soft: #173539; --m-rrhh-ink: #f08fb2; --m-rrhh-soft: #3a1f2b; --m-analytics-ink: #6fd3a5; --m-analytics-soft: #173a2c; } }
.mod-drogueria { --m: var(--m-drogueria); --m-ink: var(--m-drogueria-ink); --m-soft: var(--m-drogueria-soft); }
.mod-compras, [data-mod="compras"] { --m: var(--m-compras); --m-ink: var(--m-compras-ink); --m-soft: var(--m-compras-soft); }
.mod-it, [data-mod="it"] { --m: var(--m-it); --m-ink: var(--m-it-ink); --m-soft: var(--m-it-soft); }
.mod-analytics, [data-mod="analytics"] { --m: var(--m-analytics); --m-ink: var(--m-analytics-ink); --m-soft: var(--m-analytics-soft); }
.mod-rrhh, [data-mod="rrhh"] { --m: var(--m-rrhh); --m-ink: var(--m-rrhh-ink); --m-soft: var(--m-rrhh-soft); }
[data-mod="drogueria"] { --m: var(--m-drogueria); --m-ink: var(--m-drogueria-ink); --m-soft: var(--m-drogueria-soft); }
.ico { display: inline-flex; }

.plataforma { display: grid; grid-template-columns: 72px 236px minmax(0, 1fr); grid-template-areas: "rail modnav main"; min-height: calc(100vh - 38px); }
.plataforma > .main { grid-area: main; }
.rail { grid-area: rail; position: sticky; top: 0; height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0; background: var(--navy); }
.rail-iso { width: 44px; height: 44px; border-radius: 11px; background: #fff; display: grid; place-items: center; margin-bottom: 12px; }
.rail-iso img { width: 36px; height: 36px; border-radius: 8px; }
.rail-mod { position: relative; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--navy-ink); text-decoration: none; }
.rail-mod:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.rail-mod.on { background: rgb(255 255 255 / 0.16); color: #fff; box-shadow: inset 3px 0 0 var(--m); }
.rail-mod .punto, .tab-mod .punto { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--m); box-shadow: 0 0 0 2px var(--navy); }
.rail-mod .punto[hidden], .tab-mod .punto[hidden] { display: none; }
.rail-sep { flex: 1; }
.rail-cuenta { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--navy); font: 700 0.8rem var(--f-body); cursor: pointer; }
.modnav { grid-area: modnav; position: sticky; top: 0; height: 100vh; box-sizing: border-box; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 22px 12px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.modnav-logo { display: block; padding: 0 8px 6px; }
.modnav-logo img { width: 168px; height: auto; display: block; }
.modnav .nav-item.on { background: var(--m-soft); color: var(--m-ink); }
.modnav .nav-item.on .badge { background: var(--m); }
.top-movil, .subnav, .tabbar { display: none; }

/* inicio */
.inicio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.mod-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mod-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--m); }
.mod-card-link { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.mod-logo img { height: 64px; width: auto; max-width: 100%; display: block; }
.mod-desc { color: var(--muted); font-size: 0.9rem; }
.mod-nums { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.mod-nums li { display: flex; justify-content: space-between; gap: 10px; }
.mod-nums .t-bad { color: var(--bad); }
.mod-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-acciones .btn { flex: 1 1 140px; }
.mod-compras .mod-acciones .btn.primary { background: var(--m-compras-ink); border-color: var(--m-compras-ink); }
.mod-pronto { margin: 0; font-size: 0.88rem; }
.hoy { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.hoy h2 { font-size: 1.1rem; }
.hoy-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hoy-item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); color: inherit; text-decoration: none; }
.hoy-item:hover { background: var(--m-soft); }
.hoy-item.t-bad { background: var(--bad-soft); }
.hoy-barra { width: 6px; border-radius: 3px; background: var(--m); flex: none; }
.hoy-item.t-bad .hoy-barra { background: var(--bad); }
.hoy-item small { display: block; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 1100px) { .inicio-grid { grid-template-columns: minmax(0, 1fr); } }

/* ingreso */
.login-grupo { display: flex; align-items: center; gap: 12px; }
.login-grupo img { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
.login-grupo strong { display: block; font: 700 1.25rem var(--f-display); }
.login-grupo small { color: var(--navy-ink); }
.login-form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form h2 { font: 700 2rem var(--f-display); letter-spacing: -0.02em; margin: 0 0 4px; }
.login-form p { margin: 0; }
.login-form input { height: 48px; border-radius: 10px; font-size: 1rem; }
.btn-ingresar { height: 52px; border-radius: 10px; font-size: 1.05rem; background: var(--navy); border-color: var(--navy); }
.login-ayuda { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 0.9rem; line-height: 1.5; }

/* celular */
@media (max-width: 860px) {
  .plataforma, .plataforma.en-inicio { display: flex; flex-direction: column; min-height: calc(100dvh - 38px); }
  .rail, .modnav { display: none; }
  .top-movil { display: flex; align-items: center; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); }
  .top-iso img { width: 34px; height: 34px; border-radius: 9px; display: block; }
  .top-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
  .top-txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-txt small { color: var(--muted); font-size: 0.75rem; }
  .top-cuenta { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 700 0.78rem var(--f-body); cursor: pointer; flex: none; }
  .subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 61px); z-index: 5; }
  .subnav-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 12px; border-radius: 999px; background: var(--sunk); color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.88rem; }
  .subnav-item.on { background: var(--m-soft); color: var(--m-ink); }
  .plataforma > .main { flex: 1; padding-bottom: 96px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
  .tab-mod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 0.72rem; font-weight: 600; }
  .tab-mod.on { color: var(--m-ink, var(--accent)); }
  .tab-mod.mod-inicio.on { color: var(--accent); }
  .tab-mod .punto { right: calc(50% - 18px); top: 4px; box-shadow: 0 0 0 2px var(--surface); }
  .mod-logo img { height: 52px; }
}
/* ajustes de la plataforma */
.demo-bar ~ .plataforma .rail, .demo-bar ~ .plataforma .modnav { height: calc(100vh - 38px); height: calc(100dvh - 38px); }
@media (min-width: 861px) and (max-width: 1180px) { .plataforma .super .carrito-bar:not([hidden]) { width: min(420px, calc(100% - 340px)); } }
@media (max-width: 860px) {
  .plataforma .carrito-bar:not([hidden]) { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
.mod-cards.n1 { grid-template-columns: minmax(0, 560px); }
.mod-cards.n1 .mod-logo img { height: 80px; }

/* Droguería */
.drog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.drog-grid .block, .drogueria .block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.drog-turnos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.drog-turno { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--sunk); }
.drog-turno strong { font-size: 1.1rem; }
.drog-turno.est-atrasado { background: var(--bad-soft); }
.drog-ultimas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.drog-ultima { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.drog-ultima strong { font: 600 1.3rem var(--f-display); }
.drog-ultima.mal { border-color: var(--bad); background: var(--bad-soft); }
.drog-demoradas { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.chart-box { position: relative; height: 260px; }
.temp-turnos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 14px; }
.temp-turno { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.temp-turno.est-ahora { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.temp-turno.est-atrasado { border-color: var(--bad); box-shadow: inset 4px 0 0 var(--bad); }
.temp-turno header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.temp-hora { font: 600 1.4rem var(--f-mono); }
.temp-fila { display: grid; grid-template-columns: minmax(0, 1fr) 110px 100px 96px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.temp-punto { display: flex; flex-direction: column; min-width: 0; }
.temp-punto small { font-size: 0.75rem; }
.temp-in { display: flex; align-items: center; gap: 4px; }
.temp-in input { width: 100%; text-align: right; font: 600 1rem var(--f-mono); }
.temp-in span { color: var(--muted); font-size: 0.85rem; }
.temp-in.vacio { color: var(--muted); font-size: 0.78rem; }
.temp-marca { font-size: 0.8rem; font-weight: 600; }
.temp-marca.bien { color: var(--ok); } .temp-marca.mal { color: var(--bad); }
.temp-fila.temp-fuera input { border-color: var(--bad); }
.temp-accion { grid-column: 1 / -1; }
.temp-accion[hidden] { display: none; }
.temp-accion input { border-color: var(--bad); background: var(--bad-soft); }
.temp-pie { display: flex; justify-content: flex-end; margin: 0; }
.temp-resumen { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.95rem; }
.temp-resumen .mal strong { color: var(--bad); }
.temp-planilla .tbl td.fuera { background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.temp-planilla .tbl td.falta { color: var(--warn); }
.temp-planilla .tbl td small { color: var(--muted); font-weight: 400; }
.temp-acciones { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.temp-acciones span { display: block; color: var(--muted); }
@media (max-width: 600px) { .temp-fila { grid-template-columns: minmax(0, 1fr) 1fr 1fr; } .temp-marca { grid-column: 1 / -1; } }
.bachas-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bacha { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--fg); }
.bacha-num { font-size: 1.15rem; font-weight: 700; }
.bacha-lugar { font-size: 0.7rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bacha.est-disponible { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.bacha.est-afuera { background: var(--info-soft); border-color: transparent; }
.bacha.est-vencida { background: var(--bad-soft); border-color: var(--bad); }
.bacha.est-vencida .bacha-lugar { color: var(--bad); font-weight: 600; }
.bacha.elegida { outline: 3px solid var(--m-drogueria); outline-offset: 1px; }
.bachas-barra { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 20px rgb(0 0 0 / 0.12); }
.bachas-barra[hidden] { display: none; }
@media (max-width: 860px) { .bachas-barra { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.bachas-resumen { display: flex; flex-direction: column; gap: 10px; }
.bachas-porsuc summary { cursor: pointer; font-weight: 600; }
.bachas-porsuc ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.bacha-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#bch-buscar { max-width: 460px; }
@media print {
  .rail, .modnav, .top-movil, .subnav, .tabbar, .demo-bar, .no-print, .temperatura .toolbar, .temperatura .view-head .muted { display: none !important; }
  .plataforma { display: block; } .main { padding: 0; } .temp-planilla { break-inside: avoid; }
}
.temperatura .filters input[type=date], .temperatura .filters input[type=month] { width: auto; }
.temp-planilla { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }

/* ===== ingreso (login) ===== */
:root { --m-rrhh: #d9467a; }
.login2 { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: 1fr auto; background: var(--bg); }
.login-marca { grid-row: 1 / span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 36px; padding: clamp(28px, 4.5vw, 60px) clamp(24px, 4.5vw, 64px); background: var(--navy); color: #fff; }
.login-titulo { display: flex; flex-direction: column; gap: 18px; }
.login-titulo h1 { font: 700 clamp(1.9rem, 3vw, 2.75rem)/1.08 var(--f-display); letter-spacing: -0.025em; color: #fff; max-width: none; text-wrap: balance; }
.login-titulo p { margin: 0; font-size: 1.05rem; color: #dbe6f6; max-width: 46ch; }
.login-mods { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.login-mod { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 18px; border-radius: 16px; background: rgb(255 255 255 / 0.07);
  border: 1px solid rgb(255 255 255 / 0.1); color: #dbe6f6; overflow: hidden; animation: sube 0.5s calc(0.25s + var(--i) * 0.08s) ease-out both; transition: background 0.2s, transform 0.2s; }
.login-mod::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.login-mod:hover { background: rgb(255 255 255 / 0.11); transform: translateY(-2px); }
.login-mod.mod-farmacias { --c: #a5d68a; } .login-mod.mod-drogueria { --c: #b98be0; } .login-mod.mod-it { --c: #3fc6d8; } .login-mod.mod-compras { --c: #f09a55; } .login-mod.mod-rrhh { --c: #f08fb2; } .login-mod.mod-analytics { --c: #6fd3a5; }
.login-mod img { width: 100%; max-width: 210px; height: 78px; object-fit: contain; object-position: left center; }
.login-mod p { margin: 0; font-size: 0.98rem; line-height: 1.4; }
.login-mod.pronto { background: transparent; border-style: dashed; border-color: rgb(255 255 255 / 0.22); }
.login-mod.pronto img { opacity: 0.8; }
.login-pronto { align-self: flex-start; margin-top: -4px; padding: 3px 10px; border-radius: 999px; background: rgb(240 143 178 / 0.18); color: #ffc2d8; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; }
.login-pie { margin: 0; color: #fff; font: 700 clamp(1rem, 1.4vw, 1.2rem)/1.3 var(--f-display); letter-spacing: -0.01em; }
.login-form-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 48px 24px 24px; }

/* logo Grassi Operaciones, animado */
.op-logo { position: relative; display: flex; flex-direction: column; align-items: flex-end; width: min(330px, 82%); }
.op-palabra { display: flex; margin: 0 4% -4px 0; font: 700 clamp(1.7rem, 3vw, 2.25rem)/1 var(--f-display); letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--m-farmacias, #71a850), var(--m-drogueria, #915ebd), var(--m-compras, #e07a2e), var(--m-rrhh), var(--m-it, #0e9fb3), var(--m-analytics), var(--m-farmacias, #71a850)) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 2px 0.12em;
  animation: op-revela 0.9s 0.2s cubic-bezier(0.6, 0, 0.2, 1) both, op-fluye 2.6s 1.1s linear infinite; }
.op-marca { width: 100%; height: auto; animation: logo-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.op-barra { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 62%; height: 6px; margin: 10px auto 0 4%; align-self: flex-start; }
.op-barra i { border-radius: 3px; transform-origin: left; animation: barra-in 0.45s calc(0.7s + var(--i) * 0.12s) cubic-bezier(0.2, 0.8, 0.2, 1) both, op-corre 1.4s calc(1.3s + var(--i) * 0.14s) ease-in-out infinite; }
.op-barra .b-farmacias { background: var(--m-farmacias, #71a850); } .op-barra .b-drogueria { background: var(--m-drogueria, #915ebd); } .op-barra .b-it { background: var(--m-it, #0e9fb3); }
.op-barra .b-compras { background: var(--m-compras, #e07a2e); } .op-barra .b-rrhh { background: var(--m-rrhh); } .op-barra .b-analytics { background: var(--m-analytics); }
@keyframes op-revela { from { clip-path: inset(0 100% 0 0); transform: translateX(-8px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes op-fluye { to { background-position: 300% 0; } }
@keyframes op-brillo { 0%, 80%, 100% { transform: scaleY(1); filter: none; } 88% { transform: scaleY(1.7); filter: brightness(1.25); } }
.login-form { animation: sube 0.5s 0.6s ease-out both; }

/* créditos: Ganímedes Lab, abajo de todo */
.creditos { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 22px 24px 30px; border-top: 1px solid var(--line); margin: 0 clamp(16px, 4vw, 48px); }
.creditos span { display: flex; flex-direction: column; line-height: 1.15; }
.creditos small { color: var(--muted); font-size: 0.82rem; }
.creditos strong { font: 700 1.55rem var(--f-display); letter-spacing: -0.01em; background: linear-gradient(90deg, #12b5e0, #4a5fd6 55%, #a23be0); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 860px) {
  .login2 { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .login-form-wrap { order: 1; padding: 36px 20px 28px; gap: 26px; }
  .login-marca { order: 2; grid-row: auto; gap: 20px; border-radius: 24px; margin: 0 10px; padding: 28px 18px; }
  .creditos { order: 3; grid-column: auto; margin: 0; border-top: 0; padding: 22px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .creditos img { width: 72px; height: 72px; }
  .op-logo { width: min(270px, 78%); }
  .login-titulo h1 { font-size: 1.6rem; }
  .login-titulo p { font-size: 0.95rem; }
  .login-mods { gap: 10px; margin: 0; }
  .login-mod { padding: 14px 12px 12px; gap: 8px; border-radius: 14px; }
  .login-mod img { height: 50px; }
  .login-mod p { font-size: 0.84rem; }
  .login-pronto { margin-top: -2px; }
  .login-pie { text-align: center; }
}

/* menú lateral desplegable (Inicio + módulos) */
.modnav .nav { gap: 4px; }
.nav-inicio { gap: 10px; justify-content: flex-start; }
.modnav .nav-inicio.on { background: var(--accent-soft); color: var(--accent); }
.nav-grupo { border-radius: 10px; }
.modnav-logo { text-decoration: none; }
.nav-grupo > summary { text-transform: none; letter-spacing: normal; font-size: 0.98rem; list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-weight: 650; color: var(--fg); user-select: none; }
.nav-grupo > summary::-webkit-details-marker { display: none; }
.nav-grupo > summary .ico { color: var(--m); }
.nav-grupo > summary:hover { background: var(--sunk); }
.nav-grupo > summary:focus-visible { outline: 2px solid var(--m); outline-offset: 1px; }
.nav-grupo-txt { flex: 1; }
.nav-grupo .punto { width: 8px; height: 8px; border-radius: 50%; background: var(--m); }
.nav-grupo .punto[hidden] { display: none; }
.nav-flecha { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.2s; margin-right: 4px; }
.nav-grupo[open] > summary .nav-flecha { transform: rotate(45deg); }
.nav-grupo.actual > summary { color: var(--m-ink); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 19px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--m) 35%, transparent); }
.nav-sub .nav-item { padding: 7px 10px; font-size: 0.95rem; }
.nav-sub .nav-item.on { background: var(--m-soft); color: var(--m-ink); }
.nav-sub .nav-item.on .badge { background: var(--m); }
.op-mini { display: flex; flex-direction: column; align-items: flex-end; width: 168px; }
.op-mini img { width: 100%; height: auto; }
.op-mini-txt { margin: 0 6px -2px 0; font: 700 1.05rem/1 var(--f-display); background: linear-gradient(90deg, var(--m-farmacias), var(--m-drogueria), var(--m-compras), var(--m-rrhh), var(--m-it), var(--m-analytics)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* RRHH (en desarrollo) */
.rrhh-viene { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; max-width: 980px; }
.rrhh-viene li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--m-rrhh); }
.rrhh-viene span { color: var(--muted); font-size: 0.92rem; }

/* ===== RRHH · cobertura y empleados ===== */
.btn.danger-link { background: none; border-color: transparent; color: var(--bad); margin-right: auto; }
.au-dias { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding-bottom: 10px; }
.au-aprox small { margin-left: 2px; }
.cob-cont { display: flex; flex-direction: column; gap: 12px; }
.cob-aviso { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cob-mes { display: flex; align-items: center; gap: 8px; }
.cob-mes strong { font: 700 1.25rem var(--f-display); min-width: 11ch; text-align: center; }
.cob-mes .btn { padding: 6px 12px; }
.cob-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.8rem; color: var(--muted); }
.cob-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--s-bg); border: 1px solid var(--s-bd); color: #1d2433; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.cob-ref-aprox, .cob-ref-choque { padding-left: 6px; }
.cob-ref-choque { color: var(--bad); }
.cob-quitar { cursor: pointer; border: 0; }

.cob-cal { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.cob-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--sunk); }
.cob-dias span { padding: 6px 8px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cob-dias .finde { color: var(--m-rrhh-ink); }
.cob-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 28px repeat(var(--filas), 26px) 8px; row-gap: 3px; border-bottom: 1px solid var(--line); min-height: 84px; }
.cob-semana:last-child { border-bottom: 0; }
.cob-fecha { border-right: 1px solid var(--grid); padding: 4px 6px; display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; min-width: 0; }
.cob-fecha:nth-child(7) { border-right: 0; }
.cob-fecha.finde { background: color-mix(in srgb, var(--sunk) 70%, transparent); }
.cob-fecha.fuera .cob-num { opacity: 0.4; }
.cob-num { font: 600 0.85rem var(--f-mono); color: var(--muted); }
.cob-fecha.es-hoy .cob-num { background: var(--m-rrhh); color: #fff; border-radius: 999px; padding: 0 7px; }
.cob-choque { font-size: 0.68rem; font-weight: 700; color: var(--bad); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.cob-barra { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 3px; padding: 0 8px; height: 26px; border-radius: 6px;
  background: var(--s-bg); border: 1px solid var(--s-bd); border-left-width: 4px; color: #1d2433; font: 600 0.8rem var(--f-body); text-align: left; cursor: pointer; overflow: hidden; }
.cob-barra:hover { filter: brightness(0.96); box-shadow: 0 2px 6px rgb(0 0 0 / 0.12); }
.cob-barra:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.cob-barra.sigue-izq { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; border-left-style: dashed; }
.cob-barra.sigue-der { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cob-barra.aprox { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgb(255 255 255 / 0.45) 6px 9px); }
.cob-barra.t-evento, .cob-barra.t-dia_libre, .cob-barra.t-franco, .cob-barra.t-licencia { border-style: solid; border-left-width: 4px; }
.cob-nombre { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob-tipo { flex: none; font-size: 0.7rem; font-weight: 700; padding: 0 6px; border-radius: 4px; background: rgb(255 255 255 / 0.7); }
.cob-barra.corta .cob-tipo { display: none; }
.em-pasado { color: var(--bad); font-weight: 700; }
.cob-aprox { flex: none; margin-left: auto; font-weight: 800; color: #8a5a00; }

.cob-suc-wrap { max-width: 100%; }
.cob-suc { border-collapse: collapse; font-size: 0.8rem; width: 100%; }
.cob-suc th, .cob-suc td { border: 1px solid var(--grid); text-align: center; padding: 0; min-width: 26px; height: 32px; }
.cob-suc thead th { font: 600 0.75rem var(--f-mono); color: var(--muted); padding: 4px 0; line-height: 1.1; }
.cob-suc thead th small { display: block; font-size: 0.62rem; }
.cob-suc thead th.es-hoy { background: var(--m-rrhh); color: #fff; }
.cob-suc .finde { background: var(--sunk); }
.cob-suc-nom { position: sticky; left: 0; z-index: 1; background: var(--surface) !important; text-align: left !important; padding: 0 10px !important; white-space: nowrap; font-weight: 600; min-width: 140px; }
.cob-suc td.con { background: var(--s-bg); font: 700 0.8rem var(--f-mono); color: #1d2433; cursor: pointer; }
.cob-suc td.choque { background: var(--bad); color: #fff; }
.cob-punto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--s-bg); border: 1px solid var(--s-bd); margin-right: 8px; vertical-align: -1px; }
.cob-lista-dia { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.cob-tbl tr.clic, .em-tbl tr.clic { cursor: pointer; }
.cob-tbl tr.clic:hover td, .em-tbl tr.clic:hover td { background: var(--sunk); }

.em-tbl td { vertical-align: middle; }
.em-tbl tr.inactivo { opacity: 0.55; }
.em-suc-sel { width: auto; min-width: 150px; padding: 4px 8px; height: auto; font-size: 0.85rem; }
.em-suc-sel.falta { border-color: var(--warn); background: var(--warn-soft); }
.em-ausencias h3 { margin: 0; }
.em-aus-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.em-aus-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.em-unificar { padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .cob-semana { grid-template-rows: 24px repeat(var(--filas), 22px) 6px; min-height: 64px; }
  .cob-barra { height: 22px; padding: 0 5px; font-size: 0.7rem; margin: 0 1px; }
  .cob-tipo, .cob-choque { display: none; }
  .cob-mes strong { font-size: 1.05rem; }
}
@media print {
  .cob-barra-mes .filters, .cobertura .view-head .toolbar, .cob-aviso { display: none !important; }
  .cob-barra, .cob-chip, .cob-suc td.con { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* login: más movimiento (operaciones, barra de colores y Ganímedes) */
.op-palabra { background-size: 400% 100%; filter: saturate(1.3); }
@keyframes op-fluye { to { background-position: 400% 0; } }
.op-barra { position: relative; height: 7px; overflow: visible; }
@keyframes op-corre {
  0%, 100% { transform: translateY(0) scaleX(1) scaleY(1); filter: none; }
  30% { transform: translateY(-7px) scaleX(1.18) scaleY(1.9); filter: brightness(1.3) saturate(1.3); box-shadow: 0 6px 12px rgb(0 0 0 / 0.18); }
  60% { transform: translateY(1px) scaleX(0.94) scaleY(0.8); }
}

.creditos .gan-logo { position: relative; display: grid; place-items: center; width: 96px; height: 96px; flex: none; }
.gan-logo img { position: relative; width: 84px; height: 84px; border-radius: 50%; }
.creditos strong { background-size: 300% 100%; animation: op-fluye 3.5s linear infinite; background-image: linear-gradient(90deg, #12b5e0, #4a5fd6, #a23be0, #e04ac4, #12b5e0); }
@media (max-width: 860px) { .gan-logo { width: 82px; height: 82px; } .gan-logo img { width: 72px; height: 72px; } }

/* ===== Grassi Analytics ===== */
.tab-cont { display: flex; flex-direction: column; gap: 22px; }
.tab-area h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
.tab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tab-card { position: relative; display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--m-analytics); transition: transform 0.15s, box-shadow 0.15s; }
.tab-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(15 30 60 / 0.1); }
.tab-card.inactivo { opacity: 0.6; }
.tab-abrir { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 18px 16px; border: 0; background: none; color: var(--fg); text-align: left; font: inherit; cursor: pointer; flex: 1; }
.tab-abrir strong { font: 700 1.1rem var(--f-display); }
.tab-abrir .muted { font-size: 0.9rem; }
.tab-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--m-analytics-soft); color: var(--m-analytics-ink); margin-bottom: 4px; }
.tab-editar { position: absolute; top: 14px; right: 14px; font-size: 0.85rem; }
.tab-barra { align-items: center; }
.tab-titulo { display: flex; align-items: center; gap: 12px; }
.tab-titulo strong { font: 700 1.2rem var(--f-display); }
.tab-marco { position: relative; width: 100%; height: calc(100vh - 210px); height: calc(100dvh - 210px); min-height: 480px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.tab-marco iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tab-marco:fullscreen { border-radius: 0; border: 0; }
@media (max-width: 860px) { .tab-marco { height: 70vh; min-height: 360px; } .tab-titulo .btn { padding: 6px 10px; } }

/* Gerencia y dirección: solo lectura (menos en Soporte IT, donde cargan sus tickets como cualquiera) */
body.solo-lectura:not([data-mod="it"]) .main .btn.primary,
body.solo-lectura:not([data-mod="it"]) .main .btn.danger,
body.solo-lectura:not([data-mod="it"]) .modal-foot .btn.primary:not(.btn-salir),
body.solo-lectura:not([data-mod="it"]) .modal-foot .danger-link,
body.solo-lectura .em-unificar, body.solo-lectura .em-ausencias .toolbar .btn,
body.solo-lectura .temp-pie, body.solo-lectura .bachas-barra, body.solo-lectura .tab-editar { display: none !important; }
body.solo-lectura .em-suc-sel, body.solo-lectura .check-mini:has(#bch-varias) { pointer-events: none; opacity: 0.7; }
body.solo-lectura:not([data-mod="it"]) .modal input, body.solo-lectura:not([data-mod="it"]) .modal select { pointer-events: none; background: var(--sunk); }
.tab-ayuda { margin: 0; font-size: 0.88rem; }

/* login: Analytics ocupa el ancho de la grilla, con logo y texto en fila */

/* ---------- Soporte IT · fase 2: guías, respuestas rápidas, equipos y reportes ---------- */
.tk-guias { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--m-it-soft); border-left: 3px solid var(--m-it); }
.tk-guias > strong { color: var(--m-it-ink); }
.guia { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.guia summary { cursor: pointer; font-weight: 600; }
.guia[open] summary { margin-bottom: 6px; }
.guia .btn { margin-top: 4px; }
.guia-pasos { margin: 4px 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.guia-vista { padding: 10px 12px; background: var(--sunk); border-radius: var(--r); }
.tk-rapidas { width: auto; max-width: 100%; align-self: flex-start; color: var(--m-it-ink); font-weight: 600; }
.card.inactivo { opacity: 0.6; }
.base-grupo h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 10px 0 6px; }
.eq-tbl tbody tr { cursor: pointer; }
.eq-tbl td.num, .rep-tbl td.num, .rep-tbl th.num { text-align: right; white-space: nowrap; }
.eq-hist { border-top: 1px solid var(--line); padding-top: 10px; }
.eq-hist-lista { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.eq-hist-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start; }
.rep-bloque { margin: 0; }
.rep-barra { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--sunk); vertical-align: middle; overflow: hidden; }
.rep-barra > span { display: block; height: 100%; background: var(--m-it); border-radius: 4px; }
.rep-tbl { font-size: 0.9rem; }
.rep-tbl th, .rep-tbl td { padding-left: 8px; padding-right: 8px; }
.rep-tbl td.num { font-variant-numeric: tabular-nums; }

/* Droguería · Conciliación */
.txt-bad { color: var(--bad); font-weight: 600; } .txt-warn { color: var(--warn); font-weight: 600; }
.conc-lados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.conc-lado { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.conc-lado span { font-size: 0.88rem; }
.conciliacion .filters input[type=date] { width: auto; }
@media (max-width: 640px) { .conc-lados { grid-template-columns: 1fr; } }

/* Auditoría 14/11: en el celular una ventana nunca es más ancha que la pantalla (la vista de la orden se desplaza adentro) */
.modal-bg { grid-template-columns: minmax(0, 1fr); }
.modal { justify-self: center; min-width: 0; max-width: 100%; }
.modal-body { overflow-x: auto; }
.modal-foot button:disabled { opacity: .55; cursor: progress; }
@media (max-width: 860px) { .tab-mod .mod-txt { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.68rem; letter-spacing: -0.01em; } }

/* Celular y tablet (pantalla táctil): todo lo que se toca mide al menos 40 px de alto */
@media (pointer: coarse) {
  select, .tab, .subnav-item, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .btn { min-height: 40px; }
  button.mini { min-width: 40px; min-height: 40px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  summary { padding-block: 10px; }
  /* enlaces y barras finas: la zona que responde al dedo es más grande que lo que se ve */
  button.link, .cob-barra, .tab-editar, a.top-iso { position: relative; }
  button.link::after, .cob-barra::after, .tab-editar::after, a.top-iso::after { content: ''; position: absolute; inset: -10px -6px; }
}

/* Droguería · Indicadores */
.ind-chart { position: relative; width: 100%; }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.ind-grid > .block { min-width: 0; }
.ind-mix { display: inline-flex; width: 110px; height: 10px; border-radius: 3px; overflow: hidden; background: var(--grid); vertical-align: middle; }
.ind-mix i { display: block; height: 100%; }
.ind-notas { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); }
.ind-notas summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.ind-notas ul { margin: 10px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; max-width: 90ch; line-height: 1.5; }

.ind-card { position: relative; }
.ind-nivel { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.ind-sin-dato { opacity: .6; border-style: dashed; }
.ind-sin-dato .kpi-val { color: var(--muted); }

/* Droguería · recepción y expedición */
.kpi-bad { border-color: var(--bad); } .kpi-bad .kpi-val { color: var(--bad); }
.rc-tablero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.rc-col { background: var(--sunk); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.rc-col h2 { font-size: 0.9rem; margin: 2px 4px 4px; }
.rc-vacio { font-size: 0.85rem; padding: 4px; }
.rc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.rc-card.rc-tarde { border-left: 4px solid var(--bad); } .rc-card.rc-inc:not(.rc-tarde) { border-left: 4px solid var(--warn); }
.rc-card-info { all: unset; cursor: pointer; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.rc-card-info:focus-visible { outline: 2px solid var(--accent); }
.rc-card-info small { font-size: 0.78rem; line-height: 1.35; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 4px; } .rc-tags:empty { display: none; }
.rc-sig { border-radius: 0; border-width: 1px 0 0; padding-block: 9px; white-space: normal; }
@media (max-width: 1100px) { .rc-tablero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rc-tablero { grid-template-columns: minmax(0, 1fr); } .rc-sig { padding-block: 12px; } }
.ex-olas { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.ex-ola { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ex-ola header { display: flex; flex-direction: column; gap: 2px; } .ex-ola h2 { font-size: 1rem; margin: 0; } .ex-ola header span { font-size: 0.82rem; }
.ex-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ex-suc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; border-left: 4px solid var(--line); background: var(--sunk); }
.ex-suc > div { display: flex; flex-direction: column; min-width: 0; } .ex-det { font-size: 0.8rem; color: var(--muted); }
.ex-ok { border-left-color: var(--ok); } .ex-info { border-left-color: var(--info); } .ex-warn { border-left-color: var(--warn); } .ex-bad { border-left-color: var(--bad); }
.ex-warn small.muted { color: var(--warn); font-weight: 600; }
.btn.ex-sm { padding: 6px 10px; font-size: 0.85rem; flex: none; }
.ex-bacha-row { display: flex; gap: 8px; } .ex-bacha-row input { flex: 1; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; } .ex-chips:empty { display: none; } .ex-chips button { border: 0; cursor: pointer; }
.en-camino { border: 1px solid var(--info); background: var(--info-soft); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.en-camino h2 { font-size: 1rem; margin: 0; }
.en-camino li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.en-camino ul { list-style: none; margin: 0; padding: 0; }
@media (max-width: 640px) {
  .drog-rx .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .drog-rx .kpi { padding: 10px 12px; } .drog-rx .kpi-val { font-size: 1.25rem; }
  .drog-rx .view-head .toolbar { width: 100%; display: flex; gap: 8px; } .drog-rx .view-head .toolbar .btn.primary { flex: 1; }
  .drog-rx .ex-olas { grid-template-columns: minmax(0, 1fr); }
}

/* ingreso: el formulario más separado del logo animado */
.login-form { margin-top: 36px; }
@media (max-width: 900px) { .login-form { margin-top: 20px; } }

/* GraBot */
.gb { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.gb-boton { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 12px; border-radius: 26px; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; font: 700 0.95rem var(--f-display); box-shadow: 0 8px 24px rgb(0 0 0 / 0.22); transition: transform .15s ease; }
.gb-boton:hover { transform: translateY(-2px); } .gb-boton:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gb-boton.on .gb-etq { display: none; } .gb-boton.on { padding: 0 12px; }
.gb-cara { flex: none; } .gb-ojo { animation: gb-parpadeo 5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes gb-parpadeo { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
@media (prefers-reduced-motion: reduce) { .gb-ojo { animation: none; } }
.gb-panel { width: min(360px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - 110px)); display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgb(0 0 0 / 0.22); overflow: hidden; }
.gb-panel[hidden] { display: none; }
.gb-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--navy); color: #fff; }
.gb-head div { display: flex; flex-direction: column; flex: 1; } .gb-head small { opacity: .8; font-size: 0.78rem; }
.gb-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.14); flex: none; }
.gb-cerrar { background: none; border: 0; color: #fff; font-size: 1rem; cursor: pointer; width: 32px; height: 32px; border-radius: 6px; }
.gb-cerrar:hover { background: rgb(255 255 255 / 0.14); }
.gb-charla { padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.gb-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 0.92rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-bot { background: var(--sunk); align-self: flex-start; border-bottom-left-radius: 4px; }
.gb-yo { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.gb-chips { display: flex; flex-wrap: wrap; gap: 6px; } .gb-chips[hidden] { display: none; }
.gb-chip { border: 1px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: 16px; padding: 6px 12px; font-weight: 600; cursor: pointer; font-size: 0.86rem; align-self: flex-start; }
.gb-chip:hover { background: var(--accent); color: var(--accent-ink); }
.gb-form { display: flex; flex-direction: column; gap: 8px; } .gb-form[hidden] { display: none; }
.gb-form textarea { resize: vertical; min-height: 70px; }
.gb-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 640px) { .gb { right: 12px; bottom: 12px; } .gb-boton { height: 48px; } }
/* GraBot en el módulo de IT */
.gb-titulo { display: flex; align-items: center; gap: 10px; } .gb-titulo .gb-avatar { background: var(--navy); color: #fff; }
.gb-lista { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gb-item { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.gb-item.nuevo { border-left: 4px solid var(--bad); } .gb-item:hover { border-color: var(--muted); } .gb-item:focus-visible { outline: 2px solid var(--accent); }
.gb-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .gb-item-pills { margin-left: auto; display: flex; gap: 4px; }
.gb-item-txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gb-cita { margin: 0; padding: 12px 14px; background: var(--sunk); border-left: 3px solid var(--accent); border-radius: 6px; white-space: pre-wrap; }
/* recepción: comprobantes y su estado en Quantio */
.rc-comps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rc-comps li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border-radius: 6px; background: var(--sunk); border-left: 4px solid var(--warn); }
.rc-comps li.ok { border-left-color: var(--ok); } .rc-comps li .btn { margin-left: auto; }
.rc-agregar { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; } .rc-agregar .field { width: 100%; }
.hint.txt-warn { font-weight: 600; }
.ind-sub { display: block; font-size: 0.78rem; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* solo lectura: también los botones secundarios de las pantallas nuevas de la Droguería */
body.solo-lectura:not([data-mod="it"]) .main .btn.ghost-bad, body.solo-lectura:not([data-mod="it"]) .modal .btn.ghost-bad,
body.solo-lectura .rc-agregar, body.solo-lectura .rc-sig { display: none !important; }

/* ===== Ingreso: los módulos como piezas de rompecabezas =====
   Grilla: Droguería | Soporte IT / De compras | RRHH / Analytics (ancho completo).
   La forma de cada pieza es un SVG (svg.pz-forma) que dibuja app.js a la medida de la tarjeta: lengüetas con cuello
   y cabeza redonda que entran en el hueco de la vecina. Los huecos caen donde la tarjeta no tiene texto. */
.login-mods { gap: 5px; }
.login-mod.pieza { --pz-s: 34px; background: transparent; border: 0; border-radius: 0; overflow: visible; isolation: isolate; z-index: 0; animation: none;
  transition: transform 0.3s cubic-bezier(0.3, 0.8, 0.3, 1.3), filter 0.3s; }
.login-mod.pieza::before, .login-mod.pieza::after { display: none; }
.login-mod.pieza:hover { background: transparent; }
/* espacio para los huecos: a la derecha de Droguería y De compras, arriba de las de abajo */
.login-mod.mod-drogueria, .login-mod.mod-compras { padding-right: calc(20px + var(--pz-s) * 0.9); }
.pz-forma { position: absolute; z-index: -1; overflow: visible; pointer-events: none; }
.pz-fondo { fill: color-mix(in srgb, #fff 8%, var(--navy)); transition: fill 0.3s; }
.pz-brillo { transition: opacity 0.3s; }
.pz-borde { fill: none; stroke: var(--c); stroke-opacity: 0.4; stroke-width: 1.3; stroke-linejoin: round; transition: stroke-opacity 0.3s; }
.login-mod.pieza:hover { transform: translateY(-5px) rotate(-0.6deg); filter: drop-shadow(0 12px 18px rgb(0 0 0 / 0.35)); z-index: 3; }
.login-mod.pieza:hover .pz-fondo { fill: color-mix(in srgb, #fff 13%, var(--navy)); }
.login-mod.pieza:hover .pz-borde { stroke-opacity: 0.95; }
/* armado: cada pieza llega desde afuera, girando, y encastra; al encastrar el borde destella */
.login-mod.mod-drogueria { --lr: -2.4deg; --dx: -140px; --dy: -70px; --rz: -16deg; --lx: -7px; --ly: -6px; }
.login-mod.mod-it { --lr: 2.4deg; --dx: 150px; --dy: -60px; --rz: 14deg; --lx: 7px; --ly: -6px; }
.login-mod.mod-compras { --lr: -2deg; --dx: -160px; --dy: 30px; --rz: 12deg; --lx: -8px; --ly: 2px; }
.login-mod.mod-rrhh { --lr: 2.6deg; --dx: 140px; --dy: 60px; --rz: -18deg; --lx: 8px; --ly: 2px; }
.login-mod.mod-analytics { --lr: 0.8deg; --dx: 20px; --dy: 140px; --rz: 7deg; --lx: 0px; --ly: 8px; }
.login-mod.pieza.entra { animation: pz-arma 1s calc(0.25s + var(--i) * 0.16s) cubic-bezier(0.22, 0.9, 0.28, 1.12) backwards; }
@keyframes pz-arma { 0% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rz)) scale(0.92); filter: drop-shadow(0 16px 22px rgb(0 0 0 / 0.4)); }
  15% { opacity: 1; } 72% { transform: translate(0, 0) rotate(0) scale(1.03); filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.3)); }
  86% { transform: scale(0.99); } 100% { opacity: 1; transform: none; filter: none; } }
.login-mod.pieza.entra .pz-borde { animation: pz-click 0.7s calc(0.25s + var(--i) * 0.16s + 0.72s) ease-out backwards; }
@keyframes pz-click { 0% { stroke-opacity: 0.4; stroke-width: 1.3; } 25% { stroke-opacity: 1; stroke-width: 2.6; } 100% { stroke-opacity: 0.4; stroke-width: 1.3; } }
/* en reposo: de vez en cuando una pieza se levanta del tablero y vuelve a encastrar */
.login-mod.pieza.juega { animation: pz-juega 1.5s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2; }
.login-mod.pieza.juega .pz-borde { animation: pz-click 0.6s 1s ease-out; }
@keyframes pz-juega { 0% { transform: none; filter: none; }
  35% { transform: translate(var(--lx), var(--ly)) rotate(var(--lr)) scale(1.02); filter: drop-shadow(0 12px 16px rgb(0 0 0 / 0.35)); }
  60% { transform: translate(calc(var(--lx) * 0.8), calc(var(--ly) * 0.8)) rotate(calc(var(--lr) * -0.4)) scale(1.02); }
  85% { transform: translate(0, 0) scale(0.99); filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.2)); } 100% { transform: none; filter: none; } }
@media (max-width: 860px) { .login-mods { gap: 4px; }
  .login-mod.mod-drogueria, .login-mod.mod-compras { padding-right: calc(12px + var(--pz-s) * 0.85); }
  .login-mod.mod-compras, .login-mod.mod-rrhh { padding-top: calc(10px + var(--pz-s) * 0.5); } }
@media (prefers-reduced-motion: reduce) { .login-mod.pieza, .login-mod.pieza .pz-borde, .login-mod.pieza.juega { animation: none; } }

/* ===== Barra de módulos: piezas de rompecabezas apiladas =====
   Cada módulo encastra con el de abajo (lengüeta = ::after, hueco = máscara arriba). El módulo abierto toma su color
   y sale un poco hacia la derecha, como una pieza que se levanta del tablero. Al pasar el mouse aparece su nombre. */
.rail-pz { display: flex; flex-direction: column; align-items: center; gap: 3px; --pz-r: 7px; }
.rail-pz .rail-mod { --pz: color-mix(in srgb, #fff 9%, var(--navy)); width: 48px; height: 46px; border-radius: 11px; color: var(--navy-ink); isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), color 0.2s; }
.rail-pz .rail-mod::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--pz); transition: background 0.25s;
  -webkit-mask: radial-gradient(circle calc(var(--pz-r) + 1px) at 50% -3px, #0000 96%, #000); mask: radial-gradient(circle calc(var(--pz-r) + 1px) at 50% -3px, #0000 96%, #000); }
.rail-pz .rail-mod:first-child::before { -webkit-mask: none; mask: none; }
.rail-pz .rail-mod::after { content: ''; position: absolute; left: calc(50% - var(--pz-r)); bottom: calc(-3px - var(--pz-r)); width: calc(var(--pz-r) * 2); height: calc(var(--pz-r) * 2);
  border-radius: 50%; background: var(--pz); z-index: 1; transition: background 0.25s; pointer-events: none; }
.rail-pz .rail-mod:last-child::after { display: none; }
.rail-pz .rail-mod:hover { --pz: color-mix(in srgb, var(--m) 35%, var(--navy)); background: none; color: #fff; transform: translateX(4px); z-index: 2; }
.rail-pz .rail-mod:hover .ico { animation: rail-ico 0.5s ease; }
.rail-pz .rail-mod.on { --pz: var(--m); background: none; color: #fff; box-shadow: none; transform: translateX(9px); z-index: 3; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.3)); }
.rail-pz .rail-mod .punto { z-index: 2; }
/* nombre del módulo al pasar el mouse */
.rail-pz .rail-mod .mod-nombre { position: absolute; left: calc(100% + 12px); top: 50%; white-space: nowrap; padding: 5px 11px; border-radius: 8px; background: var(--m); color: #fff;
  font: 600 0.82rem var(--f-body); pointer-events: none; opacity: 0; transform: translate(-6px, -50%); transition: opacity 0.18s, transform 0.18s; z-index: 30; box-shadow: 0 6px 16px rgb(0 0 0 / 0.18); }
.rail-pz .rail-mod:hover .mod-nombre, .rail-pz .rail-mod:focus-visible .mod-nombre { opacity: 1; transform: translate(0, -50%); }
/* animaciones: las piezas caen y encastran (primera vez), la que vuelve a su lugar y la que sale */
.rail-pz.entra .rail-mod { animation: rail-cae 0.55s calc(0.08s + var(--i) * 0.09s) cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.rail-pz .rail-mod.salio { animation: rail-sale 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.rail-pz .rail-mod.volvio { animation: rail-vuelve 0.45s cubic-bezier(0.3, 1.4, 0.5, 1); }
.rail-pz.entra .rail-mod.on { animation: rail-cae 0.55s calc(0.08s + var(--i) * 0.09s) cubic-bezier(0.3, 1.4, 0.5, 1) both, rail-sale 0.5s calc(0.25s + var(--i) * 0.09s + 0.4s) cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes rail-cae { from { opacity: 0; transform: translateY(-22px) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes rail-sale { from { transform: translateX(0); } to { transform: translateX(9px); } }
@keyframes rail-vuelve { from { transform: translateX(9px); } to { transform: none; } }
@keyframes rail-ico { 0%, 100% { transform: none; } 30% { transform: rotate(-12deg) scale(1.12); } 60% { transform: rotate(8deg) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .rail-pz .rail-mod, .rail-pz .rail-mod .ico { animation: none !important; transition: none; } }
.rail { z-index: 6; overflow: visible; }

/* ===== Droguería: lavada de cara =====
   Todo acotado a body[data-mod="drogueria"]: paleta violeta y lila, encabezado tipo cartel con dibujos de la Droguería,
   tarjetas redondeadas que entran con un pequeño salto y números grandes. El resto de los módulos no cambia. */
body[data-mod="drogueria"] {
  --dr-1: #4f2577; --dr-2: #6f3a9f; --dr-3: #915ebd; --dr-4: #b98be0; --dr-5: #e8dbf6; --dr-6: #f6f0fc; --dr-ink: #5b2d86;
  --dr-frio: #1aa6b7; --dr-sombra: 91 45 134;
  --accent: #7d45b0; --accent-ink: #ffffff; --accent-soft: #ece0f8;
  --bg: #f7f3fc; --sunk: #efe7f8; --line: #e4d9f1; --grid: #efe8f7; --r: 14px;
  background: var(--bg); }
:root[data-theme="dark"] body[data-mod="drogueria"] {
  --dr-ink: #d2b4f2; --dr-5: #3a2c52; --dr-6: #241c33; --dr-sombra: 0 0 0;
  --accent: #c39cf0; --accent-ink: #1a1026; --accent-soft: #33264a;
  --bg: #14101d; --surface: #1d1729; --sunk: #261e35; --line: #352a49; --grid: #2a2139; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-mod="drogueria"] {
  --dr-ink: #d2b4f2; --dr-5: #3a2c52; --dr-6: #241c33; --dr-sombra: 0 0 0;
  --accent: #c39cf0; --accent-ink: #1a1026; --accent-soft: #33264a;
  --bg: #14101d; --surface: #1d1729; --sunk: #261e35; --line: #352a49; --grid: #2a2139; } }
body[data-mod="drogueria"] main[data-vista="drogueria"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8l-9-5-9 5v8l9 5 9-5z'/%3E%3Cpath d='M3 8l9 5 9-5'/%3E%3Cpath d='M12 13v8'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] main[data-vista="temperatura"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 14.8V5a2 2 0 0 0-4 0v9.8a4 4 0 1 0 4 0z'/%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M17.5 6h3M17.5 9.5h3'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] main[data-vista="drog-recepcion"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l9-4 9 4v10l-9 4-9-4z'/%3E%3Cpath d='M12 7v8'/%3E%3Cpath d='M8.5 11.5L12 15l3.5-3.5'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] main[data-vista="drog-expedicion"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h11v10H2z'/%3E%3Cpath d='M13 9h4l3.5 3.5V16H13'/%3E%3Ccircle cx='6' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] main[data-vista="drog-indicadores"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3Cpath d='M3 7l6-3 6 5 6-4'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] main[data-vista="conciliacion"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3M20 16H7l3 3'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] main[data-vista="bachas"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h18l-2 10H5z'/%3E%3Cpath d='M7 9V6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v3'/%3E%3Cpath d='M9 13h6'/%3E%3C/svg%3E"); }
body[data-mod="drogueria"] .main { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8l-9-5-9 5v8l9 5 9-5z'/%3E%3Cpath d='M3 8l9 5 9-5'/%3E%3Cpath d='M12 13v8'/%3E%3C/svg%3E"); }

/* encabezado: cartel violeta con patrón de cápsulas y cajas que se desplaza despacio */
body[data-mod="drogueria"] .main .view > .view-head { position: relative; isolation: isolate; overflow: hidden; align-items: center; padding: 24px 26px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgb(201 163 239 / 0.75) 0, transparent 50%), linear-gradient(118deg, var(--dr-1), var(--dr-2) 55%, var(--dr-3));
  box-shadow: 0 18px 34px -20px rgb(var(--dr-sombra) / 0.7); animation: dr-cartel 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
body[data-mod="drogueria"] .main .view > .view-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'%3E%3Crect x='18' y='22' width='34' height='14' rx='7' transform='rotate(-25 35 29)'/%3E%3Cpath d='M35 22v14' transform='rotate(-25 35 29)'/%3E%3Cpath d='M120 30v16M112 38h16'/%3E%3Cpath d='M190 18l12-6 12 6v13l-12 6-12-6z'/%3E%3Cpath d='M190 18l12 6 12-6M202 24v13'/%3E%3Ccircle cx='70' cy='112' r='9'/%3E%3Cpath d='M64 106l12 12'/%3E%3Crect x='150' y='100' width='30' height='13' rx='6.5' transform='rotate(30 165 106)'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 132l9-4.5 9 4.5v10l-9 4.5-9-4.5z'/%3E%3C/svg%3E") 0 0 / 240px 160px; animation: dr-patron 60s linear infinite; }
body[data-mod="drogueria"] .main .view > .view-head::after { content: ''; position: absolute; z-index: -1; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.18), transparent 65%); animation: dr-brillo 7s ease-in-out infinite alternate; }
body[data-mod="drogueria"] .main .view > .view-head > div:first-child { position: relative; padding-left: 80px; min-height: 62px; justify-content: center; }
body[data-mod="drogueria"] .main .view > .view-head > div:first-child::before { content: ''; position: absolute; left: 0; top: 50%; width: 62px; height: 62px; margin-top: -31px; border-radius: 19px;
  background: #fff; box-shadow: 0 10px 20px -8px rgb(30 10 50 / 0.45), inset 0 -4px 0 var(--dr-5); animation: dr-flota 4.5s ease-in-out infinite; }
body[data-mod="drogueria"] .main .view > .view-head > div:first-child::after { content: ''; position: absolute; left: 14px; top: 50%; width: 34px; height: 34px; margin-top: -19px;
  background: linear-gradient(135deg, var(--dr-2), var(--dr-4)); -webkit-mask: var(--dr-ico) center / contain no-repeat; mask: var(--dr-ico) center / contain no-repeat; animation: dr-flota 4.5s ease-in-out infinite; }
body[data-mod="drogueria"] .main .view > .view-head h1 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); letter-spacing: -0.02em; }
body[data-mod="drogueria"] .main .view > .view-head .eyebrow { color: rgb(255 255 255 / 0.78); }
body[data-mod="drogueria"] .main .view > .view-head .muted, body[data-mod="drogueria"] .main .view > .view-head p { color: rgb(255 255 255 / 0.86); }
body[data-mod="drogueria"] .main .view > .view-head .field-label, body[data-mod="drogueria"] .main .view > .view-head label { color: rgb(255 255 255 / 0.9); }
body[data-mod="drogueria"] .main .view > .view-head .btn { background: rgb(255 255 255 / 0.14); color: #fff; border-color: rgb(255 255 255 / 0.4); backdrop-filter: blur(4px); }
body[data-mod="drogueria"] .main .view > .view-head .btn:hover { background: rgb(255 255 255 / 0.24); }
body[data-mod="drogueria"] .main .view > .view-head .btn.primary { background: #fff; color: var(--dr-2); border-color: #fff; box-shadow: 0 6px 14px -6px rgb(30 10 50 / 0.5); }
body[data-mod="drogueria"] .main .view > .view-head input, body[data-mod="drogueria"] .main .view > .view-head select { background: #fff; color: #241a33; border-color: transparent; }

/* botones: redondeados y con un toque de relieve */
body[data-mod="drogueria"] .main .btn { border-radius: 999px; padding-inline: 16px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
body[data-mod="drogueria"] .main .btn:hover { transform: translateY(-1px); }
body[data-mod="drogueria"] .main .btn:active { transform: translateY(1px) scale(0.98); }
body[data-mod="drogueria"] .main .btn.primary { background: linear-gradient(135deg, var(--dr-2), var(--dr-3)); border-color: transparent; box-shadow: 0 6px 14px -8px rgb(var(--dr-sombra) / 0.8); }

/* tarjetas: blancas, redondeadas, con sombra lila y entrada escalonada */
body[data-mod="drogueria"] .main :is(.drog-grid .block, .drogueria .block, .table-wrap, .ex-ola, .temp-turno, .ind-grid > .block, .rc-col, .bachas-resumen, .bachas-porsuc) {
  border-radius: 18px; border-color: var(--line); box-shadow: 0 1px 0 rgb(var(--dr-sombra) / 0.04), 0 12px 26px -20px rgb(var(--dr-sombra) / 0.55); }
body[data-mod="drogueria"] .main .rc-col { background: var(--dr-6); border: 1px dashed var(--dr-5); }
body[data-mod="drogueria"] .main .rc-card { border-radius: 12px; transition: transform 0.15s, box-shadow 0.15s; }
body[data-mod="drogueria"] .main .rc-card:hover { transform: translateY(-2px) rotate(-0.4deg); box-shadow: 0 10px 18px -12px rgb(var(--dr-sombra) / 0.6); }
body[data-mod="drogueria"] .main .view > * { animation: dr-sube 0.5s calc(0.08s + var(--dr-n, 0) * 0.07s) cubic-bezier(0.2, 0.8, 0.3, 1.1) both; }
body[data-mod="drogueria"] .main .view > :nth-child(2) { --dr-n: 1; } body[data-mod="drogueria"] .main .view > :nth-child(3) { --dr-n: 2; }
body[data-mod="drogueria"] .main .view > :nth-child(4) { --dr-n: 3; } body[data-mod="drogueria"] .main .view > :nth-child(n+5) { --dr-n: 4; }

/* títulos de cada bloque con su marquita */
body[data-mod="drogueria"] .main .block-head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 1.12rem; }
body[data-mod="drogueria"] .main .block-head h2::before { content: ''; width: 12px; height: 12px; border-radius: 4px; flex: none; background: linear-gradient(135deg, var(--dr-2), var(--dr-4)); transform: rotate(45deg); }

/* indicadores (kpi): número grande violeta, burbuja de color en la esquina, se levantan al pasar el mouse */
body[data-mod="drogueria"] .main :is(.kpi, .tk-kpis .kpi, .drog-ultima, .drog-turno) { position: relative; overflow: hidden; border-radius: 16px; border-color: var(--line); transition: transform 0.2s, box-shadow 0.2s; }
body[data-mod="drogueria"] .main :is(.kpi, .tk-kpis .kpi) { background: var(--surface); padding: 16px 18px; box-shadow: 0 10px 22px -20px rgb(var(--dr-sombra) / 0.7); }
body[data-mod="drogueria"] .main :is(.kpi, .tk-kpis .kpi)::after { content: ''; position: absolute; right: -26px; top: -26px; width: 78px; height: 78px; border-radius: 50%; background: var(--dr-5); opacity: 0.7; transition: transform 0.4s; }
body[data-mod="drogueria"] .main :is(.kpi, .tk-kpis .kpi):hover { transform: translateY(-3px); box-shadow: 0 16px 26px -18px rgb(var(--dr-sombra) / 0.8); }
body[data-mod="drogueria"] .main :is(.kpi, .tk-kpis .kpi):hover::after { transform: scale(1.35); }
body[data-mod="drogueria"] .main :is(.kpi-val, .tk-kpis .kpi strong, .drog-ultima strong) { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 700; color: var(--dr-ink); }
body[data-mod="drogueria"] .main .kpi-val { font-size: 1.95rem; line-height: 1.1; }
body[data-mod="drogueria"] .main .tk-kpis .kpi strong { font-size: 1.7rem; }
body[data-mod="drogueria"] .main :is(.kpi-label, .kpi small, .tk-kpis .kpi span) { position: relative; z-index: 1; }
body[data-mod="drogueria"] .main :is(.kpi.bad, .kpi-bad, .tk-kpis .kpi.bad) { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
body[data-mod="drogueria"] .main :is(.kpi.bad, .kpi-bad, .tk-kpis .kpi.bad)::after { background: var(--bad-soft); }
body[data-mod="drogueria"] .main :is(.kpi.bad, .kpi-bad) .kpi-val, body[data-mod="drogueria"] .main .tk-kpis .kpi.bad strong { color: var(--bad); }
body[data-mod="drogueria"] .main .kpi-good::after { background: var(--ok-soft); } body[data-mod="drogueria"] .main .kpi-warn::after { background: var(--warn-soft); }
body[data-mod="drogueria"] .main .drog-turno { background: var(--dr-6); border: 1px solid var(--dr-5); }
body[data-mod="drogueria"] .main .drog-turno.est-hecho { background: var(--ok-soft); border-color: transparent; }
body[data-mod="drogueria"] .main .drog-turno.est-ahora { background: var(--warn-soft); border-color: transparent; animation: dr-late 1.6s ease-in-out infinite; }

/* pestañas: píldoras; la elegida en violeta */
body[data-mod="drogueria"] .main .tabs { border-radius: 999px; padding: 4px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 18px -16px rgb(var(--dr-sombra) / 0.6); }
body[data-mod="drogueria"] .main .tab { border-radius: 999px; padding: 7px 14px; transition: background 0.2s, color 0.2s; }
body[data-mod="drogueria"] .main .tab:hover { color: var(--dr-ink); background: var(--dr-6); }
body[data-mod="drogueria"] .main .tab.on { background: linear-gradient(135deg, var(--dr-2), var(--dr-3)); color: #fff; box-shadow: 0 6px 14px -8px rgb(var(--dr-sombra) / 0.9); }
body[data-mod="drogueria"] .main .tab.on .tab-count { color: rgb(255 255 255 / 0.85); }

/* tablas: encabezado lila */
body[data-mod="drogueria"] .main .tbl th { background: var(--dr-6); color: var(--dr-ink); border-bottom-color: var(--dr-5); }
body[data-mod="drogueria"] .main .tbl.hover tbody tr:hover, body[data-mod="drogueria"] .main .tbl tbody tr:hover { background: var(--dr-6); }

/* menú lateral del módulo: el ítem abierto en violeta */
body[data-mod="drogueria"] .subnav a.on, body[data-mod="drogueria"] .modnav .sub a.on { background: linear-gradient(90deg, var(--dr-5), transparent); color: var(--dr-ink); }

@keyframes dr-cartel { from { opacity: 0; transform: translateY(-8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes dr-patron { to { background-position: 240px -160px; } }
@keyframes dr-brillo { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, -20px) scale(1.15); } }
@keyframes dr-flota { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes dr-sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dr-late { 0%, 100% { box-shadow: 0 0 0 0 rgb(154 100 0 / 0.0); } 50% { box-shadow: 0 0 0 4px rgb(154 100 0 / 0.18); } }
@media (max-width: 860px) {
  body[data-mod="drogueria"] .main .view > .view-head { padding: 18px; border-radius: 18px; }
  body[data-mod="drogueria"] .main .view > .view-head > div:first-child { padding-left: 64px; min-height: 50px; }
  body[data-mod="drogueria"] .main .view > .view-head > div:first-child::before { width: 50px; height: 50px; margin-top: -25px; border-radius: 15px; }
  body[data-mod="drogueria"] .main .view > .view-head > div:first-child::after { left: 12px; width: 26px; height: 26px; margin-top: -15px; }
  body[data-mod="drogueria"] .main .kpi-val { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { body[data-mod="drogueria"] .main :is(.view > *, .view-head, .view-head::before, .view-head::after, .view-head > div::before, .view-head > div::after, .drog-turno) { animation: none !important; } }

/* ===== Droguería · Mapa del depósito ===== */
body[data-mod="drogueria"] main[data-vista="drog-mapa"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); }
.mapa-cuerpo { display: flex; flex-direction: column; gap: 18px; }
.mapa-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.9rem; }
.mapa-vivo { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgb(47 125 50 / 0.5); animation: mapa-vivo 2s infinite; }
.mapa-vivo.viejo { background: var(--warn); animation: none; }
.mapa-reloj { margin-left: auto; font-weight: 700; color: var(--dr-ink, var(--fg)); }
@keyframes mapa-vivo { 70% { box-shadow: 0 0 0 8px rgb(47 125 50 / 0); } 100% { box-shadow: 0 0 0 0 rgb(47 125 50 / 0); } }
.mapa-fichas { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.mapa-ficha { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 10px 22px -20px rgb(var(--dr-sombra, 0 0 0) / 0.7); animation: dr-sube 0.5s both; }
.mapa-ficha-ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--dr-6, var(--sunk)); font-size: 1.35rem; }
.mapa-ficha strong { display: block; font: 700 1.2rem/1.15 var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-ficha small { color: var(--muted); font-size: 0.8rem; line-height: 1.3; display: block; }
.mapa-ficha.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); } .mapa-ficha.warn .mapa-ficha-ico { background: var(--warn-soft); }
.mapa-ficha.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); } .mapa-ficha.bad .mapa-ficha-ico { background: var(--bad-soft); }
.mapa-ficha.ok .mapa-ficha-ico { background: var(--ok-soft); }
.mapa-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.mapa-plano, .mapa-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: 0 14px 30px -24px rgb(var(--dr-sombra, 0 0 0) / 0.7); }
.mapa-panel { padding: 18px; position: sticky; top: 14px; }
.mapa-panel h2 { font-size: 1.25rem; }
.mapa-svg { display: block; width: 100%; height: auto; max-height: 78vh; font-family: var(--f-body); }
.mapa-nota { font-size: 0.82rem; line-height: 1.45; margin: 6px 4px 0; }
/* plano */
.mp-piso { fill: var(--dr-6, var(--sunk)); }
.mp-pared { fill: none; stroke: var(--dr-ink, var(--fg)); stroke-width: 3.5; stroke-linejoin: round; opacity: 0.85; }
.mp-pasillo { fill: var(--surface); opacity: 0.8; }
.mp-flujo { fill: none; stroke-width: 2.4; stroke-dasharray: 2 9; stroke-linecap: round; animation: mp-flujo 1.4s linear infinite; opacity: 0.75; }
.mp-flujo.entra { stroke: #3fae7a; } .mp-flujo.arma { stroke: #7d45b0; } .mp-flujo.sale { stroke: #e0892e; }
@keyframes mp-flujo { to { stroke-dashoffset: -11; } }
.mp-est { cursor: pointer; outline: none; }
.mp-zona { fill: #fff; stroke: var(--dr-5, var(--line)); stroke-width: 1.5; transition: fill 0.4s, stroke 0.2s, transform 0.2s; }
.mp-est.nv0 .mp-zona { fill: #ffffff; } .mp-est.nv1 .mp-zona { fill: #e7d8f6; } .mp-est.nv2 .mp-zona { fill: #fbdcae; } .mp-est.nv3 .mp-zona { fill: #f7b3a6; }
.mp-est:hover .mp-zona, .mp-est:focus-visible .mp-zona { stroke: var(--dr-2, var(--accent)); stroke-width: 2.5; }
.mp-est.on .mp-zona { stroke: var(--dr-2, var(--accent)); stroke-width: 3.5; }
.mp-est.cuello .mp-zona { stroke: var(--bad); stroke-width: 3; animation: mp-late 1.6s ease-in-out infinite; }
@keyframes mp-late { 50% { stroke-width: 6; stroke-opacity: 0.55; } }
.mp-zona.escr { fill: #f4f1f9; } .mp-zona.recep { fill: #e6f5ed; } .mp-zona.exped { fill: #fcefe0; }
.mp-deco { fill: var(--dr-4, #b98be0); opacity: 0.22; pointer-events: none; }
.mp-deco .mp-jaula { fill: url(#mp-reja); opacity: 1; }
.mp-reja { stroke: #e0892e; stroke-width: 1.4; opacity: 0.7; }
.mp-copo { fill: none; stroke: #1aa6b7; stroke-width: 3; stroke-linecap: round; }
.mp-modulo { fill: #3b7be0; }
.mp-led { fill: #7cf0a6; opacity: 1; animation: mp-led 1.4s ease-in-out infinite; }
@keyframes mp-led { 50% { fill: #fff; } }
.mp-rotulo { pointer-events: none; }
.mp-num-sec { fill: #fff; font-size: 11px; font-weight: 800; }
.mp-num-gris { fill: #8a8f9c; }
.mp-nombre { fill: #241a33; font-size: 12px; font-weight: 700; }
.mp-grande { fill: #241a33; font: 800 26px var(--f-display); pointer-events: none; }
.mp-grande.chico { font-size: 20px; }
.mp-chico { fill: #5a5470; font-size: 10px; font-weight: 600; pointer-events: none; }
.mp-cartel rect { fill: var(--bad); } .mp-cartel text { fill: #fff; font-size: 10.5px; font-weight: 800; }
.mp-cartel { animation: mp-salta 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; pointer-events: none; }
@keyframes mp-salta { 50% { transform: translateY(-3px); } }
.mp-caja { fill: #c99a62; stroke: #8a6235; stroke-width: 0.8; animation: mp-cae 0.5s both; }
.mp-bacha { fill: #7d45b0; animation: mp-cae 0.5s both; }
@keyframes mp-cae { from { transform: translateY(-14px); opacity: 0; } }
.mp-puerta { stroke: #3fae7a; stroke-width: 5; stroke-linecap: round; }
.mp-persona { cursor: pointer; }
.mp-persona text { fill: #fff; font-size: 9px; font-weight: 800; pointer-events: none; }
.mp-persona circle { stroke: #fff; stroke-width: 2; }
.mp-persona:hover circle, .mp-persona:focus-visible circle { stroke: #241a33; }
/* panel */
.mapa-ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mapa-ranking button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--dr-6, var(--sunk)); }
.mapa-ranking button:hover, .mapa-ranking button:focus-visible { background: var(--dr-5, var(--line)); }
.mapa-pt { width: 12px; height: 12px; border-radius: 4px; transform: rotate(45deg); }
.mapa-nv { font: 700 0.8rem var(--f-mono); padding: 2px 8px; border-radius: 999px; background: var(--surface); }
.mapa-nv.nv2 { background: #fbdcae; color: #7a4a00; } .mapa-nv.nv3 { background: #f7b3a6; color: #7c2416; } .mapa-nv.nv1 { background: #e7d8f6; color: #4f2577; }
.mapa-leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.78rem; color: var(--muted); }
.mapa-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.mapa-leyenda i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); }
.mapa-leyenda i.nv0 { background: #fff; } .mapa-leyenda i.nv1 { background: #e7d8f6; } .mapa-leyenda i.nv2 { background: #fbdcae; } .mapa-leyenda i.nv3 { background: #f7b3a6; }
.mapa-leyenda i.r-hoy { background: var(--dr-3, var(--accent)); } .mapa-leyenda i.r-base { background: var(--dr-5, var(--line)); }
.mapa-est-cab, .mapa-per-cab { display: flex; gap: 12px; align-items: center; }
.mapa-est-cab > span { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--c); color: #fff; font: 800 1.2rem var(--f-display); }
.mapa-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; font: 800 0.85rem var(--f-display); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.mapa-mini-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mapa-mini-kpis > div { padding: 10px 12px; border-radius: 12px; background: var(--dr-6, var(--sunk)); }
.mapa-mini-kpis strong { display: block; font: 700 1.3rem/1.1 var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-mini-kpis small { color: var(--muted); font-size: 0.76rem; line-height: 1.25; display: block; }
.mapa-mini-kpis .mal { background: var(--bad-soft); } .mapa-mini-kpis .mal strong { color: var(--bad); }
.mapa-comp { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 10px; align-items: baseline; font-size: 0.88rem; }
.mapa-comp strong { font: 700 1.1rem var(--f-display); }
.mapa-barra { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--dr-6, var(--sunk)); overflow: hidden; }
.mapa-barra i { display: block; height: 100%; border-radius: inherit; transition: width 0.8s cubic-bezier(0.2, 0.8, 0.3, 1); }
.mapa-h3 { font-size: 0.95rem; margin: 0 0 8px; }
.mapa-top { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; }
.mapa-top li span { display: block; } .mapa-top small { font-size: 0.75rem; }
.mapa-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 46px; width: 100%; }
.mapa-spark i { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; }
.mapa-spark.chico { height: 22px; width: 90px; }
/* cola de pedidos */
.mapa-cola .block-head { align-items: flex-start; }
.mapa-carriles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mapa-carriles > div { background: var(--dr-6, var(--sunk)); border-radius: 16px; padding: 12px; min-width: 0; }
.mapa-peds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.mapa-ped { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; animation: dr-sube 0.4s both; }
.mapa-ped > div:first-child { display: flex; flex-direction: column; min-width: 0; } .mapa-ped > div:first-child strong { font-size: 0.88rem; }
.mapa-ped small { font-size: 0.75rem; }
.mapa-ped.viejo { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.mapa-ped.hecho { opacity: 0.92; }
.mapa-ped-num { text-align: right; } .mapa-ped-num strong { font: 700 1rem var(--f-display); color: var(--dr-ink, var(--fg)); display: block; line-height: 1; }
.mapa-mix { grid-column: 1 / -1; display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--grid); }
.mapa-mix i { display: block; height: 100%; }
/* equipo */
.mapa-equipo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.mapa-per { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 10px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); opacity: 0.62; transition: transform 0.15s, box-shadow 0.15s; }
.mapa-per.activo { opacity: 1; }
.mapa-per:hover, .mapa-per:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 18px -14px rgb(var(--dr-sombra, 0 0 0) / 0.8); }
.mapa-per .mapa-avatar { grid-row: 1 / 3; }
.mapa-per.activo .mapa-avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #3fae7a; }
.mapa-per-txt { display: flex; flex-direction: column; min-width: 0; } .mapa-per-txt small { font-size: 0.75rem; }
.mapa-per-num { font: 700 1.15rem var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-per .mapa-spark { grid-column: 2 / 4; width: 100%; }
/* ritmo */
.mapa-ritmo { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 8px; }
.mapa-hora { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.mapa-hora small { font: 600 0.72rem var(--f-mono); color: var(--muted); }
.mapa-hora.ahora small { color: var(--dr-2, var(--accent)); font-weight: 800; }
.mapa-col { position: relative; flex: 1; width: 100%; }
.mapa-col i { position: absolute; bottom: 0; border-radius: 6px 6px 2px 2px; transition: height 0.8s cubic-bezier(0.2, 0.8, 0.3, 1); }
.mapa-col i.r-base { left: 0; right: 0; background: var(--dr-5, var(--line)); }
.mapa-col i.r-hoy { left: 22%; right: 22%; background: linear-gradient(var(--dr-3, var(--accent)), var(--dr-2, var(--accent))); }
/* oscuro: el plano mantiene colores claros legibles en las zonas */
:root[data-theme="dark"] .mp-piso { fill: #241c33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-piso { fill: #241c33; } }
@media (max-width: 980px) { .mapa-grid { grid-template-columns: 1fr; } .mapa-panel { position: static; } .mapa-carriles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .mp-flujo, .mp-led, .mp-cartel, .mp-est.cuello .mp-zona, .mapa-vivo, .mp-caja, .mp-bacha { animation: none !important; } }

.mp-ped rect { stroke-width: 1.5; } .mp-ped text { font-size: 9.5px; font-weight: 800; pointer-events: none; }
.mp-ped.entro rect { fill: #fff; stroke: var(--dr-4, #b98be0); stroke-dasharray: 3 2; } .mp-ped.entro text { fill: var(--dr-ink, #5b2d86); }
.mp-ped.armado rect { fill: var(--dr-2, #6f3a9f); stroke: var(--dr-2, #6f3a9f); } .mp-ped.armado text { fill: #fff; }
.mp-ped { animation: mp-cae 0.5s both; }
@media (max-width: 600px) { .mapa-fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .mapa-ficha { padding: 10px; gap: 8px; align-items: flex-start; }
  .mapa-ficha-ico { width: 32px; height: 32px; border-radius: 10px; font-size: 1.05rem; } .mapa-ficha strong { font-size: 1rem; } .mapa-ficha small { font-size: 0.74rem; } }
.mp-chico.fact { fill: #6f3a9f; font-weight: 800; }
.mapa-h3.mapa-sub { margin-top: 12px; }
.mapa-ped.fact { border-style: dashed; }
.mapa-fact { grid-column: 1 / -1; color: var(--dr-2, var(--accent)); font-weight: 700; }
.mapa-aviso { padding: 10px 12px; border-radius: 12px; background: var(--dr-6, var(--sunk)); border: 1px dashed var(--dr-4, var(--line)); font-size: 0.88rem; }
.mp-fact-ico { font-size: 12px; }
.mp-persona.facturando circle { animation: mp-factura 1.2s ease-in-out infinite; }
@keyframes mp-factura { 50% { stroke: #ffd24d; stroke-width: 4; } }
/* mapa: pestañas y secciones */
.mapa-tabs { position: sticky; top: 0; z-index: 4; padding: 6px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.mapa-tabs .tabs { overflow-x: auto; flex-wrap: nowrap; }
.mapa-tabs .tab { white-space: nowrap; }
.mapa-secs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mapa-sec { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 26px -22px rgb(var(--dr-sombra, 0 0 0) / 0.8); transition: transform 0.18s, box-shadow 0.18s; overflow: hidden; }
.mapa-sec::after { content: ''; position: absolute; right: -30px; top: -30px; width: 96px; height: 96px; border-radius: 50%; background: var(--dr-5, var(--sunk)); opacity: 0.7; }
.mapa-sec:hover, .mapa-sec:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 30px -20px rgb(var(--dr-sombra, 0 0 0) / 0.9); }
.mapa-sec.alerta { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); } .mapa-sec.alerta::after { background: var(--bad-soft); }
.mapa-sec-n { position: absolute; right: 16px; top: 12px; z-index: 1; font: 800 2rem/1 var(--f-display); color: var(--dr-3, var(--accent)); opacity: 0.55; }
.mapa-sec-ico { font-size: 1.6rem; position: relative; z-index: 1; }
.mapa-sec strong { font: 700 1.25rem var(--f-display); color: var(--dr-ink, var(--fg)); position: relative; z-index: 1; }
.mapa-sec ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 0.88rem; position: relative; z-index: 1; }
.mapa-sec-ver { margin-top: auto; padding-top: 6px; font-size: 0.8rem; font-weight: 700; color: var(--dr-2, var(--accent)); }
.mapa-etapas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mapa-etapa { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 12px 22px; background: var(--surface); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); animation: dr-sube 0.45s both; }
.mapa-etapa:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding-left: 16px; border-radius: 16px 0 0 16px; }
.mapa-etapa:nth-child(2) { animation-delay: 0.06s; } .mapa-etapa:nth-child(3) { animation-delay: 0.12s; } .mapa-etapa:nth-child(4) { animation-delay: 0.18s; } .mapa-etapa:nth-child(5) { animation-delay: 0.24s; }
.mapa-etapa { background: linear-gradient(135deg, var(--surface), var(--dr-6, var(--sunk))); }
.mapa-etapa.warn { background: linear-gradient(135deg, var(--surface), var(--warn-soft)); } .mapa-etapa.bad { background: linear-gradient(135deg, var(--surface), var(--bad-soft)); }
.mapa-etapa-n { position: absolute; right: 22px; top: 8px; font: 800 0.75rem var(--f-mono); color: var(--muted); }
.mapa-etapa-ico { font-size: 1.2rem; }
.mapa-etapa strong { font: 800 1.7rem/1.1 var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-etapa-tit { font-weight: 700; font-size: 0.86rem; }
.mapa-etapa small { color: var(--muted); font-size: 0.76rem; line-height: 1.3; }
.mapa-prox { margin: 0; font-weight: 700; color: var(--dr-ink, var(--fg)); }
.mapa-tiempos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mapa-tiempo { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--dr-6, var(--sunk)); border: 1px solid transparent; }
.mapa-tiempo > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mapa-tiempo strong { font: 800 1.45rem/1.15 var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-tiempo small { font-size: 0.76rem; line-height: 1.3; }
.mapa-tiempo.ok { background: var(--ok-soft); } .mapa-tiempo.warn { background: var(--warn-soft); } .mapa-tiempo.bad { background: var(--bad-soft); }
.mapa-tiempo.bad strong { color: var(--bad); }
.mapa-t { grid-column: 1 / -1; font-size: 0.74rem; color: var(--muted); font-family: var(--f-mono); }
.mapa-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.mapa-num { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 22px -20px rgb(var(--dr-sombra, 0 0 0) / 0.7); }
.mapa-num strong { font: 800 1.8rem/1.1 var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-num small { font-size: 0.8rem; line-height: 1.3; }
.mapa-num.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: linear-gradient(135deg, var(--surface), var(--bad-soft)); } .mapa-num.bad strong { color: var(--bad); }
.mapa-num.ok { background: linear-gradient(135deg, var(--surface), var(--ok-soft)); }
.mapa-recs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.mapa-rec { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); animation: dr-sube 0.4s both; }
.mapa-rec.urgente { border-color: var(--bad); box-shadow: inset 4px 0 0 var(--bad); }
.mapa-rec-cab { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mapa-rec details summary { cursor: pointer; font-weight: 700; font-size: 0.85rem; color: var(--dr-ink, var(--fg)); }
.mapa-rec.urgente details summary { color: var(--bad); }
.mapa-urg { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 0.82rem; }
.mapa-urg li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; }
.mapa-urg li small { grid-column: 2; font-size: 0.74rem; }
.mapa-urg.grande li { padding: 8px 10px; border-radius: 10px; background: var(--dr-6, var(--sunk)); font-size: 0.88rem; }
.mapa-exp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mapa-exp li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #fcefe0; border: 1px solid #f0d2ad; }
:root[data-theme="dark"] .mapa-exp li { background: #3a2a18; border-color: #5a4022; }
.mapa-exp small { font-size: 0.78rem; }
.mapa-periodo { display: flex; gap: 6px; flex-wrap: wrap; }
.mapa-barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mapa-barras li { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 0.88rem; }
.mapa-barras .mapa-barra { grid-column: auto; }
.mapa-ritmo.chico { height: 140px; }
.mapa-guardar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mapa-guardar-est { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); }
.mapa-guardar-est span { position: absolute; right: 10px; top: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font: 800 0.7rem var(--f-display); }
.mapa-guardar-est strong { font: 800 1.5rem/1.1 var(--f-display); color: var(--dr-ink, var(--fg)); }
.mapa-guardar-est small { font-size: 0.76rem; color: var(--muted); }
@media (max-width: 1180px) { .mapa-secs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) { .mapa-secs { grid-template-columns: 1fr; } .mapa-etapas { grid-template-columns: 1fr 1fr; } .mapa-etapa, .mapa-etapa:first-child { clip-path: none; border-radius: 14px; padding-left: 14px; }
  .mapa-tiempos { grid-template-columns: 1fr 1fr; } .mapa-guardar { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mapa-barras li { grid-template-columns: 96px 1fr auto; } }
.mp-persona text.mp-apodo { fill: #241a33; font-size: 8.5px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.mp-persona.ausente { opacity: 0.45; }
.mp-persona circle { stroke: #fff; stroke-width: 2; }
.mapa-avatar.foto { object-fit: cover; border: 3px solid; padding: 0; background: #fff; }
.mapa-figurita { display: block; width: min(220px, 70%); margin: 0 auto 4px; border-radius: 14px; box-shadow: 0 16px 30px -16px rgb(0 0 0 / 0.5); transform: rotate(-2deg); animation: mapa-figu 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes mapa-figu { from { transform: rotate(-12deg) scale(0.7); opacity: 0; } }
.mapa-envio { grid-column: 1 / -1; font-size: 0.74rem; color: var(--muted); }
.mp-deco .mp-npuesto { fill: #5b2d86; font-size: 9px; font-weight: 800; opacity: 1; }
.mp-deco .mp-division { stroke: #c0392b; stroke-width: 3; opacity: 1; }

/* ---------- Mapa · 🏆 Desafío del día ---------- */
body .jg section.jg-hero { display: flex; flex-direction: row; gap: 22px; align-items: center; background: linear-gradient(120deg, color-mix(in srgb, #7d45b0 10%, var(--surface)), var(--surface)); }
.jg .jg-hero-termo { flex: 0 0 auto; }
.jg .jg-big { font-size: 2.4rem; margin: 2px 0 4px; line-height: 1.1; }
.jg .jg-big small { font-size: 1rem; font-weight: 500; color: var(--muted, #667); }
.jg .jg-frase { font-size: 1.1rem; font-weight: 600; margin: 4px 0; }
.jg-termo { width: 44px; height: auto; overflow: visible; }
.jg-termo .jg-tubo { fill: color-mix(in srgb, currentColor 8%, transparent); stroke: color-mix(in srgb, currentColor 25%, transparent); }
.jg-termo .jg-mercurio { transform-origin: bottom; animation: jg-sube 1.2s cubic-bezier(.2,.8,.2,1) backwards; }
.jg-termo .jg-marca { stroke: currentColor; stroke-width: 2; stroke-dasharray: 3 2; opacity: .7; }
@keyframes jg-sube { from { transform: scaleY(0); } }
.jg-termos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; text-align: center; }
.jg-termo-est { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.jg-termo-est small { font-size: .75rem; color: var(--muted, #667); }
.jg-semaforos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.jg-semaforo { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, currentColor 4%, transparent); }
.jg-semaforo strong { display: block; } .jg-semaforo small { color: var(--muted, #667); }
.jg-luces { display: inline-flex; flex-direction: column; gap: 3px; padding: 5px 4px; background: #2b2b33; border-radius: 8px; }
.jg-luces i { width: 12px; height: 12px; border-radius: 50%; background: #4a4a55; }
.jg-semaforo.bad .jg-luces .r { background: #ff4d4d; box-shadow: 0 0 8px #ff4d4d; }
.jg-semaforo.warn .jg-luces .a { background: #ffc233; box-shadow: 0 0 8px #ffc233; }
.jg-semaforo.ok .jg-luces .v { background: #39d07a; box-shadow: 0 0 8px #39d07a; }
.jg-rachas { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.jg-racha { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; border: 1px solid var(--line, #e4e4ea); }
.jg-racha strong { font-size: 1.5rem; } .jg-racha-ico { font-size: 1.6rem; filter: grayscale(1); opacity: .5; }
.jg-racha.on { border-color: #f0a040; background: color-mix(in srgb, #f0a040 8%, transparent); }
.jg-racha.on .jg-racha-ico { filter: none; opacity: 1; animation: jg-llama 1.6s ease-in-out infinite; display: inline-block; }
@keyframes jg-llama { 50% { transform: scale(1.12) rotate(-4deg); } }
.jg-cal { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.jg-dia { min-width: 30px; padding: 4px 6px; text-align: center; border-radius: 8px; font-size: .8rem; background: color-mix(in srgb, currentColor 6%, transparent); }
.jg-dia.ok { background: #2e9e5b; color: #fff; } .jg-dia.mal { background: color-mix(in srgb, #d9534f 18%, transparent); }
.jg-dia.hoy { outline: 2px dashed #7d45b0; }
.jg-podio { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding-top: 8px; }
.jg-escalon { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 31%; max-width: 140px; text-align: center; }
.jg-escalon .mapa-avatar { width: 52px; height: 52px; font-size: 1rem; }
.jg-escalon.e1 .mapa-avatar { width: 64px; height: 64px; }
.jg-escalon small { font-size: .75rem; color: var(--muted, #667); }
.jg-bloque { width: 100%; border-radius: 10px 10px 0 0; display: grid; place-items: center; font-size: 1.6rem; color: #fff;
  animation: jg-sube 1s cubic-bezier(.2,.8,.2,1) backwards; transform-origin: bottom; }
.jg-escalon.e1 .jg-bloque { height: 90px; background: linear-gradient(#f4c542, #d9a21b); }
.jg-escalon.e2 .jg-bloque { height: 64px; background: linear-gradient(#c9ced8, #9aa1ad); animation-delay: .15s; }
.jg-escalon.e3 .jg-bloque { height: 46px; background: linear-gradient(#e3a676, #b9753f); animation-delay: .3s; }
.jg-medallas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.jg-medalla { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 1px dashed var(--line, #d8d8e0); opacity: .55; }
.jg-medalla .jg-medalla-ico { font-size: 2rem; filter: grayscale(1); }
.jg-medalla.ganada { opacity: 1; border-style: solid; border-color: #e0b040; background: radial-gradient(circle at 50% 0, color-mix(in srgb, #f4c542 18%, transparent), transparent 70%); }
.jg-medalla.ganada .jg-medalla-ico { filter: none; animation: jg-brillo 2.4s ease-in-out infinite; }
@keyframes jg-brillo { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg) scale(1.08); } }
@media (max-width: 640px) {
  body .jg section.jg-hero { gap: 12px; padding: 16px; } .jg .jg-big { font-size: 1.8rem; }
  .jg-termos { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
  .jg-semaforos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .jg *, .jg-termo * { animation: none !important; } }

/* ---------- Mapa · 4 · Servicio ---------- */
.sv-ok { background: #2e9e5b !important; } .sv-warn { background: #e0a02e !important; } .sv-bad { background: #d9534f !important; }
.sv-farm li { grid-template-columns: minmax(110px, 1.2fr) 2fr auto; }
.sv-farm li > small { grid-column: 1 / -1; margin-top: -4px; }
.sv-dias .mapa-col { position: relative; }
.sv-dias .mapa-col::after { content: ''; position: absolute; left: 0; right: 0; bottom: 85%; border-top: 1px dashed var(--muted); opacity: .6; }
.txt-ok { color: #2e9e5b; }



/* ---------- un solo menú lateral (23/11): logo de la app, Inicio, módulos y cuenta; se pliega a íconos ---------- */
.plataforma { grid-template-columns: 252px minmax(0, 1fr); grid-template-areas: "modnav main"; transition: grid-template-columns .22s ease; }
.plataforma > .rail { display: none; }
.modnav { padding: 18px 12px 12px; gap: 16px; }
.modnav-logo { display: flex; align-items: center; gap: 10px; padding: 0 4px 4px; text-decoration: none; }
.modnav-icono { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; box-shadow: 0 3px 10px rgb(10 58 130 / .18); }
.modnav-marca { display: block; min-width: 0; }
.modnav-marca img { width: 150px; height: auto; display: block; }
.modnav .nav-inicio .ico { color: var(--accent); }
.modnav .who { padding: 10px 4px 0; }
.who-fila { display: flex; align-items: center; gap: 10px; }
.who-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who-txt strong, .who-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-cuenta { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font: 700 0.78rem var(--f-body); cursor: pointer; }
.who-cuenta:hover { filter: brightness(1.15); }
.nav-plegar { width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.nav-plegar:hover, .nav-plegar:focus-visible { background: var(--sunk); color: var(--fg); }
.nav-plegar .flecha { transition: transform .22s ease; transform-origin: 15px 12px; transform: rotate(180deg); }
body.menu-cerrado .nav-plegar .flecha { transform: none; }
@media (min-width: 861px) {
  body.menu-cerrado .plataforma { grid-template-columns: 76px minmax(0, 1fr); }
  body.menu-cerrado .modnav { padding: 16px 10px 12px; align-items: center; overflow-x: hidden; }
  body.menu-cerrado .modnav-marca, body.menu-cerrado .nav-grupo-txt, body.menu-cerrado .nav-flecha, body.menu-cerrado .nav-sub,
  body.menu-cerrado .nav-inicio > span:not(.ico), body.menu-cerrado .who-txt, body.menu-cerrado .abrir-fuera { display: none; }
  body.menu-cerrado .modnav .nav { width: 100%; align-items: center; }
  body.menu-cerrado .nav-inicio, body.menu-cerrado .nav-grupo > summary { width: 48px; height: 44px; padding: 0; justify-content: center; position: relative; }
  body.menu-cerrado .nav-grupo { width: 48px; }
  body.menu-cerrado .nav-grupo.actual > summary { background: var(--m-soft); }
  body.menu-cerrado .nav-grupo .punto { position: absolute; top: 7px; right: 7px; }
  body.menu-cerrado .who-fila { flex-direction: column; gap: 8px; }
  body.menu-cerrado .modnav-logo { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .plataforma, .nav-plegar .flecha { transition: none; } }
.modnav-logo img.modnav-icono { width: 42px; height: 42px; }
.modnav-logo .modnav-marca img { width: 140px; }

/* ---------- ícono de la app: la pieza del módulo se desprende ---------- */
.icono-app { overflow: visible; display: block; }
.modnav-logo .icono-app.modnav-icono { width: 50px; height: 50px; flex: 0 0 50px; box-shadow: none; border-radius: 0; }
.top-iso .icono-app { width: 40px; height: 40px; }
.ia-pieza { transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.ia-pieza.fuera { transform: translate(calc(var(--dx) * 95px), calc(var(--dy) * 95px)) rotate(calc(var(--dx) * var(--dy) * -8deg)); filter: drop-shadow(0 20px 22px rgb(0 0 0 / .3)); }

.icono-app.anima .ia-pieza.fuera { animation: ia-sale .7s cubic-bezier(.3, 1.6, .5, 1) .15s backwards; }
@keyframes ia-sale { from { transform: none; filter: none; } }
.modnav-logo:hover .ia-pieza.fuera { transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .ia-pieza, .icono-app.anima .ia-pieza.fuera { transition: none; animation: none; } }
.icono-app .ia-g { filter: drop-shadow(0 8px 10px rgb(0 0 0 / .25)); }

/* ---------- Droguería · Control de stock (vencimientos y cuarentena) ---------- */
body[data-mod="drogueria"] main[data-vista="drog-control"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4V3h6v1'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E"); }
.drog-control .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .drog-control .grid-2, .modal .grid-2 { grid-template-columns: 1fr; } }
.modal .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ctl-buscador { position: relative; display: flex; flex-direction: column; gap: 4px; }
.ctl-resultados { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; border-radius: 8px; }
.ctl-resultados:not(:empty) { border: 1px solid var(--line); }
.ctl-resultados li { border-bottom: 1px solid var(--line); }
.ctl-resultados li.muted { padding: 8px 10px; }
.ctl-resultados button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--fg); }
.ctl-resultados button:hover, .ctl-resultados button:focus-visible { background: var(--sunk); }
.ctl-resultados button span:nth-child(2) { flex: 1; }
.ctl-pt { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.ctl-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ctl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ctl-filtros select { width: auto; }
.ctl-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ctl-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); }
.ctl-item.bad { border-left-color: var(--bad); } .ctl-item.warn { border-left-color: var(--warn); } .ctl-item.info { border-left-color: #3b7be0; } .ctl-item.ok { border-left-color: #2e9e5b; }
.ctl-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ctl-vence { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.ctl-item.bad .ctl-vence small { color: var(--bad); font-weight: 600; }
.ctl-acciones { display: flex; gap: 6px; }
.ctl-nota { font-size: .85rem; }
@media (max-width: 760px) {
  .ctl-item { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .ctl-acciones { grid-column: 2 / -1; }
}
.drog-control .check, .modal .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.drog-control .check input, .modal .check input { width: auto; flex: none; }
.ctl-est { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 12px; padding: 12px 14px; }
.ctl-est.listo { opacity: .75; }
.ctl-est-cab { display: grid; grid-template-columns: 12px auto 1fr auto; gap: 10px; align-items: center; }
.ctl-est-cab small { min-width: 0; }
.ctl-recs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.ctl-rec { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ctl-rec .ctl-txt { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.ctl-rec-in { display: flex; gap: 6px; align-items: center; }
.ctl-rec-in input { width: 110px; }
.ctl-rec.ok > small { color: var(--ok); font-weight: 600; } .ctl-rec.warn > small { color: var(--warn); font-weight: 600; } .ctl-rec.bad > small { color: var(--bad); font-weight: 600; } .ctl-rec.info > small { color: var(--info); }
@media (max-width: 640px) { .ctl-est-cab { grid-template-columns: 12px 1fr auto; } .ctl-est-cab small { grid-column: 2 / -1; grid-row: 2; } .ctl-rec-in { width: 100%; } .ctl-rec-in input { flex: 1; width: auto; } }

/* ===== IT, RRHH y Analytics: lavada de cara =====
   Misma lógica que la Droguería (cartel con dibujos, tarjetas redondeadas, kpis grandes, pestañas píldora), cada uno con su color:
   IT turquesa, RRHH rosa y Analytics verde. Las reglas son las mismas; cambian los tonos (--dr-*), el patrón y el ícono de cada sección. */
body[data-mod="it"] {
  --dr-1: #06505c; --dr-2: #0a7b8a; --dr-3: #0e9fb3; --dr-4: #5cc9d8; --dr-5: #cdeef3; --dr-6: #eef9fb; --dr-ink: #0a6c79; --dr-sombra: 10 108 121; --dr-glow: 120 220 232;
  --accent: #0b8797; --accent-ink: #ffffff; --accent-soft: #dcf3f6; --bg: #f2fafb; --sunk: #e6f4f6; --line: #d3e9ec; --grid: #e7f3f5; --r: 14px;
  --dr-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'%3E%3Crect x='16' y='20' width='34' height='22' rx='3'/%3E%3Cpath d='M27 48h12M33 42v6'/%3E%3Cpath d='M110 34a14 14 0 0 1 20 0M114 39a8 8 0 0 1 12 0'/%3E%3Ccircle cx='120' cy='44' r='1.5'/%3E%3Ccircle cx='200' cy='30' r='9'/%3E%3Cpath d='M200 17v4M200 39v4M187 30h4M209 30h4'/%3E%3Cpath d='M58 104l14 14M70 104a6 6 0 1 0 4 8'/%3E%3Cpath d='M150 100h28a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4h-18l-8 6v-6h-2a4 4 0 0 1-4-4v-14a4 4 0 0 1 4-4z'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 130l6 6-6 6M112 142h8'/%3E%3C/svg%3E");
  background: var(--bg); }
:root[data-theme="dark"] body[data-mod="it"] { --dr-ink: #7fdcea; --dr-5: #1d3f44; --dr-6: #14292c; --dr-sombra: 0 0 0; --accent: #5fd0df; --accent-ink: #04232a; --accent-soft: #173a3f; --bg: #0d1719; --surface: #132225; --sunk: #182c30; --line: #24424a; --grid: #1b3236; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-mod="it"] { --dr-ink: #7fdcea; --dr-5: #1d3f44; --dr-6: #14292c; --dr-sombra: 0 0 0; --accent: #5fd0df; --accent-ink: #04232a; --accent-soft: #173a3f; --bg: #0d1719; --surface: #132225; --sunk: #182c30; --line: #24424a; --grid: #1b3236; } }
body[data-mod="it"] .main { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="tickets"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3a2 2 0 0 0 0-4z'/%3E%3Cpath d='M14 5v14' stroke-dasharray='2 2'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="equipos"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="it-reportes"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="it-base"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19V5M9 8h6M9 12h5'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="soporte"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13v-1a8 8 0 0 1 16 0v1'/%3E%3Crect x='3' y='13' width='4' height='6' rx='1.5'/%3E%3Crect x='17' y='13' width='4' height='6' rx='1.5'/%3E%3Cpath d='M19 19a3 3 0 0 1-3 3h-3'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="grabot"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v4'/%3E%3Ccircle cx='12' cy='3' r='1'/%3E%3Crect x='4' y='7' width='16' height='13' rx='5'/%3E%3Ccircle cx='9' cy='13' r='1.4'/%3E%3Ccircle cx='15' cy='13' r='1.4'/%3E%3Cpath d='M9.5 17h5'/%3E%3C/svg%3E"); }
body[data-mod="it"] main[data-vista="usuarios"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0'/%3E%3Cpath d='M16 4.5a3 3 0 0 1 0 6M18 14a5 5 0 0 1 3 6'/%3E%3C/svg%3E"); }
body[data-mod="rrhh"] {
  --dr-1: #7a1b45; --dr-2: #b02e62; --dr-3: #d9467a; --dr-4: #ef8db0; --dr-5: #f9d9e5; --dr-6: #fdf1f5; --dr-ink: #a8285a; --dr-sombra: 168 40 90; --dr-glow: 250 170 200;
  --accent: #c23a6d; --accent-ink: #ffffff; --accent-soft: #fbe4ed; --bg: #fdf5f8; --sunk: #f9e9ef; --line: #f0dbe3; --grid: #f7e9ee; --r: 14px;
  --dr-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'%3E%3Ccircle cx='34' cy='26' r='7'/%3E%3Cpath d='M22 46a12 12 0 0 1 24 0'/%3E%3Cpath d='M120 26c-4-6-14-4-14 3 0 6 14 13 14 13s14-7 14-13c0-7-10-9-14-3z'/%3E%3Crect x='186' y='16' width='28' height='26' rx='3'/%3E%3Cpath d='M186 24h28M194 12v6M206 12v6'/%3E%3Ccircle cx='68' cy='114' r='11'/%3E%3Cpath d='M68 107v7l5 3'/%3E%3Ccircle cx='160' cy='104' r='6'/%3E%3Cpath d='M150 122a10 10 0 0 1 20 0'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E");
  background: var(--bg); }
:root[data-theme="dark"] body[data-mod="rrhh"] { --dr-ink: #f39bbd; --dr-5: #4a2132; --dr-6: #2a1720; --dr-sombra: 0 0 0; --accent: #f28db3; --accent-ink: #2a0c18; --accent-soft: #3e1f2c; --bg: #1a0f14; --surface: #24151c; --sunk: #2d1a23; --line: #43283a; --grid: #331d28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-mod="rrhh"] { --dr-ink: #f39bbd; --dr-5: #4a2132; --dr-6: #2a1720; --dr-sombra: 0 0 0; --accent: #f28db3; --accent-ink: #2a0c18; --accent-soft: #3e1f2c; --bg: #1a0f14; --surface: #24151c; --sunk: #2d1a23; --line: #43283a; --grid: #331d28; } }
body[data-mod="rrhh"] .main { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0'/%3E%3Cpath d='M16 4.5a3 3 0 0 1 0 6M18 14a5 5 0 0 1 3 6'/%3E%3C/svg%3E"); }
body[data-mod="rrhh"] main[data-vista="cobertura"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3Cpath d='M8 15l2.5 2.5L16 13'/%3E%3C/svg%3E"); }
body[data-mod="rrhh"] main[data-vista="empleados"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3Cpath d='M7.5 18a4.5 4.5 0 0 1 9 0'/%3E%3C/svg%3E"); }
body[data-mod="analytics"] {
  --dr-1: #0b4a32; --dr-2: #13724c; --dr-3: #1f9d6b; --dr-4: #6fd0a6; --dr-5: #cdeedf; --dr-6: #eff9f4; --dr-ink: #13724c; --dr-sombra: 19 114 76; --dr-glow: 140 230 190;
  --accent: #178257; --accent-ink: #ffffff; --accent-soft: #dcf3e9; --bg: #f3faf6; --sunk: #e6f4ed; --line: #d4eade; --grid: #e6f3ec; --r: 14px;
  --dr-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'%3E%3Cpath d='M18 46V34M28 46V24M38 46V30M48 46V18M14 46h40'/%3E%3Ccircle cx='120' cy='30' r='14'/%3E%3Cpath d='M120 16v14h14'/%3E%3Cpath d='M180 40l12-12 10 8 16-18'/%3E%3Ccircle cx='180' cy='40' r='2'/%3E%3Ccircle cx='218' cy='18' r='2'/%3E%3Cpath d='M56 118l10-8 8 6 12-12'/%3E%3Crect x='146' y='98' width='36' height='24' rx='3'/%3E%3Cpath d='M154 114v-6M162 114v-10M170 114v-4'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Ccircle cx='104' cy='138' r='3'/%3E%3Ccircle cx='116' cy='132' r='3'/%3E%3C/svg%3E");
  background: var(--bg); }
:root[data-theme="dark"] body[data-mod="analytics"] { --dr-ink: #7fdcb2; --dr-5: #1c4434; --dr-6: #132a21; --dr-sombra: 0 0 0; --accent: #5fd1a0; --accent-ink: #032117; --accent-soft: #173a2d; --bg: #0c1712; --surface: #12211a; --sunk: #172b22; --line: #224234; --grid: #1a3328; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-mod="analytics"] { --dr-ink: #7fdcb2; --dr-5: #1c4434; --dr-6: #132a21; --dr-sombra: 0 0 0; --accent: #5fd1a0; --accent-ink: #032117; --accent-soft: #173a2d; --bg: #0c1712; --surface: #12211a; --sunk: #172b22; --line: #224234; --grid: #1a3328; } }
body[data-mod="analytics"] .main { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3Cpath d='M3 7l6-3 6 5 6-4'/%3E%3C/svg%3E"); }
body[data-mod="analytics"] main[data-vista="tableros"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='8' height='8' rx='1.5'/%3E%3Crect x='13' y='3' width='8' height='5' rx='1.5'/%3E%3Crect x='13' y='10' width='8' height='11' rx='1.5'/%3E%3Crect x='3' y='13' width='8' height='8' rx='1.5'/%3E%3C/svg%3E"); }
/* encabezado: cartel violeta con patrón de cápsulas y cajas que se desplaza despacio */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head { position: relative; isolation: isolate; overflow: hidden; align-items: center; padding: 24px 26px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgb(var(--dr-glow) / 0.75) 0, transparent 50%), linear-gradient(118deg, var(--dr-1), var(--dr-2) 55%, var(--dr-3));
  box-shadow: 0 18px 34px -20px rgb(var(--dr-sombra) / 0.7); animation: dr-cartel 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--dr-patron) 0 0 / 240px 160px; animation: dr-patron 60s linear infinite; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head::after { content: ''; position: absolute; z-index: -1; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.18), transparent 65%); animation: dr-brillo 7s ease-in-out infinite alternate; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head > div:first-child { position: relative; padding-left: 80px; min-height: 62px; justify-content: center; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head > div:first-child::before { content: ''; position: absolute; left: 0; top: 50%; width: 62px; height: 62px; margin-top: -31px; border-radius: 19px;
  background: #fff; box-shadow: 0 10px 20px -8px rgb(30 10 50 / 0.45), inset 0 -4px 0 var(--dr-5); animation: dr-flota 4.5s ease-in-out infinite; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head > div:first-child::after { content: ''; position: absolute; left: 14px; top: 50%; width: 34px; height: 34px; margin-top: -19px;
  background: linear-gradient(135deg, var(--dr-2), var(--dr-4)); -webkit-mask: var(--dr-ico) center / contain no-repeat; mask: var(--dr-ico) center / contain no-repeat; animation: dr-flota 4.5s ease-in-out infinite; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head h1 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); letter-spacing: -0.02em; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head .eyebrow { color: rgb(255 255 255 / 0.78); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head .muted, body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head p { color: rgb(255 255 255 / 0.86); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head .field-label, body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head label { color: rgb(255 255 255 / 0.9); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head .btn { background: rgb(255 255 255 / 0.14); color: #fff; border-color: rgb(255 255 255 / 0.4); backdrop-filter: blur(4px); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head .btn:hover { background: rgb(255 255 255 / 0.24); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head .btn.primary { background: #fff; color: var(--dr-2); border-color: #fff; box-shadow: 0 6px 14px -6px rgb(30 10 50 / 0.5); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head input, body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head select { background: #fff; color: #241a33; border-color: transparent; }

/* botones: redondeados y con un toque de relieve */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .btn { border-radius: 999px; padding-inline: 16px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .btn:hover { transform: translateY(-1px); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .btn:active { transform: translateY(1px) scale(0.98); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .btn.primary { background: linear-gradient(135deg, var(--dr-2), var(--dr-3)); border-color: transparent; box-shadow: 0 6px 14px -8px rgb(var(--dr-sombra) / 0.8); }

/* tarjetas: blancas, redondeadas, con sombra lila y entrada escalonada */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.drog-grid .block, .drogueria .block, .table-wrap, .ex-ola, .temp-turno, .ind-grid > .block, .rc-col, .bachas-resumen, .bachas-porsuc) {
  border-radius: 18px; border-color: var(--line); box-shadow: 0 1px 0 rgb(var(--dr-sombra) / 0.04), 0 12px 26px -20px rgb(var(--dr-sombra) / 0.55); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .rc-col { background: var(--dr-6); border: 1px dashed var(--dr-5); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .rc-card { border-radius: 12px; transition: transform 0.15s, box-shadow 0.15s; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .rc-card:hover { transform: translateY(-2px) rotate(-0.4deg); box-shadow: 0 10px 18px -12px rgb(var(--dr-sombra) / 0.6); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > * { animation: dr-sube 0.5s calc(0.08s + var(--dr-n, 0) * 0.07s) cubic-bezier(0.2, 0.8, 0.3, 1.1) both; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > :nth-child(2) { --dr-n: 1; } body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > :nth-child(3) { --dr-n: 2; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > :nth-child(4) { --dr-n: 3; } body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > :nth-child(n+5) { --dr-n: 4; }

/* títulos de cada bloque con su marquita */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .block-head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 1.12rem; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .block-head h2::before { content: ''; width: 12px; height: 12px; border-radius: 4px; flex: none; background: linear-gradient(135deg, var(--dr-2), var(--dr-4)); transform: rotate(45deg); }

/* indicadores (kpi): número grande violeta, burbuja de color en la esquina, se levantan al pasar el mouse */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi, .tk-kpis .kpi, .drog-ultima, .drog-turno) { position: relative; overflow: hidden; border-radius: 16px; border-color: var(--line); transition: transform 0.2s, box-shadow 0.2s; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi, .tk-kpis .kpi) { background: var(--surface); padding: 16px 18px; box-shadow: 0 10px 22px -20px rgb(var(--dr-sombra) / 0.7); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi, .tk-kpis .kpi)::after { content: ''; position: absolute; right: -26px; top: -26px; width: 78px; height: 78px; border-radius: 50%; background: var(--dr-5); opacity: 0.7; transition: transform 0.4s; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi, .tk-kpis .kpi):hover { transform: translateY(-3px); box-shadow: 0 16px 26px -18px rgb(var(--dr-sombra) / 0.8); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi, .tk-kpis .kpi):hover::after { transform: scale(1.35); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi-val, .tk-kpis .kpi strong, .drog-ultima strong) { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 700; color: var(--dr-ink); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .kpi-val { font-size: 1.95rem; line-height: 1.1; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tk-kpis .kpi strong { font-size: 1.7rem; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi-label, .kpi small, .tk-kpis .kpi span) { position: relative; z-index: 1; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi.bad, .kpi-bad, .tk-kpis .kpi.bad) { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi.bad, .kpi-bad, .tk-kpis .kpi.bad)::after { background: var(--bad-soft); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.kpi.bad, .kpi-bad) .kpi-val, body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tk-kpis .kpi.bad strong { color: var(--bad); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .kpi-good::after { background: var(--ok-soft); } body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .kpi-warn::after { background: var(--warn-soft); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .drog-turno { background: var(--dr-6); border: 1px solid var(--dr-5); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .drog-turno.est-hecho { background: var(--ok-soft); border-color: transparent; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .drog-turno.est-ahora { background: var(--warn-soft); border-color: transparent; animation: dr-late 1.6s ease-in-out infinite; }

/* pestañas: píldoras; la elegida en violeta */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tabs { border-radius: 999px; padding: 4px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 18px -16px rgb(var(--dr-sombra) / 0.6); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tab { border-radius: 999px; padding: 7px 14px; transition: background 0.2s, color 0.2s; }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tab:hover { color: var(--dr-ink); background: var(--dr-6); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tab.on { background: linear-gradient(135deg, var(--dr-2), var(--dr-3)); color: #fff; box-shadow: 0 6px 14px -8px rgb(var(--dr-sombra) / 0.9); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tab.on .tab-count { color: rgb(255 255 255 / 0.85); }

/* tablas: encabezado lila */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tbl th { background: var(--dr-6); color: var(--dr-ink); border-bottom-color: var(--dr-5); }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tbl.hover tbody tr:hover, body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .tbl tbody tr:hover { background: var(--dr-6); }

/* menú lateral del módulo: el ítem abierto en violeta */
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .subnav a.on, body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .modnav .sub a.on { background: linear-gradient(90deg, var(--dr-5), transparent); color: var(--dr-ink); }

@media (max-width: 860px) {
  body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head { padding: 18px; border-radius: 18px; }
  body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head > div:first-child { padding-left: 64px; min-height: 50px; }
  body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head > div:first-child::before { width: 50px; height: 50px; margin-top: -25px; border-radius: 15px; }
  body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .view > .view-head > div:first-child::after { left: 12px; width: 26px; height: 26px; margin-top: -15px; }
  body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main .kpi-val { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.view > *, .view-head, .view-head::before, .view-head::after, .view-head > div::before, .view-head > div::after, .drog-turno) { animation: none !important; } }
body:is([data-mod="it"], [data-mod="rrhh"], [data-mod="analytics"], [data-mod="farmacias"]) .main :is(.tk-lista > li, .tk-card, .gb-item, .cob-mes, .eq-card, .tablero-card, .kb-art) { border-radius: 16px; box-shadow: 0 10px 22px -20px rgb(var(--dr-sombra) / 0.6); }

/* ===== Inicio: los módulos como piezas de rompecabezas =====
   La forma la dibuja pieza.js (encastrar) según dónde quedó cada tarjeta: lengüeta hacia la vecina de la derecha o de abajo,
   hueco en la otra. Cada pieza tiene un tinte de su color; al pasar el mouse se levanta y el borde toma el color del módulo. */
.mod-cards.pz { gap: 4px; }
.mod-cards.pz.n5 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .mod-cards.pz.n5 > :nth-child(-n+3) { grid-column: span 2; } .mod-cards.pz.n5 > :nth-child(n+4) { grid-column: span 3; }
.mod-cards.pz.n4, .mod-cards.pz.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mod-cards.pz.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .mod-cards.pz.n5, .mod-cards.pz.n4, .mod-cards.pz.n3, .mod-cards.pz.n2 { grid-template-columns: minmax(0, 1fr); } .mod-cards.pz > * { grid-column: auto !important; } }
.hoy .hoy-item { padding: 7px 10px; } .hoy .hoy-item small { font-size: 0.76rem; }
.hoy .hoy-lista { gap: 5px; } .hoy .hoy-item strong { font-size: 0.9rem; }
.mod-card.pieza { position: relative; isolation: isolate; background: transparent; border: 0; border-radius: 0; overflow: visible; z-index: 0;
  transition: transform 0.3s cubic-bezier(0.3, 0.8, 0.3, 1.3), filter 0.3s; animation: ini-pz 0.7s calc(0.05s + var(--i, 0) * 0.09s) cubic-bezier(0.22, 0.9, 0.28, 1.12) backwards; }
.mod-card.pieza .pz-forma { position: absolute; z-index: -1; overflow: visible; pointer-events: none; }
.mod-card.pieza .pz-fondo { fill: color-mix(in srgb, var(--m) 7%, var(--surface)); transition: fill 0.3s; }
.mod-card.pieza .pz-borde { fill: none; stroke: color-mix(in srgb, var(--m) 40%, var(--line)); stroke-width: 1.4; stroke-linejoin: round; transition: stroke 0.3s, stroke-width 0.3s; }
.mod-card.pieza:hover { transform: translateY(-4px) rotate(-0.5deg); filter: drop-shadow(0 14px 18px rgb(0 0 0 / 0.14)); z-index: 3; }
.mod-card.pieza:hover .pz-fondo { fill: color-mix(in srgb, var(--m) 12%, var(--surface)); }
.mod-card.pieza:hover .pz-borde { stroke: var(--m); stroke-width: 2; }
.mod-card.pieza .mod-nums { border-top-color: color-mix(in srgb, var(--m) 25%, var(--line)); }
.mod-card.pieza .mod-logo { position: relative; }
@keyframes ini-pz { 0% { opacity: 0; transform: translateY(18px) rotate(-3deg) scale(0.96); } 70% { opacity: 1; transform: translateY(-2px) rotate(0.4deg) scale(1.01); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mod-card.pieza { animation: none; transition: none; } }

/* Para hacer hoy + Cómo venimos */
.ind-ini { display: flex; flex-direction: column; gap: 12px; }
.hoy-pend { display: flex; flex-direction: column; gap: 12px; } .ind-ini:not([hidden]) + .hoy-pend { padding-top: 14px; border-top: 1px solid var(--line); }
.ind-ini[hidden] { display: none; }
.ind-ini h2 { font-size: 1.1rem; }
.ind-ini-mod h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--m-ink); }
.ind-ini-pz { width: 14px; height: 14px; border-radius: 4px; background: var(--m); flex: none;
  -webkit-mask: radial-gradient(circle 3.5px at 100% 50%, #0000 96%, #000); mask: radial-gradient(circle 3.5px at 100% 50%, #0000 96%, #000); }
.ind-ini-mod ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ind-ini-mod a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none;
  background: var(--sunk); border-left: 3px solid var(--m); font-size: 0.9rem; }
.ind-ini-mod a:hover { background: var(--m-soft); }
.ind-ini-mod strong { font-family: var(--f-display); font-size: 1rem; white-space: nowrap; }
.ind-ini-mod .t-ok { color: var(--ok); } .ind-ini-mod .t-warn { color: var(--warn); } .ind-ini-mod .t-bad { color: var(--bad); }

/* GraBot dentro de la app: botón redondo (el nombre aparece al pasar el mouse), buscador de secciones */
.gb.en-app .gb-boton { width: 52px; padding: 0; justify-content: center; }
.gb.en-app .gb-boton .gb-etq { display: none; }
.gb.en-app .gb-boton:hover:not(.on) { width: auto; padding: 0 18px 0 12px; }
.gb.en-app .gb-boton:hover:not(.on) .gb-etq { display: inline; }
.gb-form input[hidden] { display: none; }
.gb-buscar { display: flex; flex-direction: column; gap: 6px; }
.gb-res { display: flex; flex-direction: column; gap: 6px; }
.gb-ir { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.gb-ir:hover, .gb-ir:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.gb-ir small, .gb-nada { color: var(--muted); font-size: 0.8rem; }
body:has(.carrito-bar:not([hidden])) .gb.en-app { bottom: 96px; }
@media (max-width: 860px) { .gb.en-app { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } .gb.en-app .gb-boton { width: 46px; height: 46px; } }
@media print { .gb { display: none !important; } }

/* ===== Inicio a todo color =====
   Cada pieza con el degradé de su módulo, un dibujo de fondo con sus íconos y uno grande de marca de agua.
   El logo va sobre una "figurita" blanca. Al entrar, las piezas llegan desde afuera y encajan; al pasar el mouse, la pieza se levanta. */
.mod-card.pieza.mod-drogueria { --pz-a: #a06fcc; --pz-b: #5b2a86; --pz-ink: #6f3f99; --pz-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Crect x='14' y='22' width='30' height='14' rx='7' transform='rotate%28-25 29 29%29'/%3E%3Cpath d='M24 24l8 14' transform='rotate%28-25 29 29%29'/%3E%3Cpath d='M104 20l16-8 16 8v18l-16 8-16-8z'/%3E%3Cpath d='M104 20l16 8 16-8M120 28v18'/%3E%3Cpath d='M196 12v22'/%3E%3Ccircle cx='196' cy='38' r='5'/%3E%3Ccircle cx='62' cy='112' r='9'/%3E%3Cpath d='M56 106l12 12'/%3E%3Cpath d='M150 100h30v22h-30z'/%3E%3Cpath d='M150 108h30'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E"); --pz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Cpath d='M3 8l9-5 9 5v8l-9 5-9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E"); }
.mod-card.pieza.mod-compras { --pz-a: #f0954a; --pz-b: #b8511a; --pz-ink: #a3480f; --pz-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Cpath d='M12 18h6l5 22h22l5-16H21'/%3E%3Ccircle cx='26' cy='46' r='2.5'/%3E%3Ccircle cx='42' cy='46' r='2.5'/%3E%3Cpath d='M108 14h24v32l-4-3-4 3-4-3-4 3-4-3-4 3z'/%3E%3Cpath d='M113 24h14M113 31h10'/%3E%3Cpath d='M186 18l14-6 14 6v16l-14 6-14-6z'/%3E%3Cpath d='M186 18l14 6 14-6M200 24v16'/%3E%3Cpath d='M50 104l16-2 16 16-14 14-16-16z'/%3E%3Ccircle cx='58' cy='110' r='2'/%3E%3Cpath d='M152 104h28M152 114h20M152 124h24'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E"); --pz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Cpath d='M3 4h2l2.5 11h10l2.5-8H6'/%3E%3Ccircle cx='9' cy='19' r='1.4'/%3E%3Ccircle cx='17' cy='19' r='1.4'/%3E%3C/svg%3E"); }
.mod-card.pieza.mod-it { --pz-a: #1fb8cc; --pz-b: #086675; --pz-ink: #0a6c79; --pz-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Crect x='16' y='20' width='34' height='22' rx='3'/%3E%3Cpath d='M27 48h12M33 42v6'/%3E%3Cpath d='M110 34a14 14 0 0 1 20 0M114 39a8 8 0 0 1 12 0'/%3E%3Ccircle cx='120' cy='44' r='1.5'/%3E%3Ccircle cx='200' cy='30' r='9'/%3E%3Cpath d='M200 17v4M200 39v4M187 30h4M209 30h4'/%3E%3Cpath d='M150 100h28a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4h-18l-8 6v-6h-2a4 4 0 0 1-4-4v-14a4 4 0 0 1 4-4z'/%3E%3Cpath d='M60 104l-6 8 6 8M74 104l6 8-6 8'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E"); --pz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
.mod-card.pieza.mod-rrhh { --pz-a: #e8628f; --pz-b: #a32656; --pz-ink: #a8285a; --pz-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Ccircle cx='34' cy='26' r='7'/%3E%3Cpath d='M22 46a12 12 0 0 1 24 0'/%3E%3Cpath d='M120 26c-4-6-14-4-14 3 0 6 14 13 14 13s14-7 14-13c0-7-10-9-14-3z'/%3E%3Crect x='186' y='16' width='28' height='26' rx='3'/%3E%3Cpath d='M186 24h28M194 12v6M206 12v6'/%3E%3Ccircle cx='68' cy='114' r='11'/%3E%3Cpath d='M68 107v7l5 3'/%3E%3Ccircle cx='160' cy='104' r='6'/%3E%3Cpath d='M150 122a10 10 0 0 1 20 0'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E"); --pz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0'/%3E%3Cpath d='M16 4.5a3 3 0 0 1 0 6M18 14a5 5 0 0 1 3 6'/%3E%3C/svg%3E"); }
.mod-card.pieza.mod-analytics { --pz-a: #34b981; --pz-b: #106a46; --pz-ink: #13724c; --pz-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Cpath d='M18 46V34M28 46V24M38 46V30M48 46V18M14 46h40'/%3E%3Ccircle cx='120' cy='30' r='14'/%3E%3Cpath d='M120 16v14h14'/%3E%3Cpath d='M180 40l12-12 10 8 16-18'/%3E%3Cpath d='M56 118l10-8 8 6 12-12'/%3E%3Crect x='146' y='98' width='36' height='24' rx='3'/%3E%3Cpath d='M154 114v-6M162 114v-10M170 114v-4'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Ccircle cx='104' cy='138' r='3'/%3E%3Ccircle cx='116' cy='132' r='3'/%3E%3C/svg%3E"); --pz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.mod-card.pieza { color: #fff; }
.mod-card.pieza .pz-fondo { fill: var(--pz-a); }
.mod-card.pieza .pz-patron { fill: none; }
.mod-card.pieza .pz-borde { stroke: rgb(255 255 255 / 0.55); stroke-width: 1.6; }
.mod-card.pieza:hover .pz-fondo { fill: var(--pz-a); }
.mod-card.pieza:hover .pz-borde { stroke: #fff; stroke-width: 2.4; }
.mod-card.pieza::after { content: ''; position: absolute; right: 6%; bottom: 8%; width: min(42%, 150px); aspect-ratio: 1; background: var(--pz-ico) center / contain no-repeat;
  transform: rotate(-12deg); pointer-events: none; z-index: -1; transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.3, 1.4); }
.mod-card.pieza:hover::after { transform: rotate(4deg) scale(1.08); }
.mod-card.pieza .mod-logo { align-self: flex-start; background: #fff; padding: 10px 14px; border-radius: 14px; box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.45);
  transform: rotate(-2.5deg); transition: transform 0.4s cubic-bezier(0.3, 0.8, 0.3, 1.5); }
.mod-card.pieza:nth-child(even) .mod-logo { transform: rotate(2deg); }
.mod-card.pieza:hover .mod-logo { transform: rotate(0) scale(1.04); }
.mod-card.pieza .mod-logo img { height: 50px; }
.mod-card.pieza .mod-desc { color: rgb(255 255 255 / 0.9); font-weight: 500; }
.mod-card.pieza .mod-nums { border-top: 0; padding-top: 2px; gap: 5px; }
.mod-card.pieza .mod-nums li { align-items: center; padding: 6px 6px 6px 12px; border-radius: 10px; background: rgb(255 255 255 / 0.14); backdrop-filter: blur(2px); color: #fff; }
.mod-card.pieza .mod-nums li > :last-child { min-width: 30px; text-align: center; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--pz-ink); font-weight: 800; font-family: var(--f-display); }
.mod-card.pieza .mod-nums li.t-bad { background: rgb(255 255 255 / 0.22); font-weight: 600; }
.mod-card.pieza .mod-nums li.t-bad > :last-child { background: #ffd84d; color: #5a3b00; }
.mod-card.pieza .mod-acciones .btn { background: #fff; color: var(--pz-ink); border-color: #fff; font-weight: 700; }
.mod-card.pieza .mod-acciones .btn.primary { background: var(--pz-b); color: #fff; border-color: rgb(255 255 255 / 0.6); }
.mod-card.pieza .mod-acciones .btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.mod-card.pieza:hover { transform: translate(var(--hx, 0), calc(var(--hy, 0px) - 6px)) rotate(var(--hr, -1deg)) scale(1.015); filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.22)); }
.mod-card.pieza:active { transform: scale(0.985); transition-duration: 0.1s; }
.mod-card.pieza:nth-child(3n+2) { --hr: 1deg; } .mod-card.pieza:nth-child(3n) { --hr: -0.6deg; }
/* llegada: cada pieza viene desde su lado (--dx, --dy los pone pieza.js) y encaja con un rebote */
.mod-card.pieza { animation: ini-pz-llega 0.9s calc(0.08s + var(--i, 0) * 0.11s) cubic-bezier(0.2, 0.9, 0.25, 1.15) backwards; }
@keyframes ini-pz-llega { 0% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 40px)) rotate(var(--dr, -8deg)) scale(0.9); }
  60% { opacity: 1; } 82% { transform: translate(0, 0) rotate(0) scale(1.02); } 100% { transform: none; } }
/* destello que recorre las piezas cuando terminan de encajar */
.mod-cards.pz::after { content: ''; position: absolute; inset: -10px; pointer-events: none; z-index: 5; border-radius: 20px;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.45) 50%, transparent 65%) -150% 0 / 60% 100% no-repeat;
  animation: ini-brillo 1.1s 1.25s ease-in-out both; mix-blend-mode: soft-light; }
.mod-cards.pz { position: relative; }
@keyframes ini-brillo { from { background-position: -150% 0; } to { background-position: 250% 0; } }
@media (prefers-reduced-motion: reduce) { .mod-card.pieza, .mod-cards.pz::after { animation: none; } .mod-card.pieza:hover { transform: none; } }
.mod-card.pieza .mod-nums li.t-bad.cero { background: rgb(255 255 255 / 0.14); font-weight: 400; } .mod-card.pieza .mod-nums li.t-bad.cero > :last-child { background: #fff; color: var(--pz-ink); }

/* Ingreso: aviso de sesión cerrada y captcha */
.login-aviso { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-left: 4px solid var(--warn); font-size: 0.9rem; }
.login-captcha { min-height: 65px; display: flex; justify-content: center; }

/* Recepción · cronómetro de carga en Quantio */
.cg-cabeza { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cg-cabeza p { margin: 0; flex: 1 1 260px; }
.cg-empezar { font-size: 1.05rem; padding: 14px 22px; border-radius: 14px; box-shadow: 0 10px 20px -12px rgb(var(--dr-sombra, 0 0 0) / 0.7); }
.cg-cursos { display: grid; gap: 10px; }
.cg-curso { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: 0 10px 22px -18px rgb(0 0 0 / 0.5); }
.cg-curso-txt { flex: 1 1 220px; display: flex; flex-direction: column; } .cg-curso-txt small { color: var(--muted); }
.cg-reloj { font-family: var(--f-mono, monospace); font-size: 1.8rem; font-variant-numeric: tabular-nums; color: var(--accent); min-width: 110px; text-align: right; }
.cg-acc { display: flex; gap: 6px; }
.cg-pulso { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: cg-pulso 1.6s infinite; }
@keyframes cg-pulso { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .cg-pulso { animation: none; } }

/* Guías de uso */
.guias .toolbar input[type="search"] { min-width: 220px; }
.guias-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.guia { display: flex; gap: 16px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 22px -20px rgb(0 0 0 / 0.5); }
.guia-oculta { opacity: 0.6; }
.guia-tapa { all: unset; cursor: pointer; flex: none; position: relative; width: 76px; height: 98px; border-radius: 6px 14px 6px 6px;
  background: linear-gradient(150deg, var(--navy, #0a3a82), #2f6fd6); box-shadow: 0 10px 16px -10px rgb(10 58 130 / 0.7); transition: transform 0.25s cubic-bezier(0.3, 0.8, 0.3, 1.4); }
.guia-tapa:hover, .guia-tapa:focus-visible { transform: rotate(-4deg) translateY(-3px); }
.guia:nth-child(5n+2) .guia-tapa { background: linear-gradient(150deg, #6f3f99, #a06fcc); } .guia:nth-child(5n+3) .guia-tapa { background: linear-gradient(150deg, #0a6c79, #1fb8cc); }
.guia:nth-child(5n+4) .guia-tapa { background: linear-gradient(150deg, #a8285a, #e8628f); } .guia:nth-child(5n) .guia-tapa { background: linear-gradient(150deg, #b8511a, #f0954a); }
.guia-pdf { position: absolute; left: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: #fff; color: var(--ink, #111); font: 800 0.7rem var(--f-display); letter-spacing: 0.05em; }
.guia-hoja { position: absolute; inset: 12px 12px auto 12px; height: 34px; border-top: 3px solid rgb(255 255 255 / 0.7); border-bottom: 3px solid rgb(255 255 255 / 0.45); }
.guia-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.guia-txt strong { font-size: 1.05rem; } .guia-txt p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.guia-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.guia-acc { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.guia-publicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.gb.en-app { z-index: 40; }

/* ===== Farmacias Grassi: color de marca (verde de Farmacias Grassi) ===== */
:root { --m-farmacias: #71a850; --m-farmacias-ink: #4c7d2f; --m-farmacias-soft: #edf6e7; }
:root[data-theme="dark"] { --m-farmacias-ink: #a5d68a; --m-farmacias-soft: #1f2f18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m-farmacias-ink: #a5d68a; --m-farmacias-soft: #1f2f18; } }
.mod-farmacias, [data-mod="farmacias"] { --m: var(--m-farmacias); --m-ink: var(--m-farmacias-ink); --m-soft: var(--m-farmacias-soft); }
.mod-card.pieza.mod-farmacias { --pz-a: #86bd5f; --pz-b: #3f7a26; --pz-ink: #3f7a26; --pz-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Cpath d='M24 14h10v10h10v10H34v10H24V34H14V24h10z'/%3E%3Crect x='104' y='14' width='30' height='14' rx='7' transform='rotate%28-25 119 21%29'/%3E%3Cpath d='M190 12h20v6h-20zM192 18h16v26h-16z'/%3E%3Ccircle cx='62' cy='112' r='10'/%3E%3Cpath d='M55 105l14 14'/%3E%3Cpath d='M150 100h30l-4 26h-22z'/%3E%3Cpath d='M158 100v-6h14v6'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E"); --pz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Cpath d='M9 3h6v6h6v6h-6v6H9v-6H3V9h6z'/%3E%3C/svg%3E"); }
body[data-mod="farmacias"] {
  --dr-1: #2f5c1b; --dr-2: #4c7d2f; --dr-3: #71a850; --dr-4: #a5d68a; --dr-5: #dcefd0; --dr-6: #f2f9ee; --dr-ink: #4c7d2f; --dr-sombra: 60 110 40; --dr-glow: 190 235 160;
  --accent: #4f8a31; --accent-ink: #ffffff; --accent-soft: #e3f2da; --bg: #f5faf2; --sunk: #e9f3e3; --line: #d9e9cf; --grid: #e8f2e1; --r: 14px;
  --dr-patron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160' width='240' height='160' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'%3E%3Cpath d='M24 14h10v10h10v10H34v10H24V34H14V24h10z'/%3E%3Crect x='104' y='14' width='30' height='14' rx='7' transform='rotate%28-25 119 21%29'/%3E%3Cpath d='M190 12h20v6h-20zM192 18h16v26h-16z'/%3E%3Ccircle cx='62' cy='112' r='10'/%3E%3Cpath d='M55 105l14 14'/%3E%3Cpath d='M150 100h30l-4 26h-22z'/%3E%3Cpath d='M158 100v-6h14v6'/%3E%3Cpath d='M222 120v12M216 126h12'/%3E%3Cpath d='M20 140v10M15 145h10'/%3E%3Cpath d='M100 136l6 6 10-12'/%3E%3C/svg%3E");
  background: var(--bg); }
:root[data-theme="dark"] body[data-mod="farmacias"] { --dr-ink: #a5d68a; --dr-5: #2a4220; --dr-6: #172312; --dr-sombra: 0 0 0; --accent: #8fcf6c; --accent-ink: #0f2108; --accent-soft: #223a18; --bg: #0e150b; --surface: #152012; --sunk: #1a2a15; --line: #2a4220; --grid: #1f3318; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-mod="farmacias"] { --dr-ink: #a5d68a; --dr-5: #2a4220; --dr-6: #172312; --dr-sombra: 0 0 0; --accent: #8fcf6c; --accent-ink: #0f2108; --accent-soft: #223a18; --bg: #0e150b; --surface: #152012; --sunk: #1a2a15; --line: #2a4220; --grid: #1f3318; } }
body[data-mod="farmacias"] .main { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='1'%3E%3Cpath d='M9 3h6v6h6v6h-6v6H9v-6H3V9h6z'/%3E%3C/svg%3E"); }
body[data-mod="farmacias"] main[data-vista="farm-mi"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='1'%3E%3Cpath d='M3 10l9-6 9 6v10H3z'/%3E%3Cpath d='M10 14h4M12 12v4'/%3E%3C/svg%3E"); }
body[data-mod="farmacias"] main[data-vista="farm-red"] { --dr-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='1'%3E%3Ccircle cx='6' cy='6' r='2.5'/%3E%3Ccircle cx='18' cy='6' r='2.5'/%3E%3Ccircle cx='6' cy='18' r='2.5'/%3E%3Ccircle cx='18' cy='18' r='2.5'/%3E%3Cpath d='M12 9v6M9 12h6'/%3E%3C/svg%3E"); }
/* Farmacias · vistas */
.farm .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.farm .chips .chip { font: 600 0.85rem var(--f-body, inherit); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.farm .chips .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.farm-dia h3 { font-size: 0.95rem; margin: 0 0 6px; text-transform: capitalize; }
.farm-probs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.farm-probs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); }
.farm-probs li.t-falta { border-left-color: var(--bad); }
.farm-probs li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.farm-prob-der { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.farm .fila-alerta td { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.farm .fila-click { cursor: pointer; } .farm .fila-click:hover td { background: var(--accent-soft); }
.farm .th-orden { all: unset; cursor: pointer; } .farm .th-orden.on { color: var(--accent); text-decoration: underline; }
.farm .txt-ok { color: var(--ok); } .farm .txt-warn { color: var(--warn); }
.farm-pie { font-size: 0.82rem; }
.mod-cards.pz.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .mod-cards.pz.n6 { grid-template-columns: minmax(0, 1fr); } }

/* Burbu, la mascota de GraBot: flota, parpadea, saluda con el bracito y la antena titila */
.burbu { display: block; overflow: visible; flex: none; }
.burbu .bb-cuerpo { animation: bb-flota 3.2s ease-in-out infinite; transform-origin: 110px 216px; }
.burbu .bb-sombra { animation: bb-sombra 3.2s ease-in-out infinite; transform-origin: 110px 224px; }
.burbu .bb-ojo { animation: bb-parpadeo 4.5s infinite; transform-origin: center; transform-box: fill-box; }
.burbu .bb-brazo { animation: bb-saluda 1.6s ease-in-out 3; transform-origin: 48px 140px; }
.burbu .bb-luz { animation: bb-luz 2.4s ease-in-out infinite; }
.burbu.bb-piensa .bb-punto { animation: bb-luz 1s ease-in-out infinite; }
.burbu.bb-piensa .bb-punto + .bb-punto { animation-delay: 0.3s; }
.burbu.bb-contento .bb-cuerpo { animation: bb-salta 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 2, bb-flota 3.2s ease-in-out 1.2s infinite; }
.burbu.bb-uy .bb-cuerpo { animation: bb-niega 0.5s ease-in-out 2; }
@keyframes bb-flota { 50% { transform: translateY(-6px); } }
@keyframes bb-sombra { 50% { transform: scaleX(0.85); opacity: 0.1; } }
@keyframes bb-parpadeo { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes bb-saluda { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-22deg); } 75% { transform: rotate(14deg); } }
@keyframes bb-luz { 50% { opacity: 0.45; } }
@keyframes bb-salta { 40% { transform: translateY(-16px) scale(1.04, 0.97); } }
@keyframes bb-niega { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .burbu * { animation: none !important; } }
.gb-boton .burbu { margin: -14px -2px -4px -4px; filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.3)); }
.gb.en-app .gb-boton .burbu { margin: -12px 0 -2px; }
.gb-avatar { background: radial-gradient(circle at 40% 35%, #ffffff, #cfdcef); overflow: visible; }
.gb-avatar .burbu { margin-top: -6px; }
.gb-titulo .gb-avatar { background: radial-gradient(circle at 40% 35%, #ffffff, #cfdcef); }
.gb-head .gb-avatar { width: 46px; height: 46px; }

/* Burbu responde dudas: la pregunta y los pedacitos del manual donde está la respuesta */
.gb-duda { display: flex; flex-direction: column; gap: 6px; }
.gb-duda textarea { resize: vertical; min-height: 52px; }
.gb-duda .btn { align-self: flex-end; }
.gb-kb { background: var(--surface, #fff); border: 1px solid var(--line, #e2e5ea); border-left: 4px solid #0e9fb3; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.gb-kb strong { font-size: 13px; }
.gb-kb small { color: var(--muted, #6b7280); font-size: 11px; }
.gb-kb p { margin: 2px 0 4px; font-size: 12.5px; line-height: 1.4; }
.gb-kb mark { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 3px; }
.gb-kb .gb-chip { align-self: flex-start; }
@media (prefers-color-scheme: dark) { .gb-kb mark { background: #6b5d12; } }

/* IT · Preguntas a Burbu */
.kb-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 4px 0 14px; }
.kb-resumen .card { padding: 14px 16px; }
.kb-resumen h3 { margin: 0 0 10px; font-size: 14px; }
.kb-barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kb-barras li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; align-items: center; gap: 8px; font-size: 13px; }
.kb-barras li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-barras li i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #0e9fb3 var(--w), color-mix(in srgb, #0e9fb3 15%, transparent) var(--w)); }
.kb-barras li b { text-align: right; font-variant-numeric: tabular-nums; }
.kb-temas { display: flex; flex-wrap: wrap; gap: 6px; }

/* Burbu más grande (botón flotante y cabecera del chat) */
.gb-boton { height: 64px; border-radius: 32px; padding: 0 20px 0 10px; }
.gb.en-app .gb-boton { width: 68px; height: 68px; border-radius: 50%; }
.gb.en-app .gb-boton:hover:not(.on) { width: auto; border-radius: 34px; padding: 0 20px 0 10px; }
.gb.en-app .gb-boton .burbu { margin: -16px 0 -4px; }
.gb-head .gb-avatar { width: 54px; height: 54px; }
@media (max-width: 860px) { .gb.en-app .gb-boton { width: 60px; height: 60px; } }
@media (max-width: 640px) { .gb-boton { height: 58px; } }

/* Droguería · Mapa en modo TV: sin menú ni barras, números grandes arriba y el plano abajo (para la tele del depósito) */
body.modo-tv .modnav, body.modo-tv .top-movil, body.modo-tv .subnav, body.modo-tv .tabbar, body.modo-tv .gb, body.modo-tv .demo-bar,
body.modo-tv .drog-mapa > .view-head { display: none !important; }
body.modo-tv .shell, body.modo-tv .plataforma { display: block; }
body.modo-tv .main { padding: 14px 18px 18px; max-width: none; }
.tv-banda { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.3fr) minmax(0, 3.2fr) minmax(220px, 1.2fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.tv-titulo { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 14px; border-radius: 16px; background: linear-gradient(135deg, #915ebd, #6d3f99); color: #fff; position: relative; }
.tv-titulo strong { font-size: 20px; letter-spacing: .02em; }
.tv-titulo small { color: rgb(255 255 255 / .85); font-size: 13px; }
.tv-reloj { font-size: 44px; font-weight: 700; line-height: 1; }
.tv-salir { position: absolute; top: 8px; right: 8px; padding: 2px 8px; font-size: 12px; opacity: .35; background: transparent; color: #fff; border-color: rgb(255 255 255 / .5); }
.tv-salir:hover, .tv-salir:focus-visible { opacity: 1; }
.tv-grupo { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; padding: 10px 12px 12px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e2e5ea); }
.tv-eti { flex-basis: 100%; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #915ebd; }
.tv-kpi { flex: 1 1 120px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, #915ebd 7%, transparent); }
.tv-kpi .tv-ic { grid-row: 1 / 3; font-size: 28px; }
.tv-kpi strong { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-kpi small { font-size: 14px; color: var(--muted, #6b7280); }
.tv-kpi.warn { background: var(--warn-soft, #fff4dc); } .tv-kpi.warn strong { color: var(--warn, #b26a00); }
.tv-kpi.bad { background: var(--bad-soft, #fde8e8); } .tv-kpi.bad strong { color: var(--bad, #c0392b); }
.tv-kpi.ok strong { color: var(--ok, #2e7d32); }
body.modo-tv .main > * { max-width: none; }
body.modo-tv .view { gap: 0; }
body.modo-tv .mapa-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
body.modo-tv .mapa-svg { height: calc(100vh - 250px); max-height: none; }
body.modo-tv .mapa-plano .mapa-nota { display: none; }
body.modo-tv .mapa-panel { max-height: calc(100vh - 230px); overflow: auto; }
@media (max-width: 1200px) { .tv-banda { grid-template-columns: 1fr 1fr; } }

/* Droguería · Hoy: tarjetas del día con su estado (atrasado, pendiente, al día) */
.hoy-resumen { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.hoy-anillo { --p: 0; width: 92px; height: 92px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 77%), conic-gradient(#915ebd calc(var(--p) * 1%), color-mix(in srgb, #915ebd 14%, transparent) 0); }
.hoy-anillo strong { font-size: 22px; line-height: 1; } .hoy-anillo small { color: var(--muted); font-size: 12px; }
.hoy-frase { font-size: 20px; } .hoy-resumen p { margin: 4px 0 0; }
.hoy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hoy-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); }
.hoy-card.est-mal { border-left-color: var(--bad, #c0392b); } .hoy-card.est-pend { border-left-color: var(--warn, #b26a00); } .hoy-card.est-ok { border-left-color: var(--ok, #2e7d32); }
.hoy-card.est-nada { opacity: .75; }
.hoy-cab { display: flex; align-items: center; gap: 10px; } .hoy-cab h2 { flex: 1; margin: 0; font-size: 16px; } .hoy-ic { font-size: 24px; }
.hoy-lineas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; flex: 1; }
.hoy-lineas .t-bad { color: var(--bad, #c0392b); font-weight: 600; } .hoy-lineas .t-warn { color: var(--warn, #b26a00); } .hoy-lineas .t-ok { color: var(--ok, #2e7d32); }
.hoy-turnos { display: flex; flex-wrap: wrap; gap: 6px; }
.hoy-card .btn { align-self: flex-start; }
.hoy-pie { font-size: 12px; }

/* ---------- RRHH · Banco de horas ---------- */
.bh-motivos { display: flex; flex-wrap: wrap; gap: 6px; }
.bh-mot { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.88rem; cursor: pointer; color: inherit; }
.bh-mot.on { border-color: var(--accent, #5b6ee1); box-shadow: inset 0 0 0 1px var(--accent, #5b6ee1); font-weight: 600; }
.bh-res { border-radius: 10px; padding: 10px 12px; background: var(--surface-2, rgba(127,127,127,.08)); display: flex; flex-direction: column; gap: 4px; }
.bh-res:empty { display: none; }
.bh-res.ok div { color: var(--ok); font-weight: 600; } .bh-res.bad div { color: var(--bad); font-weight: 600; }
.bh-pos { color: var(--ok); font-weight: 600; } .bh-neg { color: var(--bad); font-weight: 600; }
.bh-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; } .bh-dl dt { color: var(--muted); font-size: 0.85rem; } .bh-dl dd { margin: 0; }
.bh-hist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.bh-pend { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.bh-varios { max-height: 50vh; overflow: auto; } .bh-varios input { width: 90px; }

/* ---------- RRHH · Financiaciones ---------- */
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pr-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.pr-card.clic { cursor: pointer; } .pr-card.clic:hover { border-color: var(--accent, #c03a6b); }
.pr-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .pr-ent { margin-right: auto; }
.pr-card h3 { margin: 0; font-size: 1.05rem; }
.pr-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 0.9rem; }
.pr-det { margin: 0; font-size: 0.88rem; color: var(--muted); white-space: pre-wrap; }

/* En el celular nada se sale de la pantalla: las lengüetas de las piezas y Burbu no agrandan la página */
html, body { overflow-x: clip; max-width: 100%; }
.mod-cards.pz { overflow-x: clip; overflow-y: visible; }

/* ---------- Guías de uso: la biblioteca (un libro por módulo, un capítulo por guía) ---------- */
.libro-farmacias { --la: #6fae4a; --lb: #3f7a25; } .libro-drogueria { --la: #a06fcc; --lb: #5b2a86; } .libro-compras { --la: #f09a55; --lb: #b8511a; }
.libro-it { --la: #1fb8cc; --lb: #0a6c79; } .libro-rrhh { --la: #e8628f; --lb: #a8285a; } .libro-analytics { --la: #3fbf86; --lb: #157a4f; } .libro-grassi { --la: #5b78c9; --lb: #1d3d8f; }
.biblio { position: relative; padding: 8px 4px 0; }
.biblio-estante { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; align-items: end; position: relative; z-index: 1; }
.biblio-tabla { height: 14px; margin-top: -6px; border-radius: 4px; background: linear-gradient(#c79a6b, #9b6d43); box-shadow: 0 6px 14px rgba(80, 50, 20, .25); }
.libro { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; min-height: 230px; border-radius: 4px 12px 12px 4px; padding: 16px 14px 14px 26px;
  color: #fff; background: linear-gradient(155deg, var(--la), var(--lb)); box-shadow: inset -6px 0 10px rgba(0,0,0,.12), 0 10px 18px rgba(20, 20, 40, .18); transition: transform .18s ease, box-shadow .18s ease; }
.libro:hover, .libro:focus-visible { transform: translateY(-8px) rotate(-1.5deg); box-shadow: inset -6px 0 10px rgba(0,0,0,.12), 0 18px 26px rgba(20, 20, 40, .25); }
.libro:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.libro-lomo { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; border-radius: 4px 0 0 4px; background: rgba(0,0,0,.22); box-shadow: inset -2px 0 0 rgba(255,255,255,.25); }
.libro-tapa { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.libro-tapa img { width: 96px; height: auto; background: #fff; border-radius: 10px; padding: 6px 8px; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.libro-tapa strong { font: 700 1.2rem var(--f-display); line-height: 1.15; margin-top: 6px; } .libro-tapa small { font-size: .82rem; opacity: .9; line-height: 1.35; }
.libro-caps { align-self: flex-start; margin-top: 10px; font-size: .75rem; font-weight: 700; background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 999px; }
.libro-abierto { border-radius: var(--r); padding: 14px 18px 18px; color: #fff; background: linear-gradient(135deg, var(--la), var(--lb)); display: flex; flex-direction: column; gap: 10px; }
.libro-abierto .link { color: #fff; align-self: flex-start; }
.libro-cab { display: flex; align-items: center; gap: 16px; } .libro-cab img { width: 110px; background: #fff; border-radius: 12px; padding: 8px 10px; }
.libro-cab h2 { margin: 0; color: #fff; } .libro-cab p { margin: 2px 0 0; opacity: .92; }
.cap-titulo { margin: 6px 0 0; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.capitulos .guia { position: relative; }
.cap-num { position: absolute; top: -10px; left: -10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 .9rem var(--f-display); color: #fff; background: var(--ink, #1d1b2a); box-shadow: 0 0 0 3px var(--bg, #fff); }
.cap-libro { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .biblio-estante { grid-template-columns: 1fr 1fr; gap: 16px 12px; } .libro { min-height: 200px; padding-left: 22px; } .libro-tapa img { width: 80px; } .libro-tapa small { display: none; } }

/* Burbu en reposo toma mate (cada tanto da un sorbo y sale vapor); cuando atiende, lee un libro y pasa las hojas */
.burbu .bb-mate { animation: bb-sorbo 7s ease-in-out infinite; transform-origin: 166px 182px; transform-box: view-box; }
.burbu .bb-mano-mate { animation: bb-sorbo 7s ease-in-out infinite; transform-origin: 166px 182px; transform-box: view-box; }
.burbu .bb-vapor { animation: bb-vapor 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }
.burbu .bb-vapor2 { animation-delay: 1.3s; }
.burbu .bb-hoja { animation: bb-hoja 4.5s ease-in-out infinite; transform-origin: 110px 185px; transform-box: view-box; }
@keyframes bb-sorbo { 0%, 62%, 100% { transform: rotate(0); } 70%, 84% { transform: rotate(-9deg) translate(-3px, -5px); } }
@keyframes bb-vapor { 0% { opacity: 0; transform: translateY(4px) scaleY(.7); } 40% { opacity: .75; } 100% { opacity: 0; transform: translateY(-8px) scaleY(1.1); } }
@keyframes bb-hoja { 0%, 70%, 100% { transform: scaleX(1); } 80% { transform: scaleX(-1); opacity: .95; } 81%, 99% { opacity: 0; transform: scaleX(-1); } }

/* ---------- Guías: la biblioteca de verdad (mueble de madera, lomos en los estantes y el libro abierto sobre la mesa) ---------- */
.mueble { --madera: #7a4a2a; --madera-2: #5c351c; --fondo: #3b2414; position: relative; padding: 18px 18px 22px; border-radius: 14px 14px 8px 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 3px, transparent 3px 11px), linear-gradient(180deg, var(--madera), var(--madera-2));
  box-shadow: 0 18px 30px rgba(40, 20, 5, .35), inset 0 2px 0 rgba(255,255,255,.12); }
.mueble-cartel { display: flex; justify-content: center; margin: -4px 0 14px; }
.mueble-cartel span { font: 700 .82rem var(--f-display); letter-spacing: .22em; text-transform: uppercase; color: #f6e7c8; padding: 6px 18px; border-radius: 6px;
  background: linear-gradient(#a8743f, #845428); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 6px rgba(0,0,0,.3); }
.estante { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 250px; padding: 14px 16px 0; margin-bottom: 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,214,150,.16), transparent 70%), repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 2px, transparent 2px 22px), var(--fondo);
  box-shadow: inset 0 14px 18px rgba(0,0,0,.45), inset 10px 0 14px rgba(0,0,0,.3), inset -10px 0 14px rgba(0,0,0,.3); border-radius: 4px; }
.estante-tabla { position: absolute; left: -10px; right: -10px; bottom: -14px; height: 16px; border-radius: 3px; background: linear-gradient(#a06a3c, #6e4222); box-shadow: 0 6px 10px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.18); z-index: 2; }
/* lomos */
.lomo { all: unset; box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; flex: none; width: var(--ancho, 56px); height: var(--alto, 94%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0 12px; border-radius: 5px 5px 2px 2px; color: #fff;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.16) 18%, rgba(255,255,255,0) 40%, rgba(0,0,0,.08) 75%, rgba(0,0,0,.32)), linear-gradient(180deg, var(--la), var(--lb));
  box-shadow: 2px 0 0 rgba(0,0,0,.25), 0 4px 6px rgba(0,0,0,.4); transition: transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .25s; transform-origin: bottom center; }
.lomo:hover, .lomo:focus-visible { transform: translateY(-16px); box-shadow: 2px 0 0 rgba(0,0,0,.25), 0 16px 18px rgba(0,0,0,.45); }
.lomo:focus-visible { outline: 3px solid #ffd34d; outline-offset: 3px; }
.lomo.inclinado { transform: rotate(-7deg) translateX(6px); margin-left: 10px; }
.lomo.inclinado:hover, .lomo.inclinado:focus-visible { transform: rotate(0) translateY(-16px); }
.lomo-banda { width: 100%; height: 5px; background: linear-gradient(90deg, #b8913a, #f3d98a, #b8913a); opacity: .9; box-shadow: 0 7px 0 -3px rgba(243,217,138,.55); }
.lomo-banda.abajo { margin-top: auto; box-shadow: 0 -7px 0 -3px rgba(243,217,138,.55); }
.lomo-sello { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 2px rgba(243,217,138,.8); flex: none; }
.lomo-sello img { width: 60px; max-width: none; object-fit: cover; object-position: 50% 80%; height: 30px; }
.lomo-titulo { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 1rem var(--f-display); letter-spacing: .04em; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.35); flex: 1; display: flex; align-items: center; }
.lomo-caps { font: 800 .72rem var(--f-display); background: rgba(0,0,0,.25); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; }
/* adornos */
.adorno { position: relative; flex: none; align-self: flex-end; display: block; pointer-events: none; }
.adorno.sujeta { width: 14px; height: 90px; margin-right: 4px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #555, #9a9a9a, #555); }
.adorno.viejos { display: flex; align-items: flex-end; gap: 2px; margin: 0 8px; }
.adorno.viejos i { display: block; width: 20px; border-radius: 3px 3px 1px 1px; background: linear-gradient(90deg, rgba(0,0,0,.3), rgba(255,255,255,.1) 30%, rgba(0,0,0,.25)), #8c3b2e; height: 150px; }
.adorno.viejos i:nth-child(2) { background-color: #2f5a4a; height: 170px; } .adorno.viejos i:nth-child(3) { background-color: #b08a3a; height: 135px; transform: rotate(8deg); transform-origin: bottom left; margin-left: 4px; }
.adorno.pila { display: flex; flex-direction: column-reverse; align-items: center; margin: 0 10px; }
.adorno.pila i { display: block; height: 16px; border-radius: 3px; background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(0,0,0,.2)), #6a4a8a; width: 96px; border-bottom: 3px solid #efe3c8; }
.adorno.pila i:nth-child(2) { background-color: #2b6f8a; width: 88px; transform: translateX(5px); } .adorno.pila i:nth-child(3) { background-color: #a8453a; width: 92px; transform: translateX(-4px); } .adorno.pila i:nth-child(4) { background-color: #3f7a3a; width: 80px; }
.adorno.planta { width: 70px; height: 120px; margin: 0 10px; }
.adorno.planta .maceta { position: absolute; bottom: 0; left: 12px; width: 46px; height: 40px; border-radius: 4px 4px 12px 12px; background: linear-gradient(90deg, #a85a32, #d98a5a, #a85a32); }
.adorno.planta .hojas { position: absolute; bottom: 34px; left: 0; width: 70px; height: 80px; background:
  radial-gradient(ellipse 12px 26px at 35% 60%, #3f8f4a 98%, transparent), radial-gradient(ellipse 12px 26px at 65% 55%, #5aa85f 98%, transparent),
  radial-gradient(ellipse 10px 24px at 50% 40%, #4a9a50 98%, transparent), radial-gradient(ellipse 9px 22px at 20% 40%, #6ab86a 98%, transparent), radial-gradient(ellipse 9px 22px at 80% 38%, #3d8545 98%, transparent); }
.adorno.mate { width: 54px; height: 90px; margin: 0 10px; }
.adorno.mate .calabaza { position: absolute; bottom: 0; left: 6px; width: 40px; height: 46px; border-radius: 6px 6px 22px 22px; background: radial-gradient(circle at 35% 35%, #b07a40, #6e4520); border-top: 5px solid #d8b660; }
.adorno.mate .bombilla { position: absolute; bottom: 36px; left: 28px; width: 4px; height: 54px; border-radius: 2px; background: linear-gradient(90deg, #aab2bc, #eef1f4, #aab2bc); transform: rotate(14deg); transform-origin: bottom; }
.adorno.globo { width: 70px; height: 116px; margin: 0 10px; }
.adorno.globo .esfera { position: absolute; top: 0; left: 4px; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8fd0f0, #2a7fb8 60%, #1a4f7a); box-shadow: inset -8px -6px 0 rgba(0,0,0,.12); }
.adorno.globo .esfera::after { content: ''; position: absolute; inset: 14px 10px 18px 16px; border-radius: 40% 60% 50% 40%; background: #6ab86a; opacity: .85; }
.adorno.globo .pie { position: absolute; bottom: 0; left: 18px; width: 34px; height: 54px; background: linear-gradient(#c9a24a, #8a6a2a) 50% 0/4px 44px no-repeat, radial-gradient(ellipse 17px 6px at 50% 100%, #8a6a2a 98%, transparent); }
.mueble-ayuda { text-align: center; margin: 6px 0 0; color: #f6e7c8; font-size: .85rem; opacity: .85; }
/* el libro abierto sobre la mesa */
.mesa { padding: 18px; border-radius: 14px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 2px, transparent 2px 14px), linear-gradient(160deg, #8a5a32, #5c351c); box-shadow: inset 0 2px 0 rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 14px; }
.mesa-volver { align-self: flex-start; }
.libro-abierto2 { display: grid; grid-template-columns: 1fr 1fr; padding: 10px; border-radius: 10px; background: linear-gradient(180deg, var(--la), var(--lb)); box-shadow: 0 20px 34px rgba(0,0,0,.45); animation: abrir-libro .45s ease-out; }
@keyframes abrir-libro { from { transform: perspective(1200px) rotateY(-28deg) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.pagina { position: relative; min-height: 380px; padding: 28px 30px 40px; color: #2b2418; background: #fbf6ea; }
.pagina.izq { border-radius: 6px 0 0 6px; background: linear-gradient(90deg, #fbf6ea 85%, #e6dcc4); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.pagina.der { border-radius: 0 6px 6px 0; background: linear-gradient(90deg, #e6dcc4, #fbf6ea 15%); }
.pagina.izq img { width: 150px; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.pagina.izq h2 { margin: 6px 0 0; font-size: 1.7rem; color: var(--lb); } .pagina.izq p { margin: 0; max-width: 30ch; color: #5a4c34; } .pagina.izq small { color: #8a7a5a; }
.pagina.der h3 { margin: 0 0 14px; font: 700 1.3rem var(--f-display); color: var(--lb); border-bottom: 2px solid #e2d6b8; padding-bottom: 8px; }
.indice { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.indice li.oculta { opacity: .55; }
.indice-cap { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: auto auto 1fr auto; align-items: baseline; gap: 8px; border-radius: 6px; padding: 4px 6px; }
.indice-cap:hover, .indice-cap:focus-visible { background: rgba(0,0,0,.05); } .indice-cap:focus-visible { outline: 2px solid var(--lb); }
.indice-num { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lb); white-space: nowrap; }
.indice-tit { font-weight: 700; } .indice-puntos { border-bottom: 2px dotted #c9b88f; transform: translateY(-4px); min-width: 20px; }
.indice-abrir { font-weight: 800; color: var(--lb); white-space: nowrap; }
.indice li small { display: block; color: #7a6a4a; padding: 0 6px; font-size: .85rem; }
.indice-editar { font-size: .8rem; margin-left: 6px; }
.folio { position: absolute; bottom: 12px; right: 18px; font-size: .8rem; color: #a89870; }
@media (max-width: 640px) {
  .mueble { padding: 12px 10px 16px; } .estante { height: 210px; padding: 10px 8px 0; gap: 3px; }
  .lomo-titulo { font-size: .88rem; } .adorno.globo, .adorno.planta { transform: scale(.8); transform-origin: bottom; margin: 0 2px; }
  .adorno.viejos i { width: 14px; } .adorno.pila i { width: 70px; }
  .libro-abierto2 { grid-template-columns: 1fr; } .pagina.izq { min-height: 0; border-radius: 6px 6px 0 0; padding: 20px; background: #fbf6ea; } .pagina.der { border-radius: 0 0 6px 6px; background: #fbf6ea; min-height: 0; }
  .pagina.izq img { width: 110px; } .indice-cap { grid-template-columns: 1fr auto; } .indice-num { grid-column: 1 / -1; } .indice-puntos { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lomo, .libro-abierto2 { transition: none; animation: none; } }
.estante { justify-content: space-around; }
.estante-libros { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.lomo { height: var(--alto, 94%); min-height: 190px; }
.lomo-sello { font-size: 1rem; line-height: 1; color: #7a5a1a; background: radial-gradient(circle at 35% 30%, #fff6d6, #f0d88a); }
.lomo-titulo { font-size: .95rem; max-height: 140px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .lomo { min-height: 160px; } .lomo-titulo { max-height: 110px; font-size: .85rem; } .estante-libros .adorno.sujeta:last-child { display: none; } }
@media (max-width: 640px) { .lomo { height: 96%; } .lomo-sello { width: 26px; height: 26px; font-size: .85rem; } .lomo-titulo { max-height: none; font-size: .8rem; } }

/* ---------- Abajo del menú: interruptor sol/luna y Salir ---------- */
.who-acc { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.tema-switch { position: relative; flex: none; width: 64px; height: 32px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; padding: 0;
  background: linear-gradient(180deg, #bfe3ff, #e8f5ff); transition: background .3s; }
.tema-switch.oscuro { background: linear-gradient(180deg, #1b2440, #2c3a66); border-color: #3a4a7a; }
.ts-ic { position: absolute; top: 50%; transform: translateY(-50%); font-size: 15px; line-height: 1; transition: opacity .3s; }
.ts-sol { left: 8px; } .ts-luna { right: 8px; }
.tema-switch:not(.oscuro) .ts-sol, .tema-switch.oscuro .ts-luna { opacity: .35; }
.ts-bola { position: absolute; top: 3px; left: 35px; width: 24px; height: 24px; border-radius: 50%; background: #ffd34d; box-shadow: 0 0 10px #ffd34d, 0 1px 3px rgba(0,0,0,.25); transition: left .3s cubic-bezier(.3,1.4,.5,1), background .3s, box-shadow .3s; }
.tema-switch.oscuro .ts-bola { left: 3px; background: #e9ecf5; box-shadow: inset -6px -3px 0 #c5cbe0, 0 1px 3px rgba(0,0,0,.4); }
.tema-switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-salir-nav { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 .85rem var(--f-body); cursor: pointer; }
.btn-salir-nav:hover { border-color: var(--bad); color: var(--bad); }
body.menu-cerrado .who-acc { flex-direction: column; } body.menu-cerrado .btn-salir-nav span { display: none; } body.menu-cerrado .btn-salir-nav { padding: 0 8px; }
.top-tema { width: 56px; height: 30px; } .top-tema .ts-bola { width: 22px; height: 22px; left: 30px; } .top-tema.oscuro .ts-bola { left: 3px; }
.top-movil .top-tema { margin-right: 6px; }
.cuenta-tema .tema-switch { align-self: flex-start; }

/* ---------- Inicio: rompecabezas + calendario + "Cómo venimos" en mosaicos, todo en una pantalla ---------- */
.inicio .view-head { margin-bottom: 10px; } .inicio .view-head h1 { font-size: 1.6rem; }
.inicio-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
.hoy2 { gap: 14px; padding: 14px 16px; }
.cal-ini { display: flex; flex-direction: column; gap: 6px; }
.cal-cab { display: flex; align-items: center; justify-content: space-between; } .cal-cab strong { font: 700 1rem var(--f-display); }
.cal-nav { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; font-size: 1rem; line-height: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: .68rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-d { font-size: .8rem; height: 26px; display: grid; place-items: center; border-radius: 7px; position: relative; font-variant-numeric: tabular-nums; }
.cal-d.finde { color: var(--muted); } .cal-d.pasado { opacity: .55; }
.cal-d.pedidos { background: color-mix(in srgb, var(--m-compras, #e07a2e) 16%, transparent); }
.cal-d.feriado { color: #fff; background: #d9534f; font-weight: 700; opacity: 1; } .cal-d.nolab { box-shadow: inset 0 0 0 2px #d9534f; font-weight: 700; }
.cal-d.es-hoy { background: var(--navy); color: #fff; font-weight: 800; opacity: 1; box-shadow: 0 0 0 2px color-mix(in srgb, var(--navy) 35%, transparent); }
.cal-prox { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: .78rem; }
.cal-prox li { display: flex; align-items: center; gap: 6px; } .cal-prox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cal-prox small { color: var(--muted); white-space: nowrap; }
.cal-prox i { width: 9px; height: 9px; border-radius: 3px; flex: none; } .p-fer { background: #d9534f; } .p-nolab { box-shadow: inset 0 0 0 2px #d9534f; } .p-ped { background: var(--m-compras, #e07a2e); opacity: .6; }
.hoy2 .ind-ini { gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); } .hoy2 .ind-ini h2 { font-size: 1rem; margin: 0; }
.ind-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ind-tile { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: inherit; background: var(--m-soft, var(--sunk)); border-left: 4px solid var(--m, var(--line)); min-width: 0; }
.ind-tile:hover { filter: brightness(.97); } .ind-tile:focus-visible { outline: 2px solid var(--m); }
.ind-tile strong { font: 800 1.05rem var(--f-display); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ind-tile span { font-size: .72rem; color: var(--muted); line-height: 1.25; }
.ind-tile .t-ok { color: var(--ok); } .ind-tile .t-bad { color: var(--bad); } .ind-tile .t-warn { color: var(--warn); }
.ind-cargando { grid-column: 1 / -1; font-size: .8rem; }
@media (max-width: 1100px) { .inicio-grid { grid-template-columns: minmax(0, 1fr); } .hoy2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .hoy2 .ind-ini { padding-top: 0; border-top: 0; } }
@media (max-width: 700px) { .hoy2 { display: flex; } .hoy2 .ind-ini { padding-top: 12px; border-top: 1px solid var(--line); } }
/* el logo de cada pieza va sobre una placa blanca: siempre la versión de color, también en modo oscuro */
.mod-card.pieza .mod-logo .logo-claro { display: block !important; } .mod-card.pieza .mod-logo .logo-oscuro { display: none !important; }
/* escritorio: todo el inicio entra en una pantalla */
@media (min-width: 1101px) {
  .inicio .view-head { margin-bottom: 6px; } .inicio .view-head h1 { font-size: 1.45rem; } .inicio .view-head .eyebrow { margin-bottom: 2px; }
  .inicio .mod-card.pieza { padding: 16px 18px; gap: 8px; }
  .inicio .mod-card.pieza .mod-logo { padding: 7px 11px; } .inicio .mod-card.pieza .mod-logo img { height: 38px; }
  .inicio .mod-card.pieza .mod-desc { font-size: .82rem; line-height: 1.3; }
  .inicio .mod-card.pieza .mod-nums { gap: 4px; font-size: .82rem; } .inicio .mod-card.pieza .mod-nums li { padding: 4px 5px 4px 10px; line-height: 1.25; }
  .inicio .mod-card.pieza .mod-acciones .btn { padding: 6px 12px; min-height: 0; font-size: .85rem; }
  .ind-tiles { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .ind-tile { padding: 6px 8px; } .ind-tile strong { font-size: .95rem; } .ind-tile span { font-size: .68rem; }
  .cal-d { height: 24px; font-size: .76rem; }
}
@media (min-width: 1101px) {
  .main:has(> .view.inicio) { padding-bottom: 18px; }
  .inicio { gap: 14px; }
  .ind-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hoy2 { gap: 10px; } .hoy2 .ind-ini { padding-top: 10px; }
}
@media (min-width: 1101px) { .ind-tiles.pocos { grid-template-columns: 1fr 1fr; } .ind-tiles.pocos .ind-tile strong { font-size: 1.05rem; } }

/* ---------- Código de verificación (doble factor) ---------- */
.mfa-card { text-align: center; align-items: center; gap: 12px; max-width: 420px; }
.mfa-card h1 { font-size: 1.35rem; margin: 0; }
.mfa-ic { font-size: 2.4rem; line-height: 1; }
.mfa-pasos { text-align: left; margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.mfa-qr { width: 190px; height: 190px; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.mfa-manual { font-size: .85rem; color: var(--muted); } .mfa-manual code { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--sunk); word-break: break-all; font-size: .85rem; color: var(--fg); }
.mfa-form { display: flex; gap: 8px; justify-content: center; width: 100%; }
.mfa-codigo { width: 170px; text-align: center; font: 700 1.6rem var(--f-mono, monospace); letter-spacing: .35em; padding: 8px 6px; }
.mfa-error { color: var(--bad); min-height: 1.2em; margin: 0; font-size: .9rem; }
