/* ManejaTuSalón — "Cera": warm paper background, deep espresso ink, a terracotta accent used sparingly.
   Phone-first shell: top bar + bottom tabs on phones, tabs in the top bar on desktop. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #F5F1EC; --surface: #FFFFFF; --surface-2: #F9F6F2; --ink: #241B1F; --muted: #776B6F; --line: #EAE3DC; --hair: #F1ECE6;
  --accent: #241B1F; --accent-ink: #FFFFFF; --accent-soft: #EFE8E1; --link: #B4462A; --clay: #C2542D; --clay-soft: #F8E6DD;
  --ok: #1E7A4C; --ok-soft: #E2F3E8; --warn: #9A5A00; --warn-soft: #FBEFD9; --bad: #C0362C; --bad-soft: #FBE5E2; --info: #2F5FB0; --info-soft: #E5EDFA;
  --none: #776B6F; --none-soft: #EFE9E4;
  --shadow: 0 1px 1px rgba(36,27,31,.03), 0 10px 26px -16px rgba(36,27,31,.22);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 20px; --slot: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141012; --surface: #1D181A; --surface-2: #241E21; --ink: #F5EFEA; --muted: #A89BA0; --line: #332B2F; --hair: #2A2326;
    --accent: #F5EFEA; --accent-ink: #141012; --accent-soft: #2C2427; --link: #F08A68; --clay: #E8754F; --clay-soft: #3A221A;
    --ok: #57D394; --ok-soft: #13301F; --warn: #F2BE5C; --warn-soft: #33260D; --bad: #FF7B70; --bad-soft: #3B1714; --info: #8DB0FF; --info-soft: #1B2640;
    --none: #A89BA0; --none-soft: #2A2326; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141012; --surface: #1D181A; --surface-2: #241E21; --ink: #F5EFEA; --muted: #A89BA0; --line: #332B2F; --hair: #2A2326;
  --accent: #F5EFEA; --accent-ink: #141012; --accent-soft: #2C2427; --link: #F08A68; --clay: #E8754F; --clay-soft: #3A221A;
  --ok: #57D394; --ok-soft: #13301F; --warn: #F2BE5C; --warn-soft: #33260D; --bad: #FF7B70; --bad-soft: #3B1714; --info: #8DB0FF; --info-soft: #1B2640;
  --none: #A89BA0; --none-soft: #2A2326; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 500 15px/1.45 var(--font); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; }
.topbar-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.mark { width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -.02em; flex: none; position: relative; }
.mark::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--clay); border: 2px solid var(--bg); }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab { border: 0; background: none; padding: 8px 13px; border-radius: 999px; color: var(--muted); font-weight: 700; cursor: pointer; text-decoration: none; display: flex; align-items: center; gap: 7px; position: relative; }
.tab svg { width: 18px; height: 18px; }
.tab[aria-current="page"] { background: var(--ink); color: var(--bg); }
.tab .dot { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--clay); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.menu-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; display: grid; place-items: center; flex: none; }
.menu-btn svg { width: 19px; height: 19px; }
main { max-width: 1180px; margin: 0 auto; padding: 14px 16px 120px; }
@media (max-width: 860px) {
  .tabs { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: color-mix(in srgb, var(--surface) 93%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(env(safe-area-inset-bottom, 0px) + 6px); justify-content: space-around; z-index: 20; }
  .tab { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; flex: 1; align-items: center; color: color-mix(in srgb, var(--muted) 85%, var(--bg)); }
  .tab svg { width: 23px; height: 23px; }
  .tab[aria-current="page"] { background: none; color: var(--ink); }
  .tab[aria-current="page"] svg { color: var(--clay); }
  .tab .dot { top: 0; right: calc(50% - 22px); }
  .topbar-in .menu-btn { margin-left: auto; }
}

/* ---------- type ---------- */
h1 { font-size: 30px; line-height: 1.1; font-weight: 800; margin: 0; letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: 13.5px; font-weight: 800; margin: 0; letter-spacing: -.005em; }
h3 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.eyebrow { font-size: 12px; font-weight: 800; color: var(--clay); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid transparent; border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
:root[data-theme="dark"] .card { border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card { border-color: var(--line); } }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--hair); }
.card-head .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.stack { display: grid; gap: 14px; align-content: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { padding: 16px 18px; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 38px; font-weight: 300; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 6px; }
.stat-note { font-size: 13px; color: var(--muted); }
.stat.bad .stat-value { color: var(--bad); font-weight: 400; } .stat.warn .stat-value { color: var(--warn); font-weight: 400; } .stat.ok .stat-value { color: var(--ok); font-weight: 400; }
button.stat, a.stat { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; text-decoration: none; display: block; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; } .stat-value { font-size: clamp(26px, 8.6vw, 36px); } .stats .wide { grid-column: 1 / -1; } }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--hair); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--muted); }
.row-wrap .row-title { white-space: normal; }
a.row, button.row { color: inherit; text-decoration: none; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; font: inherit; }
a.row:hover, button.row:hover { background: var(--surface-2); }
.row.alert { background: var(--bad-soft); }
.row .btns { flex-wrap: nowrap; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; width: 66px; flex: none; font-weight: 700; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ink); flex: none; }
.swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; display: inline-block; }
.group-label { padding: 10px 18px 6px; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--hair); }

