:root {
  --bg: #f6f3ee; --surface: #fff; --surface2: #faf8f4; --ink: #1f2a27; --ink2: #56625e; --muted: #87918d;
  --line: #e6e1d8; --brand: #24574c; --brand-2: #2f7d6d; --brand-soft: #e3efeb; --accent: #c7743f;
  --warn-bg: #fdf3e2; --warn: #8a5a12; --err-bg: #fbe9e7; --err: #a33a2c; --ok-bg: #e5f3ec; --ok: #23674a;
  --wa: #1f9d55; --radius: 14px; --shadow: 0 1px 2px rgba(30, 40, 35, .06), 0 2px 10px rgba(30, 40, 35, .04);
  --tab-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917; --surface: #1d2421; --surface2: #222a27; --ink: #e8ece9; --ink2: #b4bdb9; --muted: #8a9490;
    --line: #2f3834; --brand: #7cc7b2; --brand-2: #6bbba5; --brand-soft: #23352f; --accent: #e09a69;
    --warn-bg: #3a2e18; --warn: #f0c27a; --err-bg: #3d2320; --err: #f1998c; --ok-bg: #1d3329; --ok: #8fd9b3;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; margin-top: 1.4em; }
p { margin: 0 0 .7em; }
img { max-width: 100%; }

/* ---------- Estructura ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .top { background: #18302a; } }
.top h1 { font-size: 1.1rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-back { color: #fff; font-size: 1.8rem; line-height: 1; padding: 0 6px 4px 0; }
.top-new { color: var(--brand); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.top-new:hover { text-decoration: none; }
.main { max-width: 860px; margin: 0 auto; padding: 14px 16px calc(var(--tab-h) + 30px + env(safe-area-inset-bottom)); }
.side { display: none; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .72rem; position: relative; }
.tabbar a.on { color: var(--brand); }
.tabbar a:hover { text-decoration: none; }
.tabbar .dot { position: absolute; top: 10px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

@media (min-width: 900px) {
  body { padding-left: 230px; }
  .side { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 230px; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; overflow-y: auto; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 0 8px 18px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink2); }
  .side nav a:hover { background: var(--surface2); text-decoration: none; }
  .side nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
  .side-sep { height: 1px; background: var(--line); margin: 10px 8px; }
  .muted-link { color: var(--muted) !important; font-size: .9rem; }
  .tabbar { display: none; }
  .main { padding-bottom: 40px; }
  .top { background: transparent; color: var(--ink); position: static; max-width: 860px; margin: 0 auto; padding: 22px 16px 4px; }
  .top h1 { font-size: 1.5rem; }
  .top-back { color: var(--ink2); }
  .top-new { background: var(--brand); color: #fff; }
  @media (prefers-color-scheme: dark) { .top { background: transparent; } .top-new { color: #10201b; } }
}

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card-warn { border-color: #e9c98f; background: var(--warn-bg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head h2, .card-head p { margin: 0; }
.lead { color: var(--ink2); font-size: 1rem; margin-top: -2px; }
.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.hint { color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); padding: 6px 0; margin: 0; }
.neg { color: var(--err); }
.pos { color: var(--ok); }
.mt { margin-top: 12px; }
.r { text-align: right; }
.inline { display: inline; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; cursor: pointer; min-height: 42px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .btn { color: #10201b; } }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: .88rem; }
.btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--line); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; margin-top: 6px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 2px 6px; }
.x:hover { color: var(--err); }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btns { display: inline-flex; gap: 6px; }
.pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; margin-left: auto; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; background: var(--ok-bg); color: var(--ok); border: 1px solid transparent; }
.flash a { color: inherit; font-weight: 600; text-decoration: underline; }
.flash-error { background: var(--err-bg); color: var(--err); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi span { display: block; font-size: .78rem; color: var(--muted); }
.kpi b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.kpi-warn { background: var(--warn-bg); border-color: #e9c98f; }
.kpi-warn b { color: var(--warn); }
.kpi-main { background: var(--brand-soft); border-color: transparent; }
.kpis-sm { margin: 12px 0 6px; }
.kpis-sm .kpi b { font-size: 1.05rem; }

/* Badges */
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface2); color: var(--ink2); border: 1px solid var(--line); white-space: nowrap; }
.st-pendiente.badge { background: #fff4dc; color: #8a5a12; border-color: #f0dcae; }
.st-confirmada.badge { background: var(--ok-bg); color: var(--ok); border-color: #bfe0cf; }
.st-completada.badge { background: #e8eef5; color: #3c5a7d; border-color: #cfdbe8; }
.st-cancelada.badge { background: var(--surface2); color: var(--muted); }
.st-no_vino.badge { background: var(--err-bg); color: var(--err); border-color: #efc5bf; }
.st-cambio.badge { background: var(--accent); color: #fff; border-color: transparent; }
.st-alerta.badge { background: var(--err-bg); color: var(--err); border-color: #efc5bf; }
.st-debe.badge { background: var(--warn-bg); color: var(--warn); border-color: #e9c98f; }
.st-pagado.badge { background: var(--ok-bg); color: var(--ok); border-color: #bfe0cf; }
@media (prefers-color-scheme: dark) {
  .st-pendiente.badge, .st-debe.badge { background: #3a2e18; color: #f0c27a; border-color: #5a4626; }
  .st-confirmada.badge, .st-pagado.badge { border-color: #2d4a3c; }
  .st-completada.badge { background: #1f2a36; color: #9fbbdb; border-color: #2e3d4d; }
  .st-no_vino.badge, .st-alerta.badge { border-color: #5a322c; }
  .card-warn, .kpi-warn { border-color: #5a4626; }
}
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.wa-chip { font-size: .72rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2); white-space: nowrap; }
.wa-chip::before { content: "●"; margin-right: 4px; font-size: .6rem; vertical-align: 1px; }
.wa-sent::before { color: var(--wa); } .wa-read::before { color: #2a7fd4; } .wa-err { color: var(--err); } .wa-err::before { color: var(--err); } .wa-wait::before { color: var(--muted); }

/* Citas */
.citas { display: flex; flex-direction: column; gap: 8px; }
.cita { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: 12px; color: var(--ink); background: var(--surface); }
.cita:hover { text-decoration: none; background: var(--surface2); }
.cita.st-pendiente { border-left-color: #e0a63a; }
.cita.st-confirmada { border-left-color: var(--ok); }
.cita.st-completada { border-left-color: #6f8fb3; }
.cita.st-cancelada { opacity: .55; border-left-color: var(--muted); }
.cita.st-cancelada .perro { text-decoration: line-through; }
.cita.st-no_vino { border-left-color: var(--err); opacity: .75; }
.cita-hora { display: flex; flex-direction: column; min-width: 50px; font-variant-numeric: tabular-nums; }
.cita-hora b { font-size: 1.05rem; }
.cita-hora small { color: var(--muted); }
.cita-body { flex: 1; min-width: 0; }
.cita-tit .perro { font-weight: 700; }
.cita-precio { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hueco { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: .88rem; }
.hueco span { font-variant-numeric: tabular-nums; color: var(--ink2); }
.hueco b { margin-left: auto; color: var(--brand); font-size: 1.1rem; }
.hueco:hover { text-decoration: none; border-color: var(--brand-2); color: var(--brand); }

.agenda-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.agenda-mes { font-weight: 700; min-width: 120px; text-align: center; }
.agenda-bar input[type=date], .agenda-bar input[type=month] { width: auto; padding: 6px 8px; min-height: 34px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-left: auto; background: var(--surface); }
.seg a { padding: 6px 12px; color: var(--ink2); font-size: .88rem; }
.seg a.on { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .seg a.on { color: #10201b; } }
.seg a:hover { text-decoration: none; }
.seg-wide { display: flex; margin: 0 0 10px; }
.seg-wide a { flex: 1; text-align: center; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.weekstrip a { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; color: var(--ink2); background: var(--surface); border: 1px solid var(--line); }
.weekstrip a:hover { text-decoration: none; }
.weekstrip small { font-size: .7rem; }
.weekstrip b { font-size: 1.05rem; }
.weekstrip i { font-style: normal; font-size: .7rem; color: var(--accent); font-weight: 700; min-height: 1em; }
.weekstrip a.today { border-color: var(--brand-2); }
.weekstrip a.off { opacity: .55; }
.weekstrip a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.weekstrip a.on i { color: #fff; }
@media (prefers-color-scheme: dark) { .weekstrip a.on, .weekstrip a.on i { color: #10201b; } }
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.week-col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 160px; }
.week-col.today { border-color: var(--brand-2); }
.week-head { text-align: center; color: var(--ink2); font-size: .85rem; padding: 2px 0 4px; }
.week-cita { display: block; font-size: .8rem; padding: 5px 6px; border-radius: 8px; background: var(--brand-soft); color: var(--ink); border-left: 3px solid var(--brand-2); }
.week-cita small { display: block; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-cita.st-pendiente { border-left-color: #e0a63a; } .week-cita.st-completada { border-left-color: #6f8fb3; }
.week-cita.st-cancelada { opacity: .5; text-decoration: line-through; } .week-cita.st-no_vino { border-left-color: var(--err); opacity: .7; }
.week-cita:hover { text-decoration: none; filter: brightness(.97); }
.week-add { margin-top: auto; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }

/* Ficha */
.ficha-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.ficha-top h2 { margin: 0 0 2px; font-size: 1.25rem; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); flex-shrink: 0; }
.avatar.sm { width: 42px; height: 42px; }
.avatar.lg { width: 86px; height: 86px; }
.cuando { font-size: 1.05rem; }
.lista-serv { list-style: none; padding: 0; margin: 0 0 10px; border-top: 1px solid var(--line); }
.lista-serv li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.lista-serv li span { font-variant-numeric: tabular-nums; }
.lista-serv .total { font-weight: 700; border-bottom: 0; }
.nota { background: var(--surface2); border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.alerta { background: var(--err-bg); color: var(--err); border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.alerta.suave { background: var(--warn-bg); color: var(--warn); }
.datos { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: .92rem; }
.datos dt { color: var(--muted); } .datos dd { margin: 0; }
.burbuja { background: var(--ok-bg); border-radius: 12px 12px 12px 2px; padding: 8px 12px; margin: 6px 0; max-width: 90%; }
.burbuja small { display: block; color: var(--muted); }
.msg { padding: 8px 0; border-bottom: 1px solid var(--line); }
.msg.nuevo .burbuja { outline: 2px solid var(--accent); }
.timeline { display: flex; flex-direction: column; }
.tl-item { border-left: 2px solid var(--line); padding: 4px 0 12px 14px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); }
.tl-item.st-cancelada::before, .tl-item.st-no_vino::before { background: var(--muted); }
.tl-item p { margin: 4px 0 0; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.galeria figure { margin: 0; }
.galeria img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--surface2); }
.galeria figcaption { font-size: .75rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }

/* Listas */
.lista { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.card .lista { border: 0; border-radius: 0; margin: 0 -16px; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.card .item { padding: 11px 16px; }
.item:last-child { border-bottom: 0; }
.item:hover { text-decoration: none; background: var(--surface2); }
.item.inactivo { opacity: .55; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; }
.menu .item { padding: 14px 16px; }
.row-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.row-line:last-child { border-bottom: 0; }
a.row-line:hover { text-decoration: none; background: var(--surface2); }
.row-line > span:first-child, .row-line > a:first-child { min-width: 0; }
.buscador { display: flex; gap: 8px; margin-bottom: 10px; }
.buscador input { flex: 1; }
.danger-zone { text-align: center; margin: 24px 0; }

/* Formularios */
.form label { display: block; font-size: .85rem; color: var(--ink2); margin-bottom: 12px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; min-height: 42px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
input[readonly] { background: var(--surface2); font-size: .85rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
input[type=color] { padding: 2px; width: 44px; min-height: 38px; }
input[type=file] { padding: 7px; font-size: .85rem; }
.form label.check, label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
label.check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex-shrink: 0; accent-color: var(--brand-2); }
label.check.big { font-size: 1rem; font-weight: 600; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.form .grid2 > .btn, .form .grid3 > .btn { margin-bottom: 12px; }
.cards2 { align-items: start; gap: 0 14px; }
@media (max-width: 700px) { .cards2 { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
legend { font-size: .85rem; color: var(--ink2); font-weight: 500; margin-bottom: 6px; padding: 0; }
.dias { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dias legend { width: 100%; }
.dias label.check { margin: 0; }
.servicios { display: flex; flex-direction: column; gap: 6px; }
label.serv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; margin: 0; cursor: pointer; }
label.serv:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-2); border-left-color: var(--c); }
label.serv small { color: var(--muted); white-space: nowrap; }
.filtro { margin-bottom: 6px; }
.rango { display: flex; gap: 8px; align-items: end; margin-bottom: 12px; }
.rango label { flex: 1; font-size: .8rem; color: var(--muted); }
.rango .btn { margin-bottom: 0; }
pre.copiable { white-space: pre-wrap; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; user-select: all; }

.serv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.serv-row:last-child { border-bottom: 0; }
.serv-row input { margin: 0; }
.serv-row.inactivo { opacity: .55; }
.sr-nombre { flex: 1 1 200px; }
.sr-num { display: flex; align-items: center; gap: 4px; margin: 0; }
.sr-num input { width: 78px; }
.sr-num small { color: var(--muted); }

/* Gráficos */
.vbars { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.vbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; color: var(--muted); outline: none; }
.vbar i { display: block; width: 100%; max-width: 22px; min-height: 1px; background: var(--brand-2); border-radius: 4px 4px 0 0; }
.vbar small { position: absolute; bottom: -18px; font-size: .68rem; }
.vbars { margin-bottom: 22px; }
.vbar:hover i, .vbar:focus i, .vbar.on i { background: var(--accent); }
.vbars-12 .vbar i { max-width: 34px; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface);
  font-size: .75rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 5; pointer-events: none; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 86px; gap: 8px; align-items: center; padding: 5px 0; font-size: .88rem; }
.hbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar i { display: block; height: 10px; background: var(--brand-2); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar b { font-variant-numeric: tabular-nums; text-align: right; }
.tabla { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 6px; }
.tabla td { padding: 5px 0; border-bottom: 1px solid var(--line); }

/* Acceso e instalación */
body.auth { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.auth-box { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; box-shadow: var(--shadow); text-align: left; }
.auth-box.wide { max-width: 480px; }
.auth-box > img { display: block; margin: 0 auto 10px; }
.auth-box h1 { text-align: center; font-size: 1.3rem; }
.auth-box h2 { font-size: 1rem; margin-top: 18px; }
@media (min-width: 900px) { body.auth { padding-left: 20px; } }

/* Servicios con precio por tamaño */
.serv-card.inactivo { opacity: .6; }
details.card > summary { cursor: pointer; color: var(--brand); }
details.card[open] > summary { margin-bottom: 10px; }
details.card .serv-card { border: 0; box-shadow: none; padding: 0; margin: 0; }
.serv-cab { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.serv-cab input[name=nombre] { margin: 0; font-weight: 600; }
.serv-cab input[type=color] { margin: 0; flex-shrink: 0; }
.tabla-tam { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: .9rem; }
.tabla-tam th { text-align: left; font-weight: 500; color: var(--muted); font-size: .78rem; padding: 0 4px 4px; }
.tabla-tam td { padding: 3px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
.tabla-tam td:first-child { width: 42%; }
.tabla-tam td small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.2; }
.tabla-tam input { margin: 0; min-height: 36px; padding: 6px 8px; }
.tabla-tam tr.general td { background: var(--surface2); }
.serv-pie { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.serv-pie label { margin: 0 !important; }
.serv-pie .sr-num input { width: 64px; }
.serv-pie .btn { margin-left: auto; }

/* Reserva online (página pública) */
body.publico { padding-left: 0; }
.pub-top { display: flex; align-items: center; gap: 12px; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .pub-top { background: #18302a; } }
.pub-top h1 { margin: 0; font-size: 1.2rem; }
.pub-top p { margin: 2px 0 0; font-size: .85rem; opacity: .85; }
.pub-top img { border-radius: 10px; flex-shrink: 0; }
@media (min-width: 900px) { .pub-top { justify-content: center; } }
.pub-main { max-width: 620px; padding-bottom: 40px; }
.pasos { display: flex; list-style: none; padding: 0; margin: 0 0 14px; gap: 6px; counter-reset: p; }
.pasos li { flex: 1; text-align: center; font-size: .8rem; color: var(--muted); padding-top: 6px; border-top: 3px solid var(--line); counter-increment: p; }
.pasos li::before { content: counter(p) ". "; }
.pasos li.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.pasos li.ok { border-color: var(--brand-2); }
.tam-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.opcion { position: relative; margin: 0 !important; }
.opcion input { position: absolute; opacity: 0; }
.opcion span { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; color: var(--ink); background: var(--surface); cursor: pointer; }
.opcion input:checked + span { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.opcion input:focus-visible + span { outline: 2px solid var(--brand-2); }
label.serv .desc { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pub-total { font-weight: 600; text-align: center; min-height: 1.4em; margin: 6px 0; }
.dias-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scroll-snap-type: x mandatory; }
.dia { flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); scroll-snap-align: start; }
.dia small { font-size: .7rem; color: var(--muted); }
.dia b { font-size: 1.1rem; }
.dia:hover { text-decoration: none; border-color: var(--brand-2); }
.dia.on { background: var(--brand); border-color: var(--brand); }
.dia.on, .dia.on small { color: #fff; }
@media (prefers-color-scheme: dark) { .dia.on, .dia.on small { color: #10201b; } }
.dia.lleno { opacity: .35; pointer-events: none; }
.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.hora-btn { text-align: center; padding: 10px 0; border: 1px solid var(--brand-2); border-radius: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hora-btn:hover { background: var(--brand); color: #fff; text-decoration: none; }
.pub-resumen { display: flex; flex-direction: column; gap: 2px; background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.pub-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-ok { text-align: center; }
.pub-check { width: 64px; height: 64px; margin: 6px auto 12px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 2rem; line-height: 64px; font-weight: 700; }
.badge.st-online { background: #e8eef5; color: #3c5a7d; border-color: #cfdbe8; }
@media (prefers-color-scheme: dark) { .badge.st-online { background: #1f2a36; color: #9fbbdb; border-color: #2e3d4d; } }
.card-info { border-color: #cfdbe8; background: #f1f5fa; }
@media (prefers-color-scheme: dark) { .card-info { background: #1a232d; border-color: #2e3d4d; } }
.ad-img { display: block; width: 100%; max-width: 520px; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--surface2); }
label.serv > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { label.serv small.pub-precio, label.serv small.serv-precio { white-space: normal; text-align: right; max-width: 92px; } }
details.serv-det > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; list-style: none; color: var(--ink); }
details.serv-det > summary::-webkit-details-marker { display: none; }
details.serv-det > summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.3rem; transition: transform .15s; }
details.serv-det[open] > summary::after { transform: rotate(90deg); }
details.serv-det.inactivo { opacity: .6; }
.dot-c { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
