/* Etiqueta de cosmética: porcelain ground, ink, fine hairlines, one rose-gold
   detail for "now". Each appointment is set like a product label: the name
   large, the treatment in small tracked capitals, the time like a measure on
   the right. Jost, one family. Every gap is a multiple of 8 px. */
@font-face { font-family: Jost; src: url(fonts/jost-latin.woff2) format("woff2"); font-weight: 400 600; font-display: swap;
  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: Jost; src: url(fonts/jost-latin-ext.woff2) format("woff2"); font-weight: 400 600; font-display: swap;
  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 {
  --ground: #fbfaf8;
  --surface: #fff;
  --greige: #f2eee8;
  --ink: #1d1b1a;
  --ink-2: #574d45;
  --rule: #e3ddd5;
  --line: #8a7f75;
  --rose: #b07d62;
  --rose-ink: #7a4a32;
  --accent: #0e3f9e;
  --done: #2b6343;
  --done-bg: #e7f0e9;
  --warn: #6e4a00;
  --warn-bg: #f8eed8;
  --err: #8f1d1d;
  --err-bg: #f9e9e7;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px;
  --r: 4px;
  --tap: 48px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
  font: 400 100%/1.45 Jost, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-color: var(--rule) transparent; }
body { margin: 0; background: var(--ground); color: var(--ink); min-height: 100dvh; -webkit-tap-highlight-color: transparent; overflow-wrap: break-word; }
::selection { background: var(--ink); color: #fff; }
::placeholder { color: var(--ink-2); opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-underline-offset: .2em; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1 { font-size: 1.375rem; line-height: 1.2; font-weight: 500; letter-spacing: -.005em; text-wrap: balance; }
h2 { font-size: 1.125rem; line-height: 1.25; font-weight: 500; }
h3 { font-size: 1rem; font-weight: 500; }
h1:focus, h2:focus { outline: none; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.slot { display: contents; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { padding: var(--s4) var(--s2); color: var(--ink-2); }

/* ── Shell ── */
#app { max-width: 36rem; margin: 0 auto; }
.view { padding: var(--s2) var(--s2) var(--s3); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); align-content: start; }
body.has-tabs .view { padding-bottom: calc(64px + var(--s3) + env(safe-area-inset-bottom)); }
body.has-tabs.has-bar .view { padding-bottom: calc(64px + var(--tap) + var(--s4) + env(safe-area-inset-bottom)); }

.tabs {
  position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--ground); border-top: 1px solid var(--rule);
}
.tabs a {
  display: grid; justify-items: center; align-content: center; gap: 4px;
  color: var(--ink-2); text-decoration: none; font-size: .833rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.tabs a .ico { width: 22px; height: 22px; stroke-width: 1.5; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"] .ico { stroke-width: 2; }
.tabs .brand, .tabs .net { display: none; }

/* The one primary action, full width, above the bottom bar. */
.bar {
  position: fixed; inset: auto 0 calc(64px + env(safe-area-inset-bottom)); z-index: 19;
  padding: var(--s2); background: var(--ground); border-top: 1px solid var(--rule);
}
.bar .btn { max-width: 34rem; margin: 0 auto; }
body:not(.has-tabs) .bar { bottom: env(safe-area-inset-bottom); }

/* ── Controls ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s1); width: 100%; min-height: var(--tap);
  padding: 0 var(--s3); border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .875rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; text-align: center; text-decoration: none; overflow-wrap: normal;
  cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--greige); }
.btn:active { transform: scale(.985); transition-duration: 40ms; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #3a3532; }
.btn.quiet { border-color: var(--line); }
.btn.more { width: auto; justify-self: start; padding: 0 var(--s2); }
.btn[aria-current="date"] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.danger:hover { background: var(--err-bg); }
.btn[data-armed] { background: var(--err); border-color: var(--err); color: #fff; }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn .ico { width: 20px; height: 20px; flex: none; }
.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0; background: none; border: 0;
  color: var(--accent); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: .22em;
  text-decoration-thickness: 1px; overflow-wrap: normal; cursor: pointer;
}
.iconbtn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); flex: none; border: 1px solid var(--line);
  border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit;
}
.iconbtn:hover { background: var(--greige); }
.iconbtn[disabled] { opacity: .4; }
.iconbtn .ico { width: 22px; height: 22px; }
.ico { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.field { display: grid; gap: var(--s1); }
.field > label { font-weight: 500; }
input, textarea, select {
  width: 100%; min-height: var(--tap); padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: inherit; caret-color: var(--rose-ink);
}
textarea { min-height: 7rem; padding-block: 12px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--err); }
input.code { font-size: 1.667rem; letter-spacing: .3em; }
.field-err { color: var(--err); font-weight: 500; }
.field-err:empty { display: none; }
.hint { color: var(--ink-2); font-size: .889rem; }
.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; }
.check input { width: 24px; height: 24px; min-height: 0; accent-color: var(--ink); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--tap); padding: 0 var(--s2);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; cursor: pointer; text-align: left;
}
.chip small { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] small { color: #e9e3db; }
/* Services two to a row in the form, name over duration. */
form .chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 100%), 1fr)); }
form .chip { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding-block: var(--s1); line-height: 1.25; hyphens: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.seg button { min-height: var(--tap); padding: 0 var(--s3); border: 0; background: none; font: inherit; font-size: .889rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); }
.actions .btn { padding: 0 var(--s1); letter-spacing: .05em; }

.banner { padding: 12px var(--s2); border-radius: var(--r); font-weight: 500; }
.banner.err { background: var(--err-bg); color: var(--err); }
.banner.ok { background: var(--done-bg); color: var(--done); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.info { background: var(--greige); color: var(--ink); }

/* What just happened, in a sentence, with Deshacer when it can be undone. */
.toast {
  position: fixed; left: 50%; bottom: calc(64px + var(--tap) + var(--s3) + env(safe-area-inset-bottom)); z-index: 40;
  translate: -50% 0; width: min(34rem, calc(100% - 32px)); display: flex; align-items: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s1) 0 var(--s2); border-radius: var(--r); background: var(--ink); color: #fff;
  box-shadow: 0 8px 24px rgb(29 27 26 / .18); animation: rise 200ms var(--ease);
}
.toast span { flex: 1; padding-block: 12px; }
.toast .link { color: #fff; padding: 0 var(--s1); }
@keyframes rise { from { opacity: 0; translate: -50% 8px; } }

/* Bottom sheet on the phone; the same dialog becomes a side panel on the PC. */
dialog.sheet {
  margin: auto 0 0; width: 100%; max-width: 100%; max-height: 90dvh; padding: 0; border: 0;
  border-radius: 12px 12px 0 0; background: var(--surface); color: var(--ink); overflow: auto;
  box-shadow: 0 -8px 32px rgb(29 27 26 / .14);
}
dialog.sheet[open] { animation: up 220ms var(--ease); }
dialog.sheet::backdrop { background: rgb(29 27 26 / .32); }
@keyframes up { from { translate: 0 24px; opacity: 0; } }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); padding: var(--s2) var(--s2) calc(var(--s3) + env(safe-area-inset-bottom)); max-width: 36rem; margin: 0 auto; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--rule); margin: 0 auto calc(-1 * var(--s1)); }