/* ---------- pills & badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok, .pill-confirmada, .pill-terminada { background: var(--ok-soft); color: var(--ok); }
.pill-warn, .pill-reservada { background: var(--warn-soft); color: var(--warn); }
.pill-bad, .pill-no_vino { background: var(--bad-soft); color: var(--bad); }
.pill-info, .pill-llego { background: var(--info-soft); color: var(--info); }
.pill-none, .pill-cancelada { background: var(--none-soft); color: var(--none); }
.badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--muted); white-space: nowrap; }
.badge.clay { background: var(--clay-soft); color: var(--clay); }
.alert-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.alert-box svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note-box { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 16px;
  font-weight: 800; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; min-height: 44px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.clay { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 13px; }
.btn.wa { color: var(--ok); }
.btn.wa.sent { color: var(--muted); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; min-height: 46px; }
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.form { display: grid; gap: 14px; }
.form-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--clay); flex: none; }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 40px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
a.chip { color: var(--ink); text-decoration: none; }
a.chip[aria-pressed="true"] { color: var(--bg); }
.chip .n { opacity: .65; font-variant-numeric: tabular-nums; }
.chip.time-chip { font-variant-numeric: tabular-nums; min-width: 74px; justify-content: center; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, var(--bg)); padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: none; padding: 8px 13px; font-weight: 700; cursor: pointer; color: var(--muted); border-radius: 999px; white-space: nowrap; flex: none; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(36,27,31,.14); }
.summary { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.kv:last-child { border-bottom: 0; }
.kv b, .kv .num { font-variant-numeric: tabular-nums; }
.big-total { font-size: 40px; font-weight: 300; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.disc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.disc-row .input { width: 120px; flex: none; }
.phone-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 8px; }
.cc-select { padding-right: 6px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: .15s; }
.switch span::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: .15s; }
.switch input:checked + span { background: var(--clay); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }

/* ---------- modal ---------- */
dialog.modal { border: 0; border-radius: 26px; padding: 0; width: min(540px, calc(100vw - 20px)); background: var(--surface); color: var(--ink); max-height: calc(100dvh - 20px); }
dialog.modal.wide { width: min(820px, calc(100vw - 20px)); }
dialog.modal::backdrop { background: rgba(20,14,16,.55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); padding-top: 10px; }
.x { border: 0; background: none; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 24px; color: var(--muted); flex: none; }
@media (max-width: 600px) {
  dialog.modal, dialog.modal.wide { width: 100vw; max-width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  dialog.modal .modal-foot { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
  dialog.modal .modal-foot .btn.primary, dialog.modal .modal-foot .btn.clay { flex: 1; }
}

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 200; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--bad); color: #fff; }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); padding: 26px; }
.auth-card h1 { margin: 16px 0 6px; }
.demo-band { background: var(--clay-soft); color: var(--clay); text-align: center; padding: 8px 16px; font-weight: 700; font-size: 13px; }
.demo-band button, .demo-band a { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 800; cursor: pointer; padding: 0 2px; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-pick label { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; cursor: pointer; display: grid; gap: 2px; font-weight: 800; }
.type-pick label small { font-weight: 600; color: var(--muted); }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; }
.type-pick label:has(input:checked) { border-color: var(--clay); background: var(--clay-soft); }
.type-pick label:has(input:focus-visible) { outline: 2px solid var(--clay); outline-offset: 2px; }

/* ---------- AGENDA ---------- */
.ag-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ag-date { font-size: 22px; font-weight: 800; letter-spacing: -.02em; min-width: 0; flex: 1; }
.ag-date small { display: block; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.ag-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding-bottom: 2px; }
.ag-day { flex: none; width: 50px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px 0; text-align: center; cursor: pointer; font-weight: 800; }
.ag-day small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.ag-day b { display: block; font-size: 17px; }
.ag-day i { display: block; width: 5px; height: 5px; border-radius: 50%; margin: 2px auto 0; background: transparent; }
.ag-day.has i { background: var(--clay); }
.ag-day[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ag-day[aria-pressed="true"] small { color: inherit; opacity: .75; }
.ag-day.today:not([aria-pressed="true"]) { border-color: var(--clay); }
.ag-wrap { overflow: auto; max-height: calc(100dvh - 220px); position: relative; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overscroll-behavior: contain; }
@media (max-width: 860px) { .ag-wrap { max-height: calc(100dvh - 250px); } }
.ag { display: grid; position: relative; min-width: 100%; }
.ag-head { position: sticky; top: 0; z-index: 4; display: grid; background: var(--surface); border-bottom: 1px solid var(--line); }
.ag-head > div { padding: 10px 8px; font-weight: 800; font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--hair); display: flex; align-items: center; justify-content: center; gap: 6px; }
.ag-head > div:first-child { border-left: 0; position: sticky; left: 0; background: var(--surface); z-index: 5; }
.ag-body { display: grid; position: relative; }
.ag-times { position: sticky; left: 0; z-index: 3; background: var(--surface); border-right: 1px solid var(--hair); }
.ag-times div { height: calc(var(--slot) * 2); font-size: 11px; font-weight: 700; color: var(--muted); text-align: right; padding: 0 6px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.ag-col { position: relative; border-left: 1px solid var(--hair); background-image: repeating-linear-gradient(to bottom, var(--hair) 0, var(--hair) 1px, transparent 1px, transparent calc(var(--slot) * 2)); cursor: pointer; }
.ag-col .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, color-mix(in srgb, var(--line) 55%, var(--surface-2)) 6px, color-mix(in srgb, var(--line) 55%, var(--surface-2)) 8px); pointer-events: none; }
.ag-col .lunch { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--line) 45%, transparent); pointer-events: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.ag-appt { position: absolute; left: 3px; right: 3px; border-radius: 10px; padding: 4px 7px; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.25; border: 0; text-align: left;
  background: color-mix(in srgb, var(--c, var(--clay)) 16%, var(--surface)); color: var(--ink); border-left: 4px solid var(--c, var(--clay)); box-shadow: 0 1px 2px rgba(0,0,0,.06); z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; font: inherit; font-size: 12px; }
