/* ============================================================
   CAFÉ OS · Sistema de diseño
   ============================================================ */
:root {
  --bg: #f3f0e9;
  --bg-deep: #eae4da;
  --surface: #fffdfa;
  --surface-2: #f8f4ed;
  --surface-3: #f1ebe1;
  --ink: #241b14;
  --ink-2: #51453a;
  --muted: #827367;
  --muted-2: #a29487;
  --line: #e7ded2;
  --line-strong: #d9cdbf;
  --brand: #1f5c4a;
  --brand-dark: #143e32;
  --brand-soft: #e3efe9;
  --brand-tint: #f0f7f3;
  --amber: #e8b04b;
  --amber-soft: #fbf1dc;
  --amber-ink: #78521a;
  --terracotta: #c2603e;
  --terracotta-soft: #f9e9e1;
  --danger: #b23b36;
  --danger-soft: #fbe9e6;
  --success: #237a53;
  --success-soft: #e7f3ec;
  --blue: #356a8a;
  --blue-soft: #e9f0f5;
  --purple: #6b5a8e;
  --purple-soft: #f0ecf7;
  --sidebar: #17130f;
  --sidebar-2: #211a14;
  --sidebar-ink: #f6efe5;
  --sidebar-muted: #a89a8b;
  --radius-xs: 8px;
  --radius-sm: 11px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(36, 27, 20, .05), 0 4px 14px -8px rgba(36, 27, 20, .12);
  --shadow: 0 2px 4px rgba(36, 27, 20, .04), 0 14px 38px -18px rgba(36, 27, 20, .22);
  --shadow-lg: 0 24px 70px -24px rgba(23, 19, 15, .35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--amber-soft); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
mark { background: var(--amber-soft); color: var(--ink); border-radius: 3px; padding: 0 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* Utilidades */
.icon { flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.align-right { text-align: right; }
.align-center { text-align: center; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.stack-sm { display: grid; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 18px 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); display: inline-block; flex: 0 0 auto; }
.dot--green { background: #35a171; box-shadow: 0 0 0 3px rgba(53, 161, 113, .13); }
.dot--amber { background: #d99b30; box-shadow: 0 0 0 3px rgba(217, 155, 48, .14); }
.dot--red { background: #c34b44; box-shadow: 0 0 0 3px rgba(195, 75, 68, .13); }
.dot--gray { background: #a99e93; }
.hide-mobile { display: initial; }
.hide-desktop { display: none; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: #a56d1e !important; }
.text-amber { color: var(--amber-ink) !important; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 15px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn .icon { margin-top: -1px; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -12px rgba(31, 92, 74, .8); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--amber { background: var(--amber); color: #33230b; }
.btn--amber:hover { background: #dda33a; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #3a2d23; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #952f2a; }
.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { background: #19633f; }
.btn--outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { background: var(--surface-2); border-color: var(--muted-2); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn--soft:hover { background: #d8e9e0; }
.btn--sm { min-height: 32px; padding: 6px 10px; font-size: 12px; border-radius: 9px; gap: 6px; }
.btn--lg { min-height: 48px; padding: 12px 21px; font-size: 15px; border-radius: 13px; }
.btn--block { width: 100%; }
.btn--pill { border-radius: 999px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted); transition: .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn--bordered { border-color: var(--line); background: var(--surface); }
.icon-btn--danger:hover { background: var(--danger-soft); color: var(--danger); }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 700; font-size: 12px; }
.link-btn:hover { text-decoration: underline; }

/* Formularios */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .field-label { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.field > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.field__error { color: var(--danger); font-size: 11px; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 92, 74, .12); }
.input.is-invalid, .select.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(178, 59, 54, .1); }
.textarea { min-height: 92px; resize: vertical; }
.select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23827367' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input--lg { min-height: 50px; font-size: 16px; border-radius: 12px; }
.input--right { text-align: right; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group__suffix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-stack { display: grid; gap: 14px; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row > .field { flex: 1; min-width: 140px; }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field .input { padding-left: 38px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { width: 38px; height: 22px; background: var(--line-strong); border-radius: 20px; position: relative; transition: .18s; flex: 0 0 auto; }
.switch__track::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: 0 0 auto; }
.segmented { display: inline-flex; background: var(--surface-3); padding: 3px; border-radius: 10px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 12px;
  font-size: 12px; font-weight: 650; white-space: nowrap; transition: .15s;
}
.chip:hover { border-color: var(--muted-2); color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: 999px; font-size: 10.5px; line-height: 1.6; font-weight: 750;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge--green { background: var(--success-soft); color: #19653f; }
.badge--amber { background: var(--amber-soft); color: var(--amber-ink); }
.badge--red { background: var(--danger-soft); color: var(--danger); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--purple { background: var(--purple-soft); color: var(--purple); }
.badge--dark { background: var(--ink); color: #fff; }
.badge--muted { background: var(--surface-3); color: var(--muted); }
.badge--dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Tarjetas y paneles */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel--flat { box-shadow: none; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.panel__head h3 { font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.panel__head p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.panel__body { padding: 18px 20px; }
.panel__body--flush { padding: 0; }
.panel__foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { font-size: 18px; letter-spacing: -.02em; }
.section-heading p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.section-heading__actions { display: flex; gap: 8px; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  position: relative; overflow: hidden; min-height: 130px; padding: 17px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: space-between;
}
.stat-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -25px; bottom: -35px; border-radius: 50%; background: var(--brand-tint); }
.stat-card--amber::after { background: var(--amber-soft); }
.stat-card--danger::after { background: var(--danger-soft); }
.stat-card--blue::after { background: var(--blue-soft); }
.stat-card--brand { background: linear-gradient(145deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; border-color: transparent; }
.stat-card--brand::after { background: rgba(255,255,255,.08); }
.stat-card--brand .stat-card__top span, .stat-card--brand .stat-card__meta { color: rgba(255,255,255,.72); }
.stat-card--brand .stat-card__icon { background: rgba(255,255,255,.13); color: #fff; }
.stat-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .055em; }
.stat-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--brand); margin-top: -4px; }
.stat-card__value { font-size: clamp(22px, 2.2vw, 29px); line-height: 1.1; font-weight: 780; letter-spacing: -.045em; margin: 10px 0 6px; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.stat-card__meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }
.trend { font-weight: 750; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--success-soft); color: var(--success); }
.trend--down { background: var(--danger-soft); color: var(--danger); }
.stat-card--brand .trend { background: rgba(255,255,255,.14); color: #fff; }

/* Avatar */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  font-weight: 800; font-size: 13px; letter-spacing: -.02em;
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 48px; height: 48px; font-size: 17px; }
.avatar--amber { background: var(--amber-soft); color: var(--amber-ink); }
.avatar--terra { background: var(--terracotta-soft); color: var(--terracotta); }
.avatar--dark { background: var(--ink); color: #fff; }

/* Layout principal */
.app-shell { min-height: 100vh; background: var(--bg); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 60;
  background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; padding: 18px 14px 14px;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-mark { color: var(--amber); flex: 0 0 auto; }
.sidebar__brand-text strong { display: block; font-size: 15px; letter-spacing: -.02em; line-height: 1.2; }
.sidebar__brand-text span { display: block; font-size: 9.5px; color: var(--sidebar-muted); text-transform: uppercase; letter-spacing: .15em; margin-top: 4px; font-weight: 700; }
.sidebar__business { display: flex; gap: 10px; align-items: center; padding: 10px 11px; margin: 0 2px 14px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); border-radius: 12px; }
.sidebar__business .avatar { width: 30px; height: 30px; background: var(--amber-soft); color: var(--amber-ink); font-size: 11px; }
.sidebar__business div { min-width: 0; }
.sidebar__business strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__business span { display: block; color: var(--sidebar-muted); font-size: 10px; margin-top: 1px; }
.nav-group { margin: 10px 8px 5px; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #7f7266; }
.nav { display: grid; gap: 3px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 9px 11px;
  border: 0; border-radius: 10px; background: transparent; color: #cfc2b4; text-align: left;
  font-size: 13px; font-weight: 620; transition: .14s ease; position: relative;
}
.nav-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-link.is-active { background: rgba(232, 176, 75, .13); color: #f4c979; }
.nav-link.is-active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 4px 4px 0; background: var(--amber); }
.nav-link .icon { color: #9b8c7d; }
.nav-link.is-active .icon { color: var(--amber); }
.nav-link__badge { margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; background: rgba(232,176,75,.16); color: #edbe6e; }
.nav-link__badge--red { background: rgba(194,96,62,.2); color: #f0a68e; }
.sidebar__spacer { flex: 1; }
.sidebar__status { margin: 10px 4px; padding: 11px 12px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); display: flex; gap: 9px; align-items: flex-start; }
.sidebar__status .dot { margin-top: 5px; }
.sidebar__status strong { font-size: 10.5px; display: block; }
.sidebar__status span { font-size: 10px; color: var(--sidebar-muted); display: block; line-height: 1.4; margin-top: 1px; }
.sidebar__user { display: flex; align-items: center; gap: 9px; padding: 10px 8px 3px; border-top: 1px solid rgba(255,255,255,.07); margin-top: 4px; }
.sidebar__user .avatar { width: 32px; height: 32px; }
.sidebar__user-info { min-width: 0; flex: 1; }
.sidebar__user-info strong { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-info span { display: block; font-size: 9.5px; color: var(--sidebar-muted); margin-top: 1px; }
.sidebar__user .icon-btn { color: var(--sidebar-muted); width: 30px; height: 30px; }
.sidebar__user .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-overlay { display: none; }
.app-main { min-height: 100vh; margin-left: 252px; display: flex; flex-direction: column; }
.topbar {
  height: 76px; padding: 0 30px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line); background: rgba(243,240,233,.83);
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 40;
}
.topbar__menu { display: none; }
.topbar__heading { min-width: 0; flex: 1; }
.topbar__heading h1 { font-family: var(--font-display); font-size: 23px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__heading p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.topbar__divider { width: 1px; height: 26px; background: var(--line-strong); margin: 0 4px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 750; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.status-pill .dot { width: 6px; height: 6px; }
.status-pill--live { color: var(--success); }
.page { width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 30px 48px; flex: 1; }
.page--narrow { max-width: 980px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-intro h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -.03em; }
.page-intro p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.page-intro__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-strip {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 24px; margin-bottom: 18px; border-radius: var(--radius-lg);
  background: linear-gradient(118deg, #1b4438 0%, #1f5c4a 55%, #2c6d58 100%); color: #fff;
  box-shadow: 0 20px 45px -28px rgba(20, 62, 50, .8);
}
.hero-strip::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(255,255,255,.10); right: -60px; top: -150px; }
.hero-strip::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); right: 70px; bottom: -130px; }
.hero-strip h2 { font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -.025em; }
.hero-strip p { color: rgba(255,255,255,.7); font-size: 12.5px; margin-top: 4px; }
.hero-strip__actions { display: flex; gap: 8px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-strip .btn--amber { box-shadow: 0 10px 25px -12px rgba(232,176,75,.8); }
.hero-strip .btn--ghost { color: rgba(255,255,255,.86); }
.hero-strip .btn--ghost:hover { background: rgba(255,255,255,.1); }

/* Alertas y actividad */
.alert-list { display: grid; }
.alert-item { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.alert-item:last-child { border-bottom: 0; }
.alert-item__icon { width: 31px; height: 31px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--amber-soft); color: var(--amber-ink); }
.alert-item__icon--red { background: var(--danger-soft); color: var(--danger); }
.alert-item__icon--green { background: var(--success-soft); color: var(--success); }
.alert-item__icon--blue { background: var(--blue-soft); color: var(--blue); }
.alert-item__body { flex: 1; min-width: 0; }
.alert-item__body strong { display: block; font-size: 12.5px; font-weight: 700; }
.alert-item__body p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.alert-item__meta { font-size: 10px; color: var(--muted-2); white-space: nowrap; }

/* Sucursales */
.branch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.branch-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; transition: .15s; }
.branch-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.branch-card__head { display: flex; align-items: flex-start; gap: 11px; }
.branch-card__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.branch-card__title { flex: 1; min-width: 0; }
.branch-card__title strong { display: block; font-size: 14px; letter-spacing: -.01em; }
.branch-card__title span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branch-card__metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.branch-metric { background: var(--surface-2); padding: 9px 10px; border-radius: 9px; }
.branch-metric span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.branch-metric strong { display: block; font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.branch-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 11px; }
.branch-card__foot .btn { font-size: 11px; }

/* Tablas */
.table-wrap { width: 100%; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12.5px; }
.data-table th { position: sticky; top: 0; z-index: 1; padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .075em; font-weight: 800; white-space: nowrap; }
.data-table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #fcfaf6; }
.data-table tr.is-muted td { opacity: .55; }
.data-table .cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-title { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-sub { color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; color: var(--muted); }
.table-total { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11.5px; }
.table-total strong { color: var(--ink); }

/* Búsqueda / filtros */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search-field { flex: 1; min-width: 210px; max-width: 360px; }
.toolbar .select { width: auto; min-width: 150px; min-height: 38px; padding: 8px 34px 8px 11px; font-size: 12px; }
.toolbar .input { min-height: 38px; font-size: 12px; }
.toolbar__right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-tab { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 7px 11px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.filter-tab:hover { background: var(--surface); }
.filter-tab.is-active { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Gráfica mini */
.mini-bars { display: flex; align-items: flex-end; gap: 7px; height: var(--bars-height); padding-top: 10px; }
.mini-bars__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.mini-bars__track { width: 100%; height: 100%; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px 6px 3px 3px; overflow: hidden; }
.mini-bars__track span { display: block; width: 100%; background: linear-gradient(180deg, #4d8a76, var(--brand)); border-radius: 5px 5px 2px 2px; min-height: 3px; transition: height .4s ease; }
.mini-bars__item:nth-child(6) .mini-bars__track span, .mini-bars__item:nth-child(7) .mini-bars__track span { background: linear-gradient(180deg, #efc36f, var(--amber)); }
.mini-bars small { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-transform: capitalize; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--brand); display: inline-block; }
.chart-legend i.amber { background: var(--amber); }

/* Modal */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 19, 15, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal { position: relative; z-index: 1; width: min(600px, 100%); max-height: min(90vh, 940px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px) scale(.985); transition: opacity .18s, transform .18s; overflow: hidden; }
.modal-layer.is-open .modal-backdrop { opacity: 1; }
.modal-layer.is-open .modal { opacity: 1; transform: none; }
.modal--sm { width: min(430px, 100%); }
.modal--lg { width: min(820px, 100%); }
.modal--xl { width: min(1040px, 100%); }
.modal--full { width: min(1180px, 100%); height: min(92vh, 980px); }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.modal__head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.modal__head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal__close { margin: -3px -4px 0 0; }
.modal__body { padding: 20px 22px; overflow: auto; flex: 1; }
.modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 22px; border-top: 1px solid var(--line); background: var(--surface-2); flex: 0 0 auto; flex-wrap: wrap; }
.modal__foot .foot-left { margin-right: auto; }
.modal-copy { color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.modal-copy strong { color: var(--ink); }

/* Stepper */
.stepper { display: flex; gap: 8px; padding: 0; margin: 0 0 20px; list-style: none; counter-reset: step; }
.stepper__item { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.stepper__item::after { content: ""; flex: 1; height: 1px; background: var(--line); min-width: 8px; }
.stepper__item:last-child::after { display: none; }
.stepper__dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 800; }
.stepper__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper__item--active { color: var(--ink); }
.stepper__item--active .stepper__dot { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--surface-3); }
.stepper__item--done { color: var(--brand); }
.stepper__item--done .stepper__dot { background: var(--brand-soft); color: var(--brand); }
.stepper__item--done::after { background: var(--brand-soft); }

/* Wizard de cierre */
.close-wizard { display: grid; gap: 18px; }
.close-wizard__intro { padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.close-wizard__intro h3 { font-size: 15px; }
.close-wizard__intro p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.denom-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.denom-table th { text-align: left; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--line); }
.denom-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.denom-table tr:last-child td { border-bottom: 0; }
.denom-table .denom-label { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.denom-table input { width: 92px; min-height: 36px; padding: 7px 9px; text-align: right; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums; }
.denom-table input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,92,74,.1); }
.denom-table .denom-sub { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.denom-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px 0; border-top: 1px solid var(--line-strong); margin-top: 8px; }
.denom-total span { color: var(--muted); font-size: 12px; font-weight: 700; }
.denom-total strong { font-size: 24px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.count-summary { display: grid; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.count-line { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }
.count-line span { color: var(--muted); }
.count-line strong { font-variant-numeric: tabular-nums; }
.count-line--total { border-top: 1px solid var(--line-strong); padding-top: 8px; margin-top: 3px; font-size: 14px; }
.count-line--total span, .count-line--total strong { color: var(--ink); }
.difference-panel { border-radius: 12px; padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.difference-panel--ok { background: var(--success-soft); border-color: #bfdccb; }
.difference-panel--bad { background: var(--danger-soft); border-color: #edc5bf; }
.difference-panel__amount { font-size: 28px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 4px 0; }
.difference-panel--ok .difference-panel__amount { color: var(--success); }
.difference-panel--bad .difference-panel__amount { color: var(--danger); }
.difference-panel p { font-size: 11.5px; color: var(--ink-2); }

/* POS */
.pos-shell { min-height: 100vh; display: flex; background: var(--bg); }
.pos-sidebar {
  width: 218px; flex: 0 0 auto; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; padding: 16px 12px; position: fixed; inset: 0 auto 0 0; z-index: 50;
}
.pos-main { margin-left: 218px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-topbar { height: 72px; background: rgba(243,240,233,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 35; }
.pos-topbar__title { flex: 1; min-width: 0; }
.pos-topbar__title h1 { font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-topbar__title p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.pos-topbar__status { display: flex; align-items: center; gap: 6px; }
.pos-content { padding: 20px 22px 110px; flex: 1; }
.pos-nav { display: grid; gap: 3px; margin-top: 8px; }
.pos-nav .nav-link { min-height: 46px; }
.pos-shift-box { margin: 12px 3px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); }
.pos-shift-box span { display: block; font-size: 9px; color: var(--sidebar-muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.pos-shift-box strong { display: block; font-size: 12.5px; margin-top: 3px; }
.pos-shift-box small { display: block; font-size: 10px; color: var(--sidebar-muted); margin-top: 2px; }
.pos-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.pos-catalog { min-width: 0; }
.pos-catalog__head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
.pos-catalog__head h2 { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.03em; }
.pos-catalog__head p { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.pos-search { width: 260px; flex: 0 1 300px; }
.category-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 10px; }
.product-card {
  position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface);
  border-radius: 15px; padding: 12px; display: flex; flex-direction: column; gap: 10px;
  min-height: 154px; transition: .14s; box-shadow: var(--shadow-sm); overflow: hidden;
}
.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card:active { transform: scale(.985); }
.product-card.is-out { opacity: .52; filter: grayscale(.35); }
.product-card__thumb { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; background: var(--surface-2); }
.product-card__name { font-size: 12.5px; font-weight: 750; line-height: 1.25; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 7px; margin-top: auto; }
.product-card__price { font-size: 14px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.product-card__stock { font-size: 9px; color: var(--muted); font-weight: 700; }
.product-card__stock.is-low { color: var(--danger); }
.product-card__add { position: absolute; right: 10px; top: 10px; width: 25px; height: 25px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; opacity: .9; transform: none; transition: .15s; }
.product-card:hover .product-card__add { opacity: 1; transform: scale(1.06); }
.product-card.is-out .product-card__add { display: none; }
.product-card__out { position: absolute; top: 10px; left: 10px; }
.cart-panel { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 116px); overflow: hidden; }
.cart-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 13px; border-bottom: 1px solid var(--line); }
.cart-panel__head h3 { font-size: 14px; font-weight: 750; }
.cart-panel__head span { font-size: 10.5px; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 12px; min-height: 130px; }
.cart-item { display: flex; gap: 9px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__body strong { display: block; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__body span { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.qty-control button { width: 26px; height: 26px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.qty-control button:hover { background: var(--surface-2); }
.qty-control input { width: 28px; height: 26px; border: 0; text-align: center; font-size: 11px; font-weight: 700; background: transparent; -moz-appearance: textfield; padding: 0; }
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.cart-item__total { font-size: 11.5px; font-weight: 750; width: 62px; text-align: right; font-variant-numeric: tabular-nums; }
.cart-empty { display: grid; place-items: center; text-align: center; gap: 8px; padding: 30px 16px; color: var(--muted); min-height: 150px; }
.cart-empty .icon { color: var(--muted-2); }
.cart-empty p { font-size: 11.5px; max-width: 190px; }
.cart-summary { padding: 14px 18px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cart-summary__row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.cart-summary__row strong { color: var(--ink-2); }
.cart-summary__total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px dashed var(--line-strong); margin: 8px 0 12px; }
.cart-summary__total span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.cart-summary__total strong { font-size: 25px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin-bottom: 12px; }
.pay-method { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 5px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 9.5px; font-weight: 700; color: var(--muted); }
.pay-method.is-active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); box-shadow: 0 0 0 2px rgba(31,92,74,.08); }
.mobile-cart-bar { display: none; }
.pos-footer-note { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 10.5px; }

/* Turno / apertura */
.shift-gate {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; min-height: 330px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.shift-gate::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; bottom: -210px; background: radial-gradient(circle, rgba(232,176,75,.22), transparent 66%); }
.shift-gate__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--amber-ink); background: var(--amber-soft); padding: 5px 9px; border-radius: 999px; font-weight: 800; }
.shift-gate h2 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 46px); line-height: 1.03; font-weight: 600; letter-spacing: -.045em; max-width: 550px; margin-top: 4px; }
.shift-gate p { color: var(--muted); font-size: 13px; max-width: 480px; line-height: 1.6; }
.shift-gate__actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.shift-gate__art { position: absolute; right: 42px; top: 50%; transform: translateY(-50%); width: 150px; height: 150px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); opacity: .8; }
.shift-gate__art::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed #b9d3c6; }
.active-shift-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; font-size: 11.5px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.active-shift-bar__item { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.active-shift-bar__item strong { color: var(--ink); }
.active-shift-bar .spacer { flex: 1; }

/* Detalle y listas */
.detail-list { display: grid; gap: 0; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row > span { color: var(--muted); }
.detail-row > strong { text-align: right; font-variant-numeric: tabular-nums; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: flex; gap: 11px; padding: 11px 0; position: relative; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 23px; bottom: -11px; width: 1px; background: var(--line); }
.timeline-item__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: 0 0 auto; box-shadow: 0 0 0 3px var(--brand-soft); }
.timeline-item__body { flex: 1; min-width: 0; font-size: 11.5px; }
.timeline-item__body strong { display: block; font-size: 12px; }
.timeline-item__body span { color: var(--muted); }
.timeline-item__time { font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kv { padding: 10px 12px; background: var(--surface-2); border-radius: 9px; }
.kv span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); }
.kv strong { display: block; font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.receipt-box { background: #fbf8f1; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7; color: var(--ink-2); }
.receipt-box .r-line { display: flex; justify-content: space-between; gap: 12px; }
.receipt-box .r-head { text-align: center; border-bottom: 1px dashed var(--line-strong); padding-bottom: 10px; margin-bottom: 10px; }
.receipt-box .r-head strong { display: block; font-family: var(--font); font-size: 15px; color: var(--ink); }
.receipt-box .r-head span { display: block; font-size: 10px; line-height: 1.45; }
.receipt-box .r-head > span + span { color: var(--muted); }
.receipt-box .r-total { border-top: 1px dashed var(--line-strong); margin-top: 8px; padding-top: 8px; font-weight: 800; color: var(--ink); font-size: 14px; }
.receipt-box .r-head .r-line { display: flex; }
.shipment-items { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.shipment-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 12px; }
.shipment-item:last-child { border-bottom: 0; }
.shipment-item__name { flex: 1; min-width: 0; }
.shipment-item__name strong { display: block; font-size: 12px; }
.shipment-item__name span { display: block; font-size: 10px; color: var(--muted); }
.shipment-item__qty { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dispatch-line { display: grid; grid-template-columns: minmax(0, 1fr) 54px 82px; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.dispatch-line:last-child { border-bottom: 0; }
.dispatch-line__name { flex: 1; min-width: 0; font-size: 12px; font-weight: 650; }
.dispatch-line__name small { display: block; color: var(--muted); font-weight: 400; font-size: 10px; }
.dispatch-line__stock { font-size: 10.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dispatch-line input { width: 82px; text-align: right; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums; }
.dispatch-line input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,92,74,.1); }
.dispatch-scroll { max-height: 330px; overflow-y: auto; padding-right: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dispatch-head { display: grid; grid-template-columns: minmax(0, 1fr) 54px 82px; gap: 10px; padding: 8px 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; color: var(--muted); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dispatch-head span:nth-child(2), .dispatch-head span:nth-child(3) { text-align: right; }
.dispatch-toolbar { display: flex; align-items: center; gap: 10px; }
.dispatch-toolbar .search-field { flex: 1; }
.dispatch-toolbar .input { min-height: 36px; font-size: 12px; }
.dispatch-summary { display: grid; gap: 4px; background: var(--surface-2); border-radius: 9px; padding: 10px 12px; min-height: 12px; }
.dispatch-summary .count-line { font-size: 11.5px; }
@media (max-width: 480px) {
  .dispatch-line, .dispatch-head { grid-template-columns: minmax(0, 1fr) 42px 68px; gap: 6px; }
  .dispatch-line input { width: 68px; }
  .dispatch-head span:nth-child(2) { display: none; }
}

/* Onboarding / auth */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr); background: var(--bg); }
.auth-aside { position: relative; overflow: hidden; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; background: var(--sidebar); color: #fff; }
.auth-aside::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); right: -190px; top: -160px; }
.auth-aside::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(232,176,75,.18), transparent 65%); left: -80px; bottom: -90px; }
.auth-aside__brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-aside__brand strong { display: block; font-size: 17px; letter-spacing: -.03em; }
.auth-aside__brand span { display: block; color: var(--sidebar-muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em; margin-top: 3px; font-weight: 700; }
.auth-aside__content { position: relative; z-index: 1; max-width: 490px; margin: 60px 0; }
.auth-aside__eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: rgba(232,176,75,.12); color: #eac47f; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.auth-aside h1 { font-family: var(--font-display); font-size: clamp(38px, 4.8vw, 62px); line-height: .98; font-weight: 500; letter-spacing: -.05em; max-width: 500px; }
.auth-aside h1 em { font-style: italic; color: var(--amber); }
.auth-aside__content p { color: #bcae9f; font-size: 14px; line-height: 1.65; max-width: 410px; margin-top: 20px; }
.auth-points { display: grid; gap: 11px; margin-top: 30px; }
.auth-point { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: #d6c8b9; }
.auth-point .icon { color: var(--amber); margin-top: 1px; }
.auth-aside__foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #7f7266; font-size: 10px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 36px 28px; background: var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card__mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-card__mobile-brand strong { font-size: 16px; }
.auth-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--brand); border-radius: 999px; padding: 5px 10px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.auth-card h2 { font-family: var(--font-display); font-size: 34px; line-height: 1.08; font-weight: 600; letter-spacing: -.04em; }
.auth-card > p { color: var(--muted); font-size: 12.5px; margin: 7px 0 22px; line-height: 1.55; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 11px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font-size: 12px; font-weight: 750; color: var(--muted); }
.auth-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: grid; gap: 13px; }
.auth-form .input { min-height: 45px; }
.auth-form .btn--primary { min-height: 47px; font-size: 14px; margin-top: 4px; }
.auth-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-top: 3px; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.6; text-align: center; }
.demo-strip { display: flex; align-items: flex-start; gap: 8px; background: var(--amber-soft); border: 1px solid #edd9ae; border-radius: 10px; padding: 10px 11px; font-size: 10.5px; color: #674a1c; line-height: 1.5; margin-top: 16px; }
.demo-strip .icon { flex: 0 0 auto; margin-top: 1px; }
.auth-error { background: var(--danger-soft); border: 1px solid #eec7c2; color: #7f2925; border-radius: 9px; padding: 9px 11px; font-size: 11.5px; }
.pending-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); max-width: 520px; text-align: center; margin: auto; }
.pending-card__icon { width: 62px; height: 62px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); display: grid; place-items: center; margin: 0 auto 14px; }
.pending-card h1 { font-family: var(--font-display); font-size: 28px; letter-spacing: -.035em; font-weight: 600; }
.pending-card p { color: var(--muted); font-size: 13px; margin: 8px 0 20px; line-height: 1.6; }

/* Avisos */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; line-height: 1.55; }
.notice__icon { flex: 0 0 auto; margin-top: 1px; color: var(--muted); }
.notice strong { display: block; font-size: 12px; color: var(--ink); margin-bottom: 1px; }
.notice p { color: var(--ink-2); }
.notice--danger { background: var(--danger-soft); border-color: #edc8c2; }
.notice--danger .notice__icon { color: var(--danger); }
.notice--warning { background: var(--amber-soft); border-color: #ecd7ac; }
.notice--warning .notice__icon { color: var(--amber-ink); }
.notice--success { background: var(--success-soft); border-color: #c4dfcf; }
.notice--success .notice__icon { color: var(--success); }
.notice--info { background: var(--blue-soft); border-color: #cddde8; }
.notice--info .notice__icon { color: var(--blue); }
.notice--soft { background: var(--surface-2); }
.notice + .notice { margin-top: 8px; }

/* Empty / loading / skeleton */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 20px; gap: 7px; }
.empty-state__icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); margin-bottom: 2px; }
.empty-state h3 { font-size: 14px; font-weight: 750; }
.empty-state p { font-size: 11.5px; color: var(--muted); max-width: 330px; line-height: 1.55; }
.empty-state__action { margin-top: 8px; }
.loading-block { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 50px 20px; color: var(--muted); font-size: 12px; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--line-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton-page { display: grid; gap: 18px; }
.skeleton { background: linear-gradient(90deg, #ece5da 25%, #f4efe7 37%, #ece5da 63%); background-size: 400% 100%; animation: shimmer 1.5s ease infinite; border-radius: 10px; }
.skeleton--title { width: 280px; height: 28px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skeleton--card { height: 130px; border-radius: 16px; }
.skeleton--panel { height: 300px; border-radius: 16px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Toasts */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 13px; box-shadow: var(--shadow-lg); animation: toastIn .22s ease; }
.toast.is-leaving { animation: toastOut .2s ease forwards; }
.toast__icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: 0 0 auto; }
.toast--success .toast__icon { background: rgba(76, 175, 126, .2); color: #8fe0b5; }
.toast--error .toast__icon { background: rgba(220, 100, 90, .22); color: #ffb4ad; }
.toast--warning .toast__icon { background: rgba(232,176,75,.2); color: #f2c97f; }
.toast__body { flex: 1; min-width: 0; }
.toast__body strong { display: block; font-size: 11.5px; }
.toast__body span { display: block; font-size: 11px; color: rgba(255,255,255,.68); margin-top: 1px; line-height: 1.45; }
.toast__close { border: 0; background: none; color: rgba(255,255,255,.5); padding: 2px; }
.toast__close:hover { color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Barras de progreso */
.progress { width: 100%; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .3s ease; }
.progress--amber span { background: var(--amber); }
.progress--red span { background: var(--danger); }

/* Login de trabajador */
.pin-input { letter-spacing: .35em; text-align: center; font-size: 22px; font-weight: 700; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.help-steps { display: grid; gap: 9px; margin-top: 14px; }
.help-step { display: flex; gap: 9px; align-items: flex-start; font-size: 11px; color: var(--muted); }
.help-step b { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; flex: 0 0 auto; font-size: 9px; color: var(--ink-2); }

/* Modo demo badge */
.demo-banner { display: flex; align-items: center; gap: 10px; background: var(--amber-soft); border-bottom: 1px solid #edd9ae; color: #66491a; padding: 7px 22px; font-size: 10.5px; line-height: 1.45; }
.demo-banner strong { font-weight: 800; text-transform: uppercase; letter-spacing: .07em; font-size: 9px; background: #f1d9a8; padding: 2px 6px; border-radius: 4px; }
.demo-banner .spacer { flex: 1; }
.demo-banner button { border: 0; background: transparent; color: #66491a; font-weight: 750; font-size: 10.5px; text-decoration: underline; }
.demo-banner .icon { flex: 0 0 auto; }

/* Index / lanzador */
.launch-shell { min-height: 100vh; background: var(--bg); }
.launch-nav { max-width: 1180px; margin: auto; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.launch-brand { display: flex; align-items: center; gap: 10px; }
.launch-brand strong { font-size: 15px; letter-spacing: -.02em; display: block; }
.launch-brand span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.launch-main { max-width: 1180px; margin: auto; padding: 44px 24px 60px; }
.launch-hero { max-width: 720px; margin-bottom: 40px; }
.launch-eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--muted); background: var(--surface); margin-bottom: 15px; }
.launch-hero h1 { font-family: var(--font-display); font-size: clamp(40px, 6vw, 70px); line-height: .97; letter-spacing: -.055em; font-weight: 500; }
.launch-hero h1 em { font-style: italic; color: var(--brand); }
.launch-hero p { color: var(--muted); font-size: 14px; max-width: 540px; line-height: 1.65; margin-top: 18px; }
.launch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.launch-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; min-height: 260px; box-shadow: var(--shadow-sm); transition: .18s; }
.launch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.launch-card__num { position: absolute; top: 16px; right: 19px; font-family: var(--font-display); font-size: 44px; color: var(--line); line-height: 1; }
.launch-card__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 18px; }
.launch-card--amber .launch-card__icon { background: var(--amber-soft); color: var(--amber-ink); }
.launch-card--terra .launch-card__icon { background: var(--terracotta-soft); color: var(--terracotta); }
.launch-card h2 { font-size: 19px; letter-spacing: -.025em; }
.launch-card p { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 6px; }
.launch-card__foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 750; color: var(--brand); }
.launch-card--amber .launch-card__foot { color: var(--amber-ink); }
.launch-card--terra .launch-card__foot { color: var(--terracotta); }
.launch-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.launch-meta__links { display: flex; gap: 14px; flex-wrap: wrap; }
.launch-note { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.launch-note__item { display: flex; gap: 9px; align-items: flex-start; padding: 12px 14px; background: rgba(255,255,255,.5); border: 1px solid var(--line); border-radius: 12px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.launch-note__item .icon { color: var(--brand); flex: 0 0 auto; margin-top: 1px; }

/* Página de configuración / conectividad */
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.setup-card h3 { font-size: 14px; margin-bottom: 5px; }
.setup-card p { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.setup-card ol { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12px; line-height: 1.8; }
.setup-card code { font-family: var(--font-mono); font-size: 10.5px; background: var(--surface-2); padding: 2px 5px; border-radius: 4px; }
.connection-status { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; }
.connection-status .icon { color: var(--muted); }
.connection-status--ok { background: var(--success-soft); border-color: #c4dfcf; }
.connection-status--ok .icon { color: var(--success); }
.connection-status--demo { background: var(--amber-soft); border-color: #ecd7ac; }
.connection-status--demo .icon { color: var(--amber-ink); }

/* Impresión */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .pos-sidebar, .pos-topbar, .no-print, .demo-banner, .toast-stack { display: none !important; }
  .app-main, .pos-main { margin: 0 !important; }
  .page, .pos-content { padding: 0 !important; }
  .panel, .stat-card, .cart-panel { box-shadow: none !important; }
}

/* Responsive */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}
@media (max-width: 1100px) {
  .pos-workspace { grid-template-columns: minmax(0, 1fr) 340px; }
  .pos-sidebar { width: 196px; }
  .pos-main { margin-left: 196px; }
  .launch-grid { gap: 12px; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(23,19,15,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-overlay.is-open { opacity: 1; pointer-events: auto; }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 22px; }
  .topbar__menu { display: inline-flex; }
  .page { padding: 22px 22px 44px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card__mobile-brand { display: flex; }
  .auth-panel { min-height: 100vh; padding: 32px 22px; }
  .pos-sidebar { transform: translateX(-100%); transition: transform .22s ease; width: 224px; }
  .pos-sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .pos-main { margin-left: 0; }
  .pos-menu { display: inline-flex !important; }
  .pos-workspace { grid-template-columns: minmax(0, 1fr) 350px; }
}
@media (max-width: 900px) {
  .pos-workspace { display: block; }
  .cart-panel {
    position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto;
    max-height: 82vh; border-radius: 22px 22px 0 0; transform: translateY(105%);
    transition: transform .24s ease; box-shadow: 0 -20px 60px -20px rgba(23,19,15,.4);
  }
  .cart-panel.is-open { transform: none; }
  .cart-panel__mobile-head { display: flex !important; }
  .cart-panel__head { display: none; }
  .mobile-cart-bar { display: flex; position: fixed; z-index: 38; left: 12px; right: 12px; bottom: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); }
  .mobile-cart-bar__info { flex: 1; min-width: 0; }
  .mobile-cart-bar__info span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.55); font-weight: 700; }
  .mobile-cart-bar__info strong { display: block; font-size: 19px; letter-spacing: -.03em; margin-top: 1px; font-variant-numeric: tabular-nums; }
  .mobile-cart-bar .btn { min-height: 40px; }
  .pos-content { padding-bottom: 100px; }
  .launch-grid { grid-template-columns: 1fr; }
  .launch-card { min-height: 210px; }
  .launch-note { grid-template-columns: 1fr; }
  .branch-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 13.5px; }
  .topbar { height: 66px; padding: 0 14px; gap: 8px; }
  .topbar__heading h1 { font-size: 19px; }
  .topbar__heading p { display: none; }
  .topbar__actions .hide-mobile { display: none; }
  .topbar__actions .status-pill { font-size: 0; gap: 0; padding: 7px; }
  .topbar__actions .status-pill .dot { width: 7px; height: 7px; }
  .topbar__actions .btn--primary { width: 38px; min-height: 36px; padding: 0; font-size: 0; gap: 0; }
  .topbar__actions .btn--primary .icon { margin: 0; }
  .topbar__divider { display: none; }
  .page { padding: 16px 14px 94px; }
  .page-intro { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-intro h2 { font-size: 23px; }
  .page-intro__actions { width: 100%; }
  .page-intro__actions .btn { flex: 1; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 112px; padding: 13px; }
  .stat-card__value { font-size: 22px; margin: 7px 0 4px; }
  .stat-card__top { font-size: 9.5px; }
  .stat-card__icon { width: 27px; height: 27px; }
  .stat-card__meta { font-size: 10px; }
  .branch-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .panel__head { padding: 14px 14px 11px; }
  .panel__body { padding: 14px; }
  .panel__foot { padding: 11px 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading__actions { width: 100%; }
  .section-heading__actions .btn { flex: 1; }
  .hero-strip { padding: 18px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-strip h2 { font-size: 22px; }
  .hero-strip__actions { width: 100%; }
  .hero-strip__actions .btn { flex: 1; }
  .modal-layer { padding: 0; align-items: flex-end; }
  .modal { width: 100% !important; max-height: 94vh; border-radius: 22px 22px 0 0; transform: translateY(24px); }
  .modal--sm { width: 100% !important; }
  .modal__head { padding: 16px 16px 12px; }
  .modal__head h2 { font-size: 19px; }
  .modal__body { padding: 16px; }
  .modal__foot { padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); }
  .modal__foot .btn { flex: 1; }
  .stepper__label { display: none; }
  .stepper__item { gap: 0; }
  .stepper__dot { width: 26px; height: 26px; }
  .denom-table th:nth-child(3), .denom-table td:nth-child(3) { display: none; }
  .denom-table td { padding: 6px 4px; }
  .denom-table input { width: 68px; }
  .denom-table .denom-label { font-size: 11.5px; }
  .denom-table .denom-sub { display: none; }
  .pos-topbar { height: 62px; padding: 0 12px; }
  .pos-topbar__title h1 { font-size: 14px; }
  .pos-topbar__title p { font-size: 9px; }
  .pos-topbar__status .status-pill { padding: 4px 6px; font-size: 0; gap: 0; }
  .pos-topbar__status .status-pill .dot { margin: 0; }
  .pos-content { padding: 14px 12px 100px; }
  .pos-catalog__head { flex-direction: column; gap: 9px; }
  .pos-catalog__head h2 { font-size: 23px; }
  .pos-search { width: 100%; flex-basis: auto; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card { min-height: 142px; padding: 11px; }
  .product-card__add { opacity: 1; transform: none; width: 23px; height: 23px; }
  .product-card__thumb { width: 37px; height: 37px; font-size: 18px; }
  .product-card__name { font-size: 12px; }
  .product-card__price { font-size: 13px; }
  .shift-gate { padding: 24px 20px; min-height: 300px; }
  .shift-gate__art { width: 100px; height: 100px; right: 16px; bottom: 16px; top: auto; transform: none; opacity: .3; }
  .shift-gate h2 { font-size: 34px; }
  .shift-gate__actions { width: 100%; }
  .shift-gate__actions .btn { flex: 1; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
  .launch-main { padding: 24px 16px 50px; }
  .launch-nav { padding: 16px; }
  .launch-hero h1 { font-size: 45px; }
  .demo-banner { padding: 6px 12px; font-size: 9.5px; }
  .demo-banner .desktop { display: none; }
  .table-wrap { margin: 0 -14px; width: calc(100% + 28px); }
  .data-table th, .data-table td { padding-left: 14px; padding-right: 14px; }
  .toolbar .search-field { max-width: none; }
  .toolbar .select { flex: 1; min-width: 0; }
  .toolbar__right { width: 100%; margin-left: 0; }
  .toolbar__right .btn { flex: 1; }
  .active-shift-bar { gap: 9px; padding: 10px 12px; }
  .active-shift-bar__item { font-size: 10.5px; }
  .active-shift-bar .spacer { display: none; }
  .hide-mobile { display: none !important; }
  .hide-desktop { display: initial; }
  .modal-copy { font-size: 13px; }
  .receipt-box { font-size: 10.5px; }
  .table-foot { flex-direction: column; align-items: flex-start; gap: 5px; }
}
@media (max-width: 400px) {
  .stat-card { min-height: 100px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .pay-methods { grid-template-columns: 1fr 1fr 1fr; }
  .pay-method { font-size: 9px; padding: 7px 3px; }
}
@media (max-width: 345px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* Utilidades de visibilidad específicas */
.pos-menu { display: none; }
.cart-panel__mobile-head { display: none; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cart-panel__mobile-head strong { font-size: 14px; }
.cart-panel__mobile-head .icon-btn { display: inline-flex; }
.cart-close { display: none; }
.mobile-only { display: none; }
@media (max-width: 900px) { .cart-close { display: inline-flex; } .mobile-only { display: initial; } }

/* POS · recepciones, cobro y cierre */
.shipment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.shipment-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); display: grid; gap: 11px; }
.shipment-card__head { display: flex; gap: 11px; align-items: flex-start; }
.shipment-card__head .branch-card__title { flex: 1; min-width: 0; }
.shipment-card__foot { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 11px; }
.shipment-card .shipment-items { border: 0; }
.shipment-card .shipment-item { background: var(--surface-2); border-radius: 7px; margin-bottom: 3px; border: 0; padding: 7px 9px; }
.receive-row { align-items: center; }
.receive-qty { display: flex; flex-direction: column; gap: 2px; width: 116px; flex: 0 0 auto; }
.receive-qty label { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--muted); }
.receive-qty .input { min-height: 36px; padding: 6px 8px; text-align: right; }
.checkout-total { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 12px; background: var(--ink); color: #fff; flex-wrap: wrap; }
.checkout-total span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.55); font-weight: 750; }
.checkout-total strong { font-size: 32px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.checkout-total small { color: rgba(255,255,255,.55); font-size: 10px; }
.change-box { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--success-soft); border: 1px solid #c4dfcf; color: var(--success); border-radius: 10px; padding: 11px 13px; }
.change-box span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.change-box strong { font-size: 24px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.change-box small { color: var(--muted); font-size: 10px; margin-left: auto; }
.close-steps-preview { display: grid; gap: 8px; margin-bottom: 16px; }
.close-steps-preview > div { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--ink-2); }
.close-steps-preview b { width: 21px; height: 21px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--brand); font-size: 10px; flex: 0 0 auto; }
.cierre-cta { background: linear-gradient(160deg, var(--surface), var(--amber-soft)); border-color: #ebd9b8; }
.count-line.total { border-top: 1px solid var(--line); padding-top: 7px; margin-top: 3px; }
@media (max-width: 900px) {
  .shipment-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .receive-row { align-items: flex-start; flex-wrap: wrap; }
  .receive-qty { width: 100%; flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; }
  .receive-qty label { margin-right: auto; }
  .receive-qty .input { width: 95px; }
  .checkout-total strong { font-size: 27px; }
  .change-box small { margin-left: 0; width: 100%; }
}

/* Detalle de cierre */
.closure-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-2); }
.closure-hero__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.closure-hero--bad .closure-hero__icon { background: var(--danger-soft); color: var(--danger); }
.closure-hero strong { display: block; font-size: 15px; }
.closure-hero span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.closure-hero__amount { margin-left: auto; text-align: right; }
.closure-hero__amount small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.closure-hero__amount b { font-size: 21px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.denom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.denom-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.denom-chip span { display: block; font-size: 9px; color: var(--muted); }
.denom-chip strong { display: block; font-size: 11px; font-variant-numeric: tabular-nums; }

/* Dashboard y paneles compuestos */
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.mini-payment-split { border-top: 1px solid var(--line); padding-top: 13px; }
.mini-payment-split__bar { width: 100%; height: 8px; background: var(--amber); border-radius: 999px; overflow: hidden; display: flex; }
.mini-payment-split__bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.mini-payment-split__labels { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.mini-payment-split__labels span { display: inline-flex; align-items: center; gap: 5px; }
.mini-payment-split__labels b { color: var(--ink); }
.alert-row { width: 100%; display: flex; align-items: flex-start; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 11px 0; text-align: left; color: var(--ink); }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: var(--surface-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.alert-row .alert-item__icon { width: 30px; height: 30px; }
.alert-row__body { flex: 1; min-width: 0; }
.alert-row__body strong { display: block; font-size: 12px; line-height: 1.35; }
.alert-row__body > span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.alert-row__end { text-align: right; flex: 0 0 auto; }
.alert-row__end strong { display: block; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.alert-row__end small { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: #a56d1e !important; }

/* Equipo e invitaciones */
.invite-list { display: grid; gap: 10px; }
.invite-card { border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: var(--surface); display: grid; gap: 5px; }
.invite-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.invite-card > strong { font-size: 12.5px; }
.invite-code { font-family: var(--font-mono); font-size: 16px; letter-spacing: .12em; font-weight: 800; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 7px; padding: 7px 9px; text-align: center; margin: 4px 0; }
.invite-result { text-align: center; display: grid; justify-items: center; gap: 6px; }
.invite-result h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.invite-result p { font-size: 11px; color: var(--muted); }
.invite-big-code { font-family: var(--font-mono); font-size: clamp(24px, 6vw, 34px); font-weight: 800; letter-spacing: .14em; background: var(--amber-soft); border: 1px dashed #d9bc80; color: var(--amber-ink); border-radius: 12px; padding: 14px 22px; margin: 10px 0 6px; width: 100%; text-align: center; overflow-wrap: anywhere; }
.invite-result .help-steps { width: 100%; text-align: left; background: var(--surface-2); border-radius: 10px; padding: 12px; margin-top: 10px; }

/* Ajustes */
.settings-layout { display: grid; gap: 16px; }
.price-list { display: grid; gap: 0; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row > span { display: grid; gap: 1px; }
.price-row strong { font-size: 12.5px; }
.price-row small { color: var(--muted); font-size: 10.5px; }
.price-row .input-group { width: 150px; }
.price-row .input { min-height: 38px; }
.settings-security { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.settings-security > div { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: var(--surface-2); border-radius: 10px; }
.settings-security > div > .icon { color: var(--brand); flex: 0 0 auto; margin-top: 1px; }
.settings-security strong { display: block; font-size: 11.5px; }
.settings-security p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.settings-layout code { font-family: var(--font-mono); font-size: 10px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.settings-layout .panel__foot { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); }

@media (max-width: 1100px) {
  .dashboard-columns { grid-template-columns: 1fr; }
  .settings-security { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .denom-grid { grid-template-columns: repeat(2, 1fr); }
  .price-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .price-row .input-group { width: 100%; }
  .alert-row:hover { margin: 0; padding-left: 0; padding-right: 0; }
  .closure-hero__amount { margin-left: 0; width: 100%; text-align: left; }
}