/* ── Agenda: date and week ── */
.dayhead { display: flex; align-items: center; gap: var(--s1); }
.dayhead h1 { flex: 1; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); border-block: 1px solid var(--rule); margin-inline: calc(-1 * var(--s2)); padding: var(--s1); }
.week button {
  display: grid; justify-items: center; gap: 2px; min-height: 60px; padding: 4px 0; border: 0; border-radius: var(--r);
  background: none; color: var(--ink-2); font: inherit; cursor: pointer;
}
.week button:hover { background: var(--greige); }
.week small { font-size: .833rem; font-weight: 500; letter-spacing: .1em; }
.week b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.week .fill { width: 24px; height: 2px; background: var(--rule); }
.week .fill i { display: block; height: 100%; background: var(--rose); }
.week [aria-current="date"] b { box-shadow: inset 0 0 0 1px var(--rose); }
.week [aria-pressed="true"] b { background: var(--ink); color: #fff; box-shadow: none; }
.week .closed b { color: var(--ink-2); font-weight: 400; }

/* ── The day as labels (phone) ── */
.timeline { display: grid; gap: var(--s1); }
.label {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px var(--s2); width: 100%;
  padding: 12px var(--s2); border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 160ms var(--ease);
}
.label:hover { border-color: var(--line); }
.label .name { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.label .tr { grid-column: 1; font-size: .833rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); line-height: 1.4; }
.label .tm { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }
.label .tm strong { display: block; font-size: 1.1875rem; font-weight: 500; line-height: 1.15; }
.label .tm span { font-size: .889rem; color: var(--ink-2); }
.label .tag { grid-column: 1 / -1; margin-top: 4px; }
.label.now { border-color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); }
.label.now .tm span { color: var(--rose-ink); font-weight: 500; }
.label.cancelled .name, .label.cancelled .tr { text-decoration: line-through; color: var(--ink-2); }
.label.cancelled, .label.no_show { background: var(--ground); }
.tag { justify-self: start; padding: 2px var(--s1); border-radius: var(--r); font-size: .889rem; font-weight: 500; }
.tag.no_show { background: var(--warn-bg); color: var(--warn); }
.tag.cancelled { background: var(--greige); color: var(--ink-2); }
.tag.done { background: var(--done-bg); color: var(--done); }
.tag.pending { background: var(--greige); color: var(--ink); }
.gap {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; min-height: var(--tap);
  padding: 0 var(--s2); border: 1px dashed var(--rule); border-radius: var(--r); background: none;
  color: var(--ink-2); font: inherit; text-align: left; cursor: pointer;
}
.gap:hover { border-color: var(--line); color: var(--ink); }
.gap .num { color: var(--ink); font-weight: 500; }
.gap .ico { width: 22px; height: 22px; color: var(--ink); }
.gap.now { border-color: var(--rose); color: var(--rose-ink); }
.closed-day { padding: var(--s2); color: var(--ink-2); font-style: italic; }
/* "Now" between two labels: one rose-gold hairline. */
.nowrule { display: flex; align-items: center; gap: var(--s1); color: var(--rose-ink); font-size: .833rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.nowrule::after { content: ""; flex: 1; height: 1px; background: var(--rose); }
.moving .gap { border: 1px solid var(--ink); color: var(--ink); background: var(--greige); }
.moving .label { opacity: .45; }
.empty { color: var(--ink-2); }

/* ── Lists ── */
.list { display: grid; background: var(--surface); border-block: 1px solid var(--rule); margin-inline: calc(-1 * var(--s2)); }
.list > * + * { border-top: 1px solid var(--rule); }
.list a, .list button.item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 56px; padding: 10px var(--s2);
  color: inherit; text-decoration: none; background: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer;
}
.list a:hover, .list button.item:hover { background: var(--greige); }
.list .sub { display: block; color: var(--ink-2); font-size: .889rem; }
.list .right { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .ico { color: var(--ink-2); }
.section-title { color: var(--ink-2); font-size: .833rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.list .group { padding: var(--s2) var(--s2) var(--s1); background: var(--ground); }
.data { display: grid; gap: var(--s2); }
.data dt { color: var(--ink-2); font-size: .833rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.data dd { margin-top: 2px; }
.who { display: grid; gap: 4px; }

/* ── PC: Mostrador ── */
@media (min-width: 56rem) {
  #app { max-width: none; margin: 0; }
  body { display: flex; flex-direction: column; }
  .tabs {
    position: sticky; inset: 0 0 auto; order: -1; display: flex; align-items: stretch; gap: var(--s1);
    height: 56px; padding: 0 var(--s3); background: var(--ground); border-top: 0; border-bottom: 1px solid var(--rule);
  }
  .tabs .brand { display: flex; align-items: center; margin-right: var(--s4); font-size: 1.125rem; font-weight: 500; letter-spacing: .02em; }
  .tabs a { display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s2); border-bottom: 2px solid transparent; }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current="page"] { border-bottom-color: var(--ink); }
  .tabs .net { display: flex; align-items: center; margin-left: auto; color: var(--ink-2); font-size: .889rem; }
  .bar { display: none; }
  body.has-tabs .view, body.has-tabs.has-bar .view { padding-bottom: var(--s4); }
  .view { padding: var(--s4); max-width: 52rem; margin: 0 auto; }
  .toast { bottom: var(--s3); }
  .list, .week { margin-inline: 0; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
  dialog.sheet { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: 30rem; border-radius: 0; }
  dialog.sheet[open] { animation-name: side; }
  @keyframes side { from { translate: 24px 0; opacity: 0; } }
  .v-agenda, body.has-tabs .v-agenda { max-width: none; padding: 0; height: calc(100dvh - 56px); grid-template-columns: minmax(0, 1fr) 26rem; gap: 0; }
}

/* PC day and week grid */
.desk { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: var(--s3) var(--s3) 0; gap: var(--s2); }
.desk .dayhead { flex-wrap: wrap; row-gap: var(--s2); }
.desk .dayhead h1 { flex: 1 0 100%; }
.desk .dayhead .btn { width: auto; }
.grid-scroll { overflow: auto; min-height: 0; border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: var(--surface); }
.desk { background: var(--greige); }
.panel-empty .label { cursor: pointer; color: var(--ink); }
.grid { --slot-h: 22px; display: grid; grid-template-columns: 72px repeat(var(--cols), minmax(6rem, 1fr)); position: relative; }
.grid-colhead { position: sticky; top: 0; z-index: 3; padding: 12px var(--s2); background: var(--surface); border-bottom: 1px solid var(--rule); font-size: .833rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.grid-colhead[aria-current="date"] { color: var(--rose-ink); }
.grid-colhead button { all: unset; cursor: pointer; }
.grid-hours { position: relative; }
.grid-hours span { position: absolute; left: var(--s2); translate: 0 4px; font-size: .889rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.col { position: relative; border-left: 1px solid var(--rule); cursor: cell;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px); background-size: 100% calc(var(--slot-h) * var(--per-hour)); }
.col .shut { position: absolute; inset-inline: 0; background: var(--greige); cursor: default; }
.col .hover-slot { position: absolute; inset-inline: 4px; border-radius: var(--r); border: 1px dashed var(--line); pointer-events: none; display: none; color: var(--ink-2); font-size: .833rem; padding: 2px var(--s1); }
.col:hover .hover-slot { display: block; }
.appt {
  position: absolute; overflow: hidden; padding: 6px 10px; border-radius: var(--r); border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink); font-size: .889rem; line-height: 1.3; cursor: grab; text-align: left; font-family: inherit;
  touch-action: none; overflow-wrap: normal; box-shadow: 0 1px 2px rgb(29 27 26 / .06);
}
.appt b { display: block; font-size: 1rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 3.5rem; }
.appt .tr { display: block; font-size: .833rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .tmr { position: absolute; top: 6px; right: 10px; font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.appt.short { padding-block: 2px; }
.appt.short .tr { display: none; }
.grid.wk .appt b { padding-right: 0; }
.grid.wk .appt .tmr { position: static; display: block; font-size: .889rem; color: var(--ink-2); }
.appt:hover { border-color: var(--line); }
.appt[aria-pressed="true"] { border: 2px solid var(--ink); box-shadow: 0 6px 16px rgb(29 27 26 / .12); }
.appt.now { border-color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); }
.appt.cancelled { background: var(--ground); border-style: dashed; color: var(--ink-2); }
.appt.cancelled b { text-decoration: line-through; }
.appt.no_show { background: var(--warn-bg); border-color: #e2cf9f; }
.appt.done { background: var(--done-bg); border-color: #b9d3c1; }
.appt.dragging { cursor: grabbing; box-shadow: 0 10px 24px rgb(29 27 26 / .18); z-index: 5; }
.appt .tag { display: inline-block; margin-top: 4px; font-size: .833rem; padding: 0 6px; }
/* Day view: the state word sits in the top corner, so a short block never clips it. */
.grid:not(.wk) .appt .tag { position: absolute; bottom: 6px; right: 10px; margin: 0; }
.grid:not(.wk) .appt.short .tag { bottom: auto; top: 4px; right: 4.5rem; }
.grid .nowline { position: absolute; height: 1px; background: var(--rose); z-index: 4; pointer-events: none; }
.grid .nowline::before { content: ""; position: absolute; left: -4px; top: -3.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.panel { border-left: 1px solid var(--rule); background: var(--surface); overflow: auto; }
.panel .sheet-body { padding: var(--s3); }
.panel-empty { padding: var(--s4) var(--s3); color: var(--ink-2); display: grid; gap: var(--s2); }

/* ── Hoja de mañana (printed) ── */
.hoja { display: grid; gap: var(--s1); }
.hoja table { width: 100%; border-collapse: collapse; }
.hoja td { padding: 12px 4px; border-top: 1px solid var(--rule); vertical-align: top; }
.hoja td:first-child { width: 4.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.hoja .notes { color: var(--ink-2); font-size: .889rem; }
@media print {
  @page { margin: 6mm; }
  body { background: #fff; }
  .tabs, .bar, .noprint, .toast { display: none !important; }
  .view { padding: 0; max-width: none; }
  .hoja h1 { font-size: 14pt; }
  .hoja td { font-size: 10pt; padding: 1.5mm 1mm; border-color: #000; }
}

/* The cita form on the phone: Guardar stays within reach of the thumb. */
.v-cita form { padding-bottom: var(--s2); }
.v-cita form > button[type="submit"] { position: sticky; bottom: calc(var(--s2) + env(safe-area-inset-bottom)); box-shadow: 0 0 0 var(--s2) var(--ground); }
@media (max-width: 55.99rem) { .tabs.phone-hidden { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
.hint:empty { display: none; }

.nowrap { white-space: nowrap; }
/* Sections: heading close to its content, more room between sections. */
form.stack { gap: var(--s3); }
form.stack > section { gap: var(--s2); }
details[open] > summary { margin-bottom: var(--s2); }
.appt { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }

/* ── The till ── */
.print-frame { position: fixed; left: -9999px; top: 0; width: 80mm; height: 100px; border: 0; }
.ticket { display: grid; gap: var(--s2); align-content: start; }
.ticket-lines { display: grid; gap: var(--s1); align-content: start; }
.ticket-lines .list li.line-in { animation: line-in 160ms var(--ease); }
@keyframes line-in { from { opacity: 0; translate: 0 4px; } }
.ticket-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.ticket-total b { font-size: 1.75rem; line-height: 1.2; font-weight: 500; }
.ticket-foot { display: grid; gap: var(--s1); }
.ticket-foot .link { justify-self: center; }
.ticket-find { display: grid; gap: var(--s2); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 64px; padding: var(--s1) var(--s2);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font: inherit; text-align: left; line-height: 1.25;
  cursor: pointer; transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.tile:hover { border-color: var(--ink); }
.tile:active { transform: scale(.985); transition-duration: 40ms; }
.tile small { color: var(--ink-2); }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.big { min-height: 64px; font-size: 1rem; }
.chip[disabled], .btn.big[disabled] { opacity: .5; cursor: progress; }
.change {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); padding: var(--s2); border-radius: var(--r);
  background: var(--done-bg); color: var(--done); animation: settle 200ms ease-out;
}
.change span { font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.change b { font-size: 2rem; line-height: 1.2; font-weight: 500; }
@keyframes settle { from { scale: .98; } }
.fade-in { animation: fade 200ms ease-out; }
.field-err:not(:empty) { animation: fade 160ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.panel[data-mode="ticket"] { overflow: hidden; }
.panel-ticket { height: 100%; }
.ticket-panel { display: flex; flex-direction: column; gap: var(--s2); height: 100%; min-height: 0; padding: var(--s3); }
.ticket-panel .ticket-lines { flex: 1 1 auto; min-height: 9rem; overflow: auto; }
.ticket-panel .ticket-find { flex: 0 1 auto; max-height: 28%; overflow: auto; }
.ticket-panel .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ticket-panel .ticket-foot { padding-top: var(--s2); border-top: 1px solid var(--rule); }

/* ── Tickets list and sheet ── */
.list .tags { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: 4px; }
.struck { text-decoration: line-through; color: var(--ink-2); }
.list .row-line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); width: 100%; padding: 10px var(--s2); }
.seg.wrap { display: flex; flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; padding: 0 var(--s2); letter-spacing: 0; text-transform: none; font-size: 1rem; }
form .two { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s2); }
@media (min-width: 56rem) { .tabs .phone-only { display: none; } }

.tile { overflow-wrap: break-word; hyphens: auto; }
.ticket-search { margin-block: var(--s2) var(--s1); }
.ticket-panel .ticket-search { flex: none; margin: 0; }