.ag-appt b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-appt span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-appt .tags { position: absolute; top: 4px; right: 5px; display: flex; gap: 3px; }
.ag-appt .tags i { font-style: normal; font-size: 11px; }
.ag-appt.reservada { border-left-style: dashed; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.ag-appt.llego { box-shadow: inset 0 0 0 2px var(--info); }
.ag-appt.terminada { opacity: .62; }
.ag-appt.no_vino { opacity: .55; text-decoration: line-through; background: var(--bad-soft); border-left-color: var(--bad); }
.ag-appt.cancelada { display: none; }
.ag-appt.bloqueo { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, var(--hair) 6px, var(--hair) 12px); border-left-color: var(--muted); color: var(--muted); }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--clay); z-index: 3; pointer-events: none; }
.ag-now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--clay); }
.ag-ghost { position: absolute; left: 3px; right: 3px; border-radius: 10px; border: 2px dashed var(--clay); pointer-events: none; z-index: 1; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--clay); background: var(--clay-soft); }
.fab { position: fixed; right: 18px; bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); z-index: 15; width: 58px; height: 58px; border-radius: 20px; border: 0; background: var(--clay); color: #fff;
  box-shadow: 0 10px 24px -8px rgba(194,84,45,.6); display: grid; place-items: center; cursor: pointer; }
