/* =========================================================
   Fina Tacos · Pedidos — estilos. Temas: Navy y Lima (data-theme en <html>)
   ========================================================= */
@font-face { font-family: "PJS"; src: url(../fonts/pjs-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PJS"; src: url(../fonts/pjs-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PJS"; src: url(../fonts/pjs-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "PJS"; src: url(../fonts/pjs-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PJS"; src: url(../fonts/pjs-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "DMS"; src: url(../fonts/dms-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DMS"; src: url(../fonts/dms-500.woff2) format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "DMS"; src: url(../fonts/dms-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DMS"; src: url(../fonts/dms-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root, [data-theme="navy"] {
  --font: "PJS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #e9ecf8; --surface: #f4f5fb; --card: #fff; --ink: #171e44; --ink-2: #4b5277; --muted: #7d84a3; --line: #e3e6f2;
  --primary: #1f2b5b; --primary-ink: #fff; --primary-soft: #e6e9f6; --accent: #f06a3b; --accent-ink: #fff;
  --soft: #eef0f9; --soft-ink: #1f2b5b; --chip-on: #1f2b5b; --chip-on-ink: #fff;
  --header-bg: #1f2b5b; --header-ink: #fff; --header-muted: #aeb6d8; --price: #d9531f;
  --ok: #138556; --ok-soft: #dff3e9; --warn: #a8530a; --warn-soft: #fdecd8; --danger: #c3343d; --danger-soft: #fde6e7; --info: #3452b4; --info-soft: #e5eafb;
  --r: 22px; --r-sm: 14px; --r-btn: 999px; --shadow: 0 10px 30px rgba(31,43,91,.08); --shadow-lg: 0 18px 50px rgba(31,43,91,.2); --card-border: transparent;
  --nav-bg: #1f2b5b; --nav-ink: #9aa3cc; --nav-on: #fff; --fab-bg: #f06a3b; --fab-ink: #fff; --chart: #1f2b5b; --route: #f06a3b; --title-w: 800;
}
[data-theme="lima"] {
  --font: "DMS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #fff; --surface: #f5f5ef; --card: #fff; --ink: #111; --ink-2: #3c3c37; --muted: #76766d; --line: #e8e8df;
  --primary: #d8f032; --primary-ink: #111; --primary-soft: #f4fbcc; --accent: #111; --accent-ink: #d8f032;
  --soft: #f2f2ec; --soft-ink: #111; --chip-on: #d8f032; --chip-on-ink: #111;
  --header-bg: #fff; --header-ink: #111; --header-muted: #76766d; --price: #111;
  --ok: #17803f; --ok-soft: #e4f6e0; --warn: #9a4f08; --warn-soft: #fff0d6; --danger: #c43a3a; --danger-soft: #fde8e8; --info: #3a3a33; --info-soft: #f0f0e8;
  --r: 18px; --r-sm: 12px; --r-btn: 12px; --shadow: none; --shadow-lg: 0 20px 50px rgba(0,0,0,.14); --card-border: #ebebe3;
  --nav-bg: #fff; --nav-ink: #85857c; --nav-on: #111; --fab-bg: #111; --fab-ink: #d8f032; --chart: #111; --route: #111; --title-w: 700;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .grow { flex: 1; min-width: 0; } .mt { margin-top: 12px; }
.txt-warn { color: var(--warn); } .txt-danger { color: var(--danger) !important; } .txt-ok { color: var(--ok) !important; } .txt-accent { color: var(--price); font-weight: 600; }
.link { color: var(--primary); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; background: none; border: 0; padding: 0; cursor: pointer; }
[data-theme="lima"] .link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Estructura */
.app { min-height: 100vh; }
.sidebar { display: none; }
.main { min-height: 100vh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.content { padding: 16px; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
body.has-sticky .main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.split { display: flex; flex-direction: column; gap: 14px; }
.split > * { min-width: 0; }

.topbar { background: var(--header-bg); color: var(--header-ink); padding: calc(14px + env(safe-area-inset-top)) 16px 18px; border-radius: 0 0 28px 28px; }
[data-theme="lima"] .topbar { border-radius: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.topbar-row { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 0 auto; }
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 20px; font-weight: var(--title-w); letter-spacing: -.01em; overflow-wrap: anywhere; }
.topbar .sub { color: var(--header-muted); font-size: 13px; margin-top: 2px; }
.topbar .kicker { color: var(--header-muted); font-size: 13px; display: block; margin-bottom: 4px; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-extra { max-width: 1180px; margin: 14px auto 0; display: flex; flex-direction: column; gap: 10px; }
.topbar .icon-btn { background: rgba(255,255,255,.12); color: var(--header-ink); }
[data-theme="lima"] .topbar .icon-btn { background: var(--soft); }
.topbar .icon-btn.is-primary { background: var(--accent); color: var(--accent-ink); }
[data-theme="lima"] .topbar .icon-btn.is-primary { background: var(--primary); color: #111; }
.topbar.is-big { background: transparent; color: var(--ink); padding-bottom: 6px; border-bottom: 0; }
.topbar.is-big h1 { font-size: 32px; line-height: 1.04; letter-spacing: -.025em; }
.topbar.is-big .kicker, .topbar.is-big .sub { color: var(--muted); }
.topbar.is-big .icon-btn { background: var(--card); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.topbar .field span { color: var(--header-muted); }
.topbar .field input { background: #fff; color: #111; border-color: transparent; }
[data-theme="lima"] .topbar .field input { background: var(--surface); border-color: var(--line); }

.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--soft); color: var(--soft-ink); border: 1px solid transparent; transition: transform .12s; }
[data-theme="lima"] .icon-btn { border-radius: 12px; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-wa { background: #e3f6ea; color: #168a43; }
.icon-btn.is-primary { background: var(--primary); color: var(--primary-ink); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--r-btn); border: 1px solid transparent; font-weight: 700; font-size: 14px; background: var(--soft); color: var(--soft-ink); transition: transform .12s, filter .12s; text-align: center; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-soft { background: var(--card); color: var(--ink); border-color: var(--line); }
[data-theme="navy"] .btn-soft { background: var(--soft); border-color: transparent; color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-wa { background: #1fa855; color: #fff; }
.btn-lg { min-height: 54px; font-size: 16px; padding: 14px 22px; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.btn-sm .ic { width: 17px; height: 17px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.wrap > .btn { flex: 1 1 auto; }
.pulse { animation: pulse 1.6s ease-in-out 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(31, 168, 85, .2); } }

.chips { display: flex; gap: 8px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--chip-on); color: var(--chip-on-ink); }
.topbar:not(.is-big) .chip { background: rgba(255,255,255,.1); color: var(--header-ink); }
.topbar:not(.is-big) .chip.on { background: #fff; color: var(--primary); }
[data-theme="lima"] .topbar .chip { background: var(--soft); color: var(--ink-2); }
[data-theme="lima"] .topbar .chip.on, [data-theme="lima"] .chip.on { background: var(--primary); color: #111; }
.chip-date input { border: 0; background: rgba(255,255,255,.12); color: inherit; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
[data-theme="lima"] .chip-date input { background: var(--soft); }
[data-theme="navy"] .topbar .chip-date input { color-scheme: dark; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.lg { width: 13px; height: 13px; }

.day-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.day-tabs a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; padding: 10px 12px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.dt-label { font-weight: 700; font-size: 14px; } .dt-date { grid-column: 1; font-size: 12px; color: var(--muted); }
.dt-count { grid-row: 1 / 3; grid-column: 2; min-width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--soft); font-size: 14px; }
.day-tabs a.on { background: var(--primary); color: var(--primary-ink); }
.day-tabs a.on .dt-date { color: inherit; opacity: .75; }
.day-tabs a.on .dt-count { background: var(--accent); color: var(--accent-ink); }
.zone-line { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.zone-line i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 2px; }
.zona-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.zona-chip i { width: 9px; height: 9px; border-radius: 50%; }
.zona-chip.sin { color: var(--warn); }

.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-alert { border: 1px solid var(--warn-soft); }
.card-alert .card-head h2 { color: var(--warn); }
.card-accent { background: var(--primary-soft); box-shadow: none; }
.card-hero { align-items: center; text-align: center; padding: 24px 18px; }
.card-hero h2 { font-size: 22px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .chev-rot { transform: rotate(90deg); }
.chev-rot { transition: transform .2s; width: 16px; height: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 4px; padding: 0 2px; }
.section-title h2 { font-size: 18px; font-weight: 700; }

.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow); border: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-n { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat-n small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-l { font-size: 12px; color: var(--muted); }
.stat-l .ic { width: 13px; height: 13px; vertical-align: -2px; }
.stat.is-warn .stat-n { color: var(--warn); } .stat.is-ok .stat-n { color: var(--ok); }
.kpis .stat { gap: 4px; }
.delta { font-size: 12px; font-weight: 700; color: var(--muted); }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
.progress { height: 8px; border-radius: 99px; background: var(--card); overflow: hidden; border: 1px solid var(--card-border); }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
[data-theme="lima"] .progress span { background: var(--primary); }

.prep-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.prep-item { display: flex; align-items: center; gap: 12px; padding: 7px; border-radius: var(--r-sm); background: var(--surface); }
.prep-item img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; }
.prep-item > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.prep-item b { font-size: 14px; }
.prep-qty { min-width: 54px; height: 44px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--primary); color: var(--primary-ink); line-height: 1; padding: 0 6px; }
.prep-qty b { font-size: 19px; } .prep-qty small { font-size: 10px; opacity: .8; margin-top: 2px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--info-soft); color: var(--ink-2); font-size: 14px; }
.notice .ic { color: #1fa855; margin-top: 1px; }
.notice.warn { background: var(--warn-soft); }
.notice.warn .ic { color: var(--warn); }
.notice.small { font-size: 13px; }

/* Tarjetas de pedido */
.order-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.order-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--card-border); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.order-card.is-done { opacity: .72; }
.order-card.is-done .order-name { text-decoration: line-through; text-decoration-color: var(--muted); }
.order-card.is-cancel { opacity: .5; }
.order-main { display: flex; gap: 12px; align-items: flex-start; }
.order-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.order-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.order-addr, .order-when { font-size: 13px; color: var(--muted); display: flex; gap: 4px; align-items: flex-start; }
.order-addr .ic, .order-when .ic { width: 15px; height: 15px; margin-top: 2px; }
.order-total { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.order-total b { font-size: 16px; color: var(--price); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-items { list-style: none; margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.order-items b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; background: var(--primary); color: var(--primary-ink); font-size: 12px; margin-right: 4px; padding: 0 4px; }
.order-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--soft); color: var(--soft-ink); border: 1px solid transparent; min-height: 38px; }
[data-theme="lima"] .chip-btn { border-radius: 10px; background: var(--card); border-color: var(--line); }
.chip-btn .ic { width: 17px; height: 17px; }
.chip-btn.is-wa { background: #1fa855; color: #fff; border-color: transparent; }
.chip-btn.is-sent { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip-btn.is-primary { background: var(--primary); color: var(--primary-ink); margin-left: auto; border-color: transparent; }
.order-list.compact .order-card { box-shadow: none; background: var(--surface); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--soft); color: var(--ink-2); }
.tag .ic { width: 13px; height: 13px; vertical-align: 0; }
.tag-ok { background: var(--ok); color: #fff; } .tag-ok-soft { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); } .tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-muted { background: var(--soft); color: var(--muted); } .tag-info { background: var(--info-soft); color: var(--info); } .tag-soft { background: var(--primary-soft); color: var(--ink); }
.tag-stacc { background: #d62f2f; color: #fff; } .tag-new { background: #e5232b; color: #fff; letter-spacing: .04em; }

.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px; background: var(--primary-soft); color: var(--primary); }
[data-theme="lima"] .avatar { background: var(--primary); color: #111; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; } .avatar.lg { width: 52px; height: 52px; font-size: 17px; } .avatar.xl { width: 66px; height: 66px; font-size: 21px; }

.empty { text-align: center; padding: 30px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow); }
.empty-ic .ic { width: 32px; height: 32px; color: var(--muted); }
.empty h3 { font-size: 18px; }
.empty.small { padding: 10px; }

.suggest-list, .pred-list { display: flex; flex-direction: column; gap: 8px; }
.suggest, .pred { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: var(--r-sm); background: var(--surface); }
.suggest-info, .pred > a { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggest .icon-btn, .pred .icon-btn { width: 36px; height: 36px; }
.suggest.is-late, .pred.is-atrasado { background: var(--warn-soft); }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.field input, .field select, .field textarea, .search-input, .cat-row input, .list-row select {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface); font-size: 16px; font-weight: 500; color: var(--ink); outline: none; }
.field textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus-within { border-color: var(--primary); background: var(--card); }
[data-theme="lima"] .field input:focus, [data-theme="lima"] .field select:focus, [data-theme="lima"] .field textarea:focus, [data-theme="lima"] .search-input:focus-within { border-color: #111; }
.field input[type="color"] { padding: 4px; height: 46px; }
.search-input { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px; }
.search-input input { border: 0; background: none; outline: none; flex: 1; min-width: 0; height: 44px; font-size: 16px; }
.search-input .ic { color: var(--muted); }
.topbar:not(.is-big) .search-input { background: #fff; border-color: transparent; color: #111; }
[data-theme="lima"] .topbar .search-input { background: var(--surface); border-color: var(--line); }
.grid-2, .grid-3 { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: end; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; font-weight: 600; min-height: 46px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row small { display: block; font-weight: 400; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--accent); }
[data-theme="lima"] .switch-row input:checked + .switch { background: var(--primary); }
[data-theme="lima"] .switch-row input:checked + .switch::after { background: #111; }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg { display: flex; gap: 5px; background: var(--surface); padding: 4px; border-radius: var(--r-sm); flex-wrap: wrap; }
.seg label, .seg > button { flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg > button { display: flex; gap: 6px; align-items: center; justify-content: center; text-align: center; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); border: 0; background: none; }
.seg input:checked + span, .seg > button.on { background: var(--primary); color: var(--primary-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); }
.seg.vertical { flex-direction: column; }
.seg.vertical span { justify-content: flex-start; text-align: left; display: block; }
.seg.days { display: grid; grid-template-columns: repeat(6, 1fr); }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-size: 13px; font-weight: 800; }

.client-picked { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-sm); background: var(--primary-soft); }
.client-picked .grow { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.repeat-btn { align-self: flex-start; }
.client-search { display: flex; flex-direction: column; gap: 10px; }
.search-results { display: flex; flex-direction: column; gap: 6px; }
.search-results:empty { display: none; }
.result { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); background: var(--surface); text-align: left; border: 1px solid transparent; width: 100%; }
.result:hover, .result:focus { border-color: var(--primary); outline: none; }
.result .grow { display: flex; flex-direction: column; }
.quick-client { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-sm); background: var(--surface); }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-pick { border-radius: var(--r-sm); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; border: 2px solid transparent; transition: border-color .15s; }
.product-pick.has-qty { border-color: var(--accent); background: var(--card); }
[data-theme="lima"] .product-pick.has-qty { border-color: #111; }
.pp-img { position: relative; aspect-ratio: 4 / 3; background: #fff; max-width: 100%; }
.pp-img img { width: 100%; height: 100%; object-fit: cover; }
.pp-badges { position: absolute; left: 7px; top: 7px; display: flex; gap: 4px; flex-wrap: wrap; }
.pp-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pp-name { font-size: 14px; line-height: 1.25; }
.pp-desc { font-size: 12px; color: var(--muted); line-height: 1.3; flex: 1; }
.pp-foot { display: flex; flex-direction: column; gap: 7px; margin-top: 5px; }
.price { color: var(--price); font-weight: 800; font-variant-numeric: tabular-nums; }
.price small { font-weight: 600; color: var(--muted); font-size: 11px; }
.stepper { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; background: var(--card); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.stepper button { height: 38px; border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--ink); }
.stepper button[data-step="1"] { background: var(--accent); color: var(--accent-ink); }
[data-theme="lima"] .stepper button[data-step="1"] { background: var(--primary); color: #111; }
.stepper input { width: 100%; border: 0; text-align: center; font-weight: 800; font-size: 16px; background: none; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.date-chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.date-chips::-webkit-scrollbar { display: none; }
.date-chip { flex: none; width: 62px; padding: 7px 0 8px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; position: relative; }
.date-chip span { font-size: 11px; color: var(--muted); font-weight: 600; }
.date-chip b { font-size: 19px; font-weight: 800; }
.date-chip small { font-size: 10.5px; color: var(--muted); }
.date-chip.is-off { opacity: .45; border-style: dashed; }
.date-chip.is-rep::after { content: ""; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.date-chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); opacity: 1; }
.date-chip.on span, .date-chip.on small { color: inherit; opacity: .8; }
.date-chip.on::after { background: var(--primary-ink); }
.recur-box { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }

.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -8px 30px rgba(0,0,0,.08); border-top: 1px solid var(--line); }
[data-theme="navy"] .sticky-bar { border-radius: 24px 24px 0 0; border-top: 0; }
.sb-total { flex: 1; display: flex; flex-direction: column; }
.sb-total b { font-size: 22px; color: var(--price); font-weight: 800; font-variant-numeric: tabular-nums; }
body.has-sticky .bottom-nav { display: none; }

/* Detalle */
.client-row, .mini-row { display: flex; align-items: center; gap: 12px; }
.client-row .grow { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.mini-row { padding: 10px 0; border-top: 1px solid var(--line); }
.mini-row .grow { display: flex; flex-direction: column; }
.line-items { display: flex; flex-direction: column; gap: 10px; }
.line-item { display: flex; align-items: center; gap: 12px; }
.line-item img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.line-item .grow { display: flex; flex-direction: column; }
.line-total { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line); font-weight: 700; }
.line-total .price { font-size: 22px; }
.kv { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.kv > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.kv.money dd { font-weight: 700; font-variant-numeric: tabular-nums; align-items: flex-end; text-align: right; flex-direction: row; justify-content: flex-end; gap: 8px; }
.kv-total { padding-top: 10px; border-top: 1px dashed var(--line); }
.kv-total dt { color: var(--ink) !important; font-weight: 700; font-size: 14px !important; }
.kv-total dd { font-size: 20px; color: var(--price); font-weight: 800; }
.big-money { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; border-radius: var(--r-sm); background: var(--surface); text-align: center; width: 100%; }
.big-money span { font-size: 13px; color: var(--muted); font-weight: 600; }
.big-money b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--price); font-variant-numeric: tabular-nums; }
.big-money.small b { font-size: 24px; }
.pay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pay-list li { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.pay-list li .ic { width: 15px; height: 15px; color: var(--ok); }
.pay-list b { margin-left: auto; }
.cobro-res { border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.cobro-res:empty { display: none; }
.cobro-res.ok { background: var(--ok-soft); color: var(--ok); }
.cobro-res.warn { background: var(--warn-soft); color: var(--warn); }
.cobro-res.info { background: var(--info-soft); color: var(--info); }
.cobro-res b { font-size: 22px; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; position: relative; }
.tl-item .grow { display: flex; flex-direction: column; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: transparent; background: var(--card); flex: none; z-index: 1; }
.tl-dot .ic { width: 15px; height: 15px; }
.tl-item.done .tl-dot { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tl-item.done:not(:last-child)::before { background: var(--primary); }

.profile-card { flex-direction: row; align-items: flex-start; gap: 14px; }
.profile-card .grow { display: flex; flex-direction: column; gap: 4px; }
.note { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 13px; }
.fav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fav { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--r-sm); background: var(--surface); }
.fav img { aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; max-width: 100%; }
.fav b { font-size: 13px; }
.history, .ledger { display: flex; flex-direction: column; }
.history-row, .ledger-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.history-row.is-cancel { opacity: .55; }
.ledger-row .grow { display: flex; flex-direction: column; }
.ledger-row > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row form { margin: 0; }
.h-date { width: 46px; height: 46px; border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; flex: none; }
.h-date b { font-size: 17px; } .h-date small { font-size: 11px; color: var(--muted); }
.h-total { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

.list-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--card-border); overflow: hidden; }
.list-card.flat { box-shadow: none; border: 0; background: none; border-radius: 0; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); margin: 0; }
.list-card.flat .list-row { padding: 10px 0; }
.list-row:first-child { border-top: 0; }
.list-row select { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.list-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.list-row .grow, .list-main .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.list-row.is-off { opacity: .5; }

.product-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--card-border); overflow: hidden; display: flex; flex-direction: column; }
.pc-img { position: relative; aspect-ratio: 4/3; background: var(--surface); max-width: 100%; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pc-desc { flex: 1; }
.pc-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.pc-foot .price { font-size: 17px; }
.img-drop { position: relative; display: block; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 3; max-width: 100%; width: 100%; cursor: pointer; }
.img-drop img { width: 100%; height: 100%; object-fit: cover; }
.img-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-drop-cta { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 99px; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.cat-row { display: grid; grid-template-columns: 1fr 72px auto; gap: 8px; align-items: center; }
.cat-row input { min-height: 40px; padding: 8px 10px; font-size: 14px; }

/* Zonas */
.zone-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.zone-card { border-top: 4px solid var(--zc); }
.day-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.day-pills span { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--muted); }
.day-pills span.on { background: var(--zc); color: #fff; }

/* Mapas */
.map { height: 290px; border-radius: var(--r-sm); overflow: hidden; background: #e8e4da; position: relative; z-index: 0; }
.map-lg { height: 380px; } .map.mini { height: 170px; } .map-full { height: calc(100vh - 260px); min-height: 420px; }
.map.no-tiles { background: #ebe7dc; }
.map-off { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }
.loc { display: flex; flex-direction: column; gap: 10px; }
.loc-panel { display: flex; flex-direction: column; gap: 8px; }
.loc-res { display: flex; flex-direction: column; gap: 6px; }
.loc-res button { text-align: left; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); font-size: 13px; }
.loc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc-sug { padding: 10px 12px; border-radius: var(--r-sm); background: var(--info-soft); font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; background: var(--route); border: 2.5px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 12.5px; font-family: var(--font); }
[data-theme="lima"] .pin span { color: #d8f032; }
.pin.done { background: #9aa0ad; }
.pin.home { background: var(--primary); border-radius: 50%; }
.pin.home .ic { transform: rotate(45deg); color: var(--primary-ink); width: 15px; height: 15px; }
.route-card { padding: 10px; }
.route-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.route-summary > div { display: flex; flex-direction: column; padding: 8px 4px; background: var(--surface); border-radius: 12px; }
.route-summary b { font-size: 16px; font-variant-numeric: tabular-nums; }
.route-summary span { font-size: 12px; color: var(--muted); }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stop { display: flex; gap: 12px; background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.stop.is-done { opacity: .55; }
.stop-n { width: 34px; height: 34px; border-radius: 50%; background: var(--route); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
[data-theme="lima"] .stop-n { color: #d8f032; }
.stop.is-done .stop-n { background: #9aa0ad; color: #fff; }
.stop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.stop-body .order-actions { margin-top: 6px; }

/* Estadísticas */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .val { fill: var(--ink); font-weight: 700; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--chart); opacity: .3; }
.chart .bar.last { opacity: 1; }
.chart .bar.cur { opacity: .3; fill: var(--accent); }
.chart g.b:hover .bar { opacity: .8; }
.rank { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: flex; align-items: center; gap: 10px; }
.rank-row img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.rank-n { width: 26px; text-align: center; font-weight: 800; color: var(--muted); }
.rank-top { display: flex; justify-content: space-between; gap: 8px; }
.rank-top span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; margin-top: 5px; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--chart); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 6px; white-space: nowrap; }
.tbl td { padding: 9px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Ajustes y sistema */
.theme-pick { display: flex; gap: 12px; }
.theme-pick label { display: flex; flex-direction: column; gap: 6px; align-items: center; cursor: pointer; }
.theme-pick input { position: absolute; opacity: 0; }
.tp { width: 92px; height: 60px; border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; border: 2px solid var(--line); }
.tp i:first-child { grid-column: 1 / 3; }
.tp i { border-radius: 6px; }
.tp-navy { background: #e9ecf8; } .tp-navy i:nth-child(1) { background: #1f2b5b; } .tp-navy i:nth-child(2) { background: #fff; } .tp-navy i:nth-child(3) { background: #f06a3b; }
.tp-lima { background: #fff; } .tp-lima i:nth-child(1) { background: #d8f032; } .tp-lima i:nth-child(2) { background: #f3f3ed; } .tp-lima i:nth-child(3) { background: #111; }
.theme-pick input:checked + .tp { border-color: var(--ink); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
.check-list li.ok .ic { color: var(--ok); } .check-list li.bad { color: var(--danger); }
.steps-list { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.log { max-height: 340px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; background: var(--surface); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.log div { white-space: pre-wrap; overflow-wrap: anywhere; }
.log .bad { color: var(--danger); } .log .warn { color: var(--warn); }
.version-jump { display: flex; align-items: center; justify-content: center; gap: 16px; }
.version-jump span { display: flex; flex-direction: column; align-items: center; padding: 10px 18px; border-radius: 14px; background: var(--surface); }
.version-jump span.up { background: var(--ok-soft); color: var(--ok); }
.version-jump b { font-size: 24px; }
.changelog { white-space: pre-wrap; font-family: inherit; font-size: 13px; margin: 10px 0 0; color: var(--ink-2); }

/* Navegación inferior */
.bottom-nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; height: 64px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: var(--nav-bg); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 0 6px; }
[data-theme="lima"] .bottom-nav { border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--nav-ink); background: none; border: 0; padding: 6px 0; }
.bottom-nav .on { color: var(--nav-on); }
[data-theme="lima"] .bottom-nav .on .ic { background: var(--primary); border-radius: 99px; width: 44px; padding: 3px 12px; height: 26px; }
.bottom-nav .fab { width: 54px; height: 54px; border-radius: 50%; background: var(--fab-bg); color: var(--fab-ink); display: grid; place-items: center; justify-self: center; margin-top: -26px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.bottom-nav .fab .ic { width: 26px; height: 26px; }

.sheet { position: fixed; inset: 0; z-index: 100; background: rgba(10,14,30,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet-panel { width: 100%; max-width: 560px; background: var(--card); border-radius: 26px 26px 0 0; padding: 12px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: up .25s cubic-bezier(.2,.9,.3,1); max-height: 90vh; overflow: auto; }
.sheet-handle { width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 6px; }
.sheet-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--ok-soft); color: var(--ok); }
.sheet-icon .ic { width: 30px; height: 30px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; background: var(--surface); border: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: center; }
.menu-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); animation: up .25s; }
.toast-inline { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; background: var(--ok-soft); color: var(--ok); transition: opacity .4s; }
.toast-inline.error { background: var(--danger-soft); color: var(--danger); }
.danger-zone { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pager { display: flex; justify-content: center; gap: 12px; align-items: center; }

/* Login */
.login { min-height: 100vh; display: flex; flex-direction: column; }
.login-art { position: relative; height: 36vh; min-height: 220px; overflow: hidden; display: grid; place-items: center; }
[data-theme="navy"] .login-art { background: linear-gradient(160deg, #eef0fb, #dfe3f5); border-radius: 0 0 36px 36px; }
.login-hero { width: min(300px, 70%); position: relative; z-index: 1; filter: drop-shadow(0 20px 30px rgba(31,43,91,.2)); }
.shape { position: absolute; display: none; }
[data-theme="lima"] .shape { display: block; }
[data-theme="lima"] .s1 { width: 180px; height: 180px; border-radius: 50%; background: #111; left: -40px; bottom: 10px; }
[data-theme="lima"] .s2 { width: 170px; height: 220px; background: #111; transform: rotate(-24deg); right: 18%; top: -80px; border-radius: 6px; }
[data-theme="lima"] .s3 { width: 150px; height: 150px; border-radius: 50%; background: var(--primary); right: -30px; top: 20px; }
.login-card { flex: 1; padding: 26px 22px 30px; display: flex; flex-direction: column; gap: 14px; max-width: 440px; width: 100%; margin: 0 auto; }
[data-theme="navy"] .login-card { background: var(--primary); color: #fff; border-radius: 32px 32px 0 0; margin-top: -30px; position: relative; max-width: none; }
[data-theme="navy"] .login-card > * { max-width: 420px; width: 100%; margin-left: auto; margin-right: auto; }
[data-theme="navy"] .login-card .muted { color: #aeb6d8; }
[data-theme="navy"] .login-card .field span { color: #d6dbf2; }
[data-theme="navy"] .login-card .field input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; }
[data-theme="navy"] .login-card .btn-primary { background: #fff; color: var(--primary); }
[data-theme="navy"] .login-card .btn-ghost { color: #aeb6d8; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; }
.login-card h1 { font-size: 28px; letter-spacing: -.02em; }
.theme-login { align-self: center; }

@media (min-width: 640px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .product-grid, .product-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .prep-grid { grid-template-columns: 1fr 1fr; }
  .fav-grid { grid-template-columns: repeat(4, 1fr); }
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
  .zone-grid { grid-template-columns: 1fr 1fr; }
  .sheet { align-items: center; } .sheet-panel { border-radius: 26px; }
}
@media (min-width: 980px) {
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 252px; padding: 20px 14px; gap: 18px; background: var(--card); border-right: 1px solid var(--line); z-index: 20; overflow-y: auto; }
  [data-theme="navy"] .sidebar { background: var(--primary); color: #fff; border: 0; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; padding: 0 4px; }
  .brand img { width: 42px; height: 42px; border-radius: 12px; }
  .brand small { display: block; font-weight: 500; font-size: 11.5px; opacity: .7; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 13px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
  [data-theme="navy"] .side-nav a { color: #aeb6d8; }
  .side-nav a:hover { background: var(--soft); }
  [data-theme="navy"] .side-nav a:hover { background: rgba(255,255,255,.06); }
  .side-nav a.on { background: var(--primary); color: var(--primary-ink); }
  [data-theme="navy"] .side-nav a.on { background: #fff; color: var(--primary); }
  .side-nav a.is-new { margin: 4px 0; background: var(--accent); color: var(--accent-ink); }
  .side-foot { display: flex; flex-direction: column; gap: 8px; }
  .theme-switch { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--soft); border: 0; font-size: 13px; color: var(--ink-2); }
  [data-theme="navy"] .theme-switch { background: rgba(255,255,255,.08); color: #d6dbf2; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; font-size: 13px; font-weight: 700; }
  .side-user span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
  .side-user small { font-weight: 400; opacity: .7; }
  .main { margin-left: 252px; padding-bottom: 40px; }
  body.has-sticky .main { padding-bottom: 110px; }
  .bottom-nav, .theme-btn { display: none; }
  .topbar { padding: 22px 28px; }
  .content { padding: 22px 28px; }
  .topbar.is-big h1 { font-size: 40px; }
  .topbar.is-big h1 br { display: none; }
  .order-list:not(.one) { grid-template-columns: 1fr 1fr; }
  .product-grid, .product-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-row.kpis { grid-template-columns: repeat(6, 1fr); }
  .split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .zone-grid { grid-template-columns: repeat(3, 1fr); }
  .sticky-bar { left: 252px; padding: 14px 28px; border-radius: 0 !important; }
  .toast { bottom: 24px; }
  .chips.scroll { margin: 0; padding: 0; flex-wrap: wrap; }
  .date-chips { margin: 0; padding: 0; flex-wrap: wrap; }
  .map-lg { height: 460px; }
  .login { flex-direction: row; }
  .login-art { height: auto; flex: 1; border-radius: 0 !important; }
  .login-card { justify-content: center; margin: 0 !important; border-radius: 0 !important; max-width: 480px !important; padding: 40px; }
}
.leaflet-container { font-family: var(--font); background: #e8e4da; }
.leaflet-div-icon { background: none; border: 0; }
@media print { .bottom-nav, .sidebar, .topbar-actions, .sticky-bar { display: none !important; } .main { margin: 0 !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