.fab svg { width: 26px; height: 26px; }
@media (min-width: 861px) { .fab { bottom: 28px; right: 28px; } }

/* list view of the agenda (one person or "Lista") */
.ap-row { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--hair); align-items: center; cursor: pointer; }
.ap-row:hover { background: var(--surface-2); }
.ap-row .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c, var(--clay)); flex: none; }

/* ---------- service / item pickers ---------- */
.svc-pick { display: grid; gap: 6px; max-height: 300px; overflow: auto; padding: 2px; }
.svc-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); text-align: left; width: 100%; }
.svc-opt[aria-pressed="true"] { border-color: var(--clay); background: var(--clay-soft); }
.svc-opt .row-main b { display: block; }
.svc-opt .row-main small { color: var(--muted); }
.svc-opt .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.svc-cat { font-size: 12px; font-weight: 800; color: var(--muted); margin: 8px 2px 0; }
.times { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; padding: 2px; }
.client-hit { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.client-hit:hover, .client-hit:focus { background: var(--surface-2); outline: none; }
.picked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }

/* ---------- ticket (checkout) ---------- */
.tk-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.tk-line .meta { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tk-line .meta select, .tk-line .meta input { min-height: 36px; padding: 6px 10px; font-size: 13px; border-radius: 10px; width: auto; }
.tk-line .meta input { width: 92px; }
.tk-name { font-weight: 800; }
.tk-name small { display: block; font-weight: 600; color: var(--muted); }
.tk-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 6px; align-items: center; }
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.methods button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 6px; font-weight: 800; cursor: pointer; }
.methods button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ---------- client file ---------- */
.cl-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cl-head .avatar { width: 56px; height: 56px; font-size: 19px; background: var(--clay-soft); color: var(--clay); }
.minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.mini b { display: block; font-size: 20px; font-weight: 400; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini span { font-size: 12px; color: var(--muted); font-weight: 700; }
@media (max-width: 520px) { .minis { grid-template-columns: 1fr 1fr; } }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 14px 18px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; cursor: zoom-in; }
.photos figcaption { font-size: 11px; color: var(--muted); margin-top: 3px; }
.sig-pad { width: 100%; height: 180px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--surface-2); touch-action: none; display: block; }
.sig-img { max-width: 220px; height: 70px; object-fit: contain; background: #fff; border-radius: 8px; }
.consent-text { white-space: pre-wrap; background: var(--surface-2); padding: 12px 14px; border-radius: 14px; max-height: 220px; overflow: auto; font-size: 14px; }

/* ---------- settings ---------- */
.set-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
.feat { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--hair); }
.feat:last-child { border-bottom: 0; }
.feat .row-main b { display: block; }
.sched { display: grid; gap: 6px; }
.sched-row { display: grid; grid-template-columns: 96px auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.sched-row .input { min-height: 40px; padding: 6px 8px; }
.sched-row.off .input { opacity: .35; pointer-events: none; }
@media (max-width: 480px) { .sched-row { grid-template-columns: 70px auto minmax(0, 1fr) minmax(0, 1fr); gap: 5px; } }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 32px; height: 32px; border-radius: 10px; border: 3px solid transparent; cursor: pointer; }
.colors button[aria-pressed="true"] { border-color: var(--ink); }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 8px 8px 8px 14px; }
.copy-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }

/* ---------- reports ---------- */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 3px; height: 130px; padding: 0 2px; }
.bar { background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar.dim { background: var(--accent-soft); }
.bar.hi { background: var(--clay); }
.bar-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; font-size: 11px; color: var(--muted); text-align: center; margin-top: 6px; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--clay); border-radius: 4px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 800; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table tfoot td { font-weight: 800; border-top: 1px solid var(--line); }
.log-day { padding: 10px 18px 6px; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--hair); }

/* ---------- products ---------- */
.products { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.product { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.product-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.product-price { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stock { font-size: 13px; font-weight: 700; color: var(--muted); }
.stock.low { color: var(--bad); }

/* ---------- queue (fila) ---------- */
.q-card { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--hair); }
.q-num { width: 40px; height: 40px; border-radius: 13px; background: var(--accent-soft); display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; font-variant-numeric: tabular-nums; }
.q-card.serving .q-num { background: var(--info-soft); color: var(--info); }
.q-wait { font-weight: 800; color: var(--clay); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* TV board for the walk-in queue */
.tv { position: fixed; inset: 0; background: #120E10; color: #F5EFEA; display: flex; flex-direction: column; padding: 3vh 3vw; gap: 2.4vh; overflow: hidden; color-scheme: dark; }
.tv-head { display: flex; align-items: center; gap: 2vw; }
.tv-title { font-size: clamp(24px, 3vw, 60px); font-weight: 800; letter-spacing: -.03em; }
.tv-title span { color: #E8754F; }
.tv-clock { margin-left: auto; font-size: clamp(20px, 2.4vw, 48px); font-weight: 700; font-variant-numeric: tabular-nums; color: #C8BBC0; }
.tv-exit { background: none; border: 1px solid #3A3035; color: #A89BA0; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.tv-cols { flex: 1; display: grid; grid-template-columns: 1fr 1.25fr; gap: 2.4vw; min-height: 0; }
.tv-box { background: #1D171A; border-radius: 26px; padding: 2.6vh 2vw; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tv-box h2 { font-size: clamp(16px, 1.6vw, 32px); color: #A89BA0; font-weight: 700; margin-bottom: 1.6vh; }
.tv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4vh; }
.tv-list li { display: flex; align-items: center; gap: 1.4vw; font-size: clamp(20px, 2.4vw, 52px); font-weight: 800; letter-spacing: -.02em; }
.tv-list .n { width: 1.7em; height: 1.7em; border-radius: .45em; background: #2C2427; display: grid; place-items: center; font-size: .75em; flex: none; }
.tv-list .who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-list .w { color: #E8754F; font-size: .7em; font-variant-numeric: tabular-nums; }
.tv-list .pro { color: #A89BA0; font-size: .6em; font-weight: 700; }
.tv-serving li .n { background: #E8754F; color: #120E10; }
.tv-foot { text-align: center; color: #8A7D82; font-size: clamp(14px, 1.4vw, 28px); }
@media (max-width: 760px) { .tv-cols { grid-template-columns: 1fr; } }

/* ---------- billing ---------- */
.bill-band { display: flex; align-items: center; justify-content: center; gap: 8px 14px; flex-wrap: wrap; padding: 10px 16px; font-size: 14px; text-align: center; }
.bill-band.warn { background: var(--warn-soft); color: var(--warn); }
.bill-band.bad { background: var(--bad-soft); color: var(--bad); }
.bill-band a { color: inherit; font-weight: 800; }
.plan-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-name { font-size: 26px; font-weight: 800; line-height: 1.1; margin-top: 2px; letter-spacing: -.02em; }
.plan-price b { font-size: 26px; font-weight: 800; }
.plan-card .input, .plan-card .btn { width: 100%; max-width: 100%; }
.plan-card .btn { white-space: normal; }
.adm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; background: var(--none); }
.adm-dot.ok { background: var(--ok); } .adm-dot.warn { background: var(--warn); } .adm-dot.bad { background: var(--bad); }

/* ---------- tour ---------- */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(20, 14, 16, .62); transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 20px; padding: 14px 16px 16px; box-shadow: 0 18px 50px -12px rgba(0,0,0,.45); }
.tour-card h3 { font-size: 20px; line-height: 1.2; margin: 4px 0 6px; }
.tour-card p { margin: 0 0 12px; color: var(--muted); }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; padding: 6px 0 6px 10px; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 12px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s; }
.tour-dots i.on { width: 18px; background: var(--clay); }
.tour-btns { display: flex; justify-content: space-between; gap: 8px; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--clay); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-dots i, .toast, .switch span, .switch span::after { transition: none; } .spinner { animation-duration: 2s; } }
@media print {
  .topbar, .tabs, .demo-band, #toast, .no-print, .fab, .bill-band { display: none !important; }
  body { background: #fff; } .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
