/* ===== Temas: cada negocio elige uno y puede cambiar el color de acento ===== */
:root, [data-theme="natural"] {
  color-scheme: light;
  --font: "Figtree", system-ui, sans-serif;
  --brand-font: "Oswald", "Figtree", sans-serif;

  --ground: #f5f3ed;
  --surface: #ffffff;
  --raised: #efece4;
  --border: #e6e2d8;
  --rule: #efebe3;
  --control: #cfcabd;
  --text: #1b1f1c;
  --muted: #5c615b;
  --faint: #6b6f69;
  --accent: #2f7a45;
  --accent-ink: #ffffff;
  --primary: #2b6e3d;
  --primary-ink: #ffffff;

  --positive: #247b50; --pill-ok-bg: #e1f3e6; --pill-ok-ink: #0f3d22;
  --warn-bg: #fdf1dc; --warn-ink: #7a4a07;
  --negative: #b42a2d; --pill-bad-bg: #fbe8e6; --pill-bad-ink: #7d1c1e;

  /* tonos de los servicios en el calendario: pálidos, con borde izquierdo */
  --svc-1: #2f6b45; --svc-2: #9a6b2f; --svc-3: #3d6680; --svc-4: #9b4a5a;

  --r-card: 18px; --r-inner: 12px; --r-pill: 999px;
  --gap: 16px; --pad: 20px;
  --fs-title: 24px; --fs-big: 30px; --fs-h2: 17px; --fs-body: 15px; --fs-small: 13px;
}
/* Los temas claros comparten estos colores (así una vista previa nunca hereda los de otro tema) */
[data-theme="urbana"], [data-theme="lila"], [data-theme="lavender"] {
  color-scheme: light; --accent-ink: #ffffff; --primary-ink: #ffffff;
  --positive: #247b50; --pill-ok-bg: #e1f3e6; --pill-ok-ink: #0f3d22;
  --warn-bg: #fdf1dc; --warn-ink: #7a4a07;
  --negative: #b42a2d; --pill-bad-bg: #fbe8e6; --pill-bad-ink: #7d1c1e;
  --on-negative: #ffffff; --shadow-float: 0 24px 60px rgba(0,0,0,.22);
}
[data-theme="urbana"] {
  --ground: #f2eee7; --surface: #fffdf9; --raised: #e9e3d8;
  --border: #e3dccf; --rule: #ece6dc; --control: #cbc2b2;
  --text: #1d1915; --muted: #5f574d; --faint: #6c645a;
  --accent: #9c7141; --primary: #26201b;
  --svc-1: #9c7141; --svc-2: #4f5d4a; --svc-3: #3f5a74; --svc-4: #8a4b4b;
}
[data-theme="lila"] {
  --ground: #f5f4f8; --surface: #ffffff; --raised: #ecebf2;
  --border: #e5e3ee; --rule: #eeedf4; --control: #cbc8d8;
  --text: #1c1a24; --muted: #5d5a68; --faint: #6b6876;
  --accent: #6a56b4; --primary: #2a2441;
  --svc-1: #6a56b4; --svc-2: #2f7a66; --svc-3: #b0653a; --svc-4: #3f68a8;
}

/* Dark Lime: carbón mate, texto crema, el lima solo en lo importante */
[data-theme="darklime"] {
  color-scheme: dark;
  --ground: #222522; --raised: #2b2e2a; --surface: #30342f;
  --border: #3d423b; --rule: #383c36; --control: #545a51;
  --text: #f5efdf; --muted: #a9b0a5; --faint: #9aa196;
  --accent: #c8f45b; --accent-ink: #222522;
  --primary: #c8f45b; --primary-ink: #222522; --primary-hover: #b6e34a;
  --accent-text: #c8f45b;
  --tint: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --tint-strong: color-mix(in srgb, var(--accent) 30%, var(--surface));
  /* estados: mismo significado, versión para fondo oscuro */
  --positive: #9be0a8; --pill-ok-bg: #263a2b; --pill-ok-ink: #a9e8b4;
  --warn-bg: #3e3522; --warn-ink: #f2c66d;
  --negative: #ff8a7e; --pill-bad-bg: #442b28; --pill-bad-ink: #ffa79d;
  --svc-1: #c8f45b; --svc-2: #e3b866; --svc-3: #84b6dc; --svc-4: #e096a8;
  --shadow-float: 0 24px 60px rgba(0, 0, 0, .5);
}
/* Soft Lavender: lavanda clara, violeta oscuro en botones y texto */
[data-theme="lavender"] {
  --ground: #e5daf4; --raised: #efe7f8; --surface: #f7f3fc;
  --border: #d8cbe8; --rule: #e6ddf1; --control: #c3b3d8;
  --text: #30233f; --muted: #6a5c7b; --faint: #786a89;   /* #786A89 no llega a 4,5:1 sobre #E5DAF4: el secundario va en #6A5C7B */
  --accent: #493362; --accent-ink: #ffffff;
  --primary: #493362; --primary-ink: #ffffff; --primary-hover: #3d2a53;
  --tint: color-mix(in srgb, #c8b5e0 45%, var(--surface));
  --tint-strong: #c8b5e0;
  --svc-1: #493362; --svc-2: #8c6bb1; --svc-3: #4f7aa3; --svc-4: #a4607f;
}
/* Colores que se calculan a partir del tema: se recalculan en cada elemento con tema propio */
:root, [data-theme] {
  --tint: color-mix(in srgb, var(--accent) 13%, var(--surface));
  --tint-strong: color-mix(in srgb, var(--accent) 24%, var(--surface));
  --accent-text: color-mix(in srgb, var(--accent) 82%, #000);
  --primary-hover: color-mix(in srgb, var(--primary) 88%, #fff);
}
[data-theme="darklime"] { --primary-hover: #b6e34a; --tint: color-mix(in srgb, var(--accent) 12%, var(--surface)); --tint-strong: color-mix(in srgb, var(--accent) 18%, var(--raised)); --accent-text: var(--accent); }
[data-theme="lavender"] { --primary-hover: #3d2a53; --tint: color-mix(in srgb, #c8b5e0 45%, var(--surface)); --tint-strong: #c8b5e0; }
[data-theme] { color: var(--text); }

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-body); line-height: 1.5;
  color: var(--text); background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--fs-title); line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 650; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--tint-strong); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--control); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover, color-mix(in srgb, var(--primary) 88%, #fff)); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.ghost { border-color: transparent; background: transparent; padding: 0 10px; }
.btn.ghost:hover { background: var(--raised); }
.btn.danger { color: var(--negative); }
.btn.block { width: 100%; min-height: 52px; font-size: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.wa { color: var(--positive); }

/* ===== Píldoras de estado ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--raised); color: var(--muted);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.confirmado { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.pill.pendiente { background: var(--warn-bg); color: var(--warn-ink); }
.pill.cancelado, .pill.ausente { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
.pill.atendido { background: var(--raised); color: var(--muted); }

/* ===== Estructura del panel ===== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 24px 16px 16px; border-right: 1px solid var(--border); background: var(--ground);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; text-decoration: none; }
.mark {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); flex: none;
}
.mark svg { width: 22px; height: 22px; }
.brand .mark { display: grid; color: var(--primary-ink); margin: 0; font-size: inherit; }
.brand b { display: block; font-family: var(--brand-font); font-weight: 600; font-size: 21px; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.brand span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px;
  text-decoration: none; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--raised); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: inset 0 0 0 1px var(--border); }
.nav a[aria-current="page"] svg { color: var(--accent); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side .spacer { flex: 1; }
.public-card {
  position: relative; display: block; border-radius: 16px; overflow: hidden; text-decoration: none; color: #fff;
  aspect-ratio: 4 / 3;
}
.public-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.public-card:hover img { transform: scale(1.04); }
.public-card span {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; font-weight: 600; font-size: 14px;
  background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); /* scrim de lectura sobre la foto */
  display: flex; align-items: center; justify-content: space-between;
}

.main { min-width: 0; padding: 28px 32px 48px; }
.page { max-width: 1180px; margin: 0 auto; display: grid; gap: var(--gap); }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 8px; }
.title-row p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.title-row p strong { color: var(--text); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--pad); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head a, .link { color: var(--accent-text); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.card-head a:hover, .link:hover { text-decoration: underline; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.grid-even { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }

/* Cifras: un solo bloque dividido, sin íconos */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; }
.kpi { padding: 18px 22px; border-left: 1px solid var(--rule); }
.kpi:first-child { border-left: 0; }
.kpi .lab { font-size: 13px; color: var(--muted); }
.kpi .val { font-size: var(--fs-big); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.kpi .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kpi .val.warn { color: var(--warn-ink); }
.up { color: var(--positive); font-weight: 600; }
.down { color: var(--negative); font-weight: 600; }

/* Lista de turnos */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto 40px; align-items: center; gap: 14px;
  padding: 10px 0; border-top: 1px solid var(--rule);
}
.row:first-child { border-top: 0; padding-top: 0; }
.row .time { font-weight: 650; font-size: 16px; padding-left: 10px; border-left: 3px solid var(--c, var(--accent)); line-height: 1.2; }
.row .who { min-width: 0; }
.row .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who span { font-size: 13px; color: var(--muted); }
.row .amt { font-weight: 600; text-align: right; }
.row.clickable { cursor: pointer; border-radius: 10px; }
.row.clickable:hover .who b { text-decoration: underline; text-underline-offset: 3px; }
.row.past { opacity: .55; }
.empty { border: 1px dashed var(--control); border-radius: 12px; padding: 14px 16px; color: var(--muted); font-size: 14px; }

/* Gráfico de barras por semana */
.chart { display: grid; gap: 10px; margin-top: 18px; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; align-items: end; height: 170px; padding-top: 24px; position: relative; }
.bar-area { position: relative; height: 100%; width: 100%; display: flex; align-items: flex-end; }
.bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; border-radius: 8px 8px 3px 3px; background: var(--tint-strong); min-height: 3px; transform-origin: bottom; animation: grow .6s cubic-bezier(.2,.7,.2,1) both; }
.bar.now i { background: var(--accent); }
.bar em { position: absolute; left: 0; right: 0; font-style: normal; font-size: 12px; font-weight: 600; text-align: center; color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.bar.now em { color: var(--text); }
.bar-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; font-size: 12px; color: var(--muted); text-align: center; }
@keyframes grow { from { transform: scaleY(0); } }

.big-money { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.delta { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Barras de desglose */
.split { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.split li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.split .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.split .track i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transform-origin: left; animation: growx .7s cubic-bezier(.2,.7,.2,1) both; }
.split li:not(:first-child) .track i { background: var(--tint-strong); }
@keyframes growx { from { transform: scaleX(0); } }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 0 0 10px; }
.t td { padding: 12px 0; border-top: 1px solid var(--rule); }
.t .r { text-align: right; }

/* ===== Agenda ===== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--raised); }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.datenav { display: flex; align-items: center; gap: 4px; }
.datenav strong { min-width: 190px; text-align: center; font-weight: 650; }

.cal { position: relative; display: grid; grid-template-columns: 56px 1fr; }
.cal.week { grid-template-columns: 56px repeat(var(--days), minmax(118px, 1fr)); }
.cal-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; padding: 10px 0 4px; }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; right: 10px; font-size: 12px; color: var(--muted); transform: translateY(-50%); }
.cal-col { position: relative; border-left: 1px solid var(--rule); }
.cal-col.closed { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--rule) 8px 9px); }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); }
.cal-line.half { border-top-style: dashed; opacity: .6; }
.cal-head { display: contents; }
.cal-head div { position: sticky; top: 0; padding: 0 8px 10px; font-size: 13px; color: var(--muted); text-align: center; background: var(--surface); z-index: 2; }
.cal-head div b { display: block; font-size: 18px; color: var(--text); font-weight: 650; }
.cal-head div.today b { color: var(--accent-text); }
.cal-head div.today b span { display: inline-grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; background: var(--tint); }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--negative); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--negative); }
.ev {
  position: absolute; left: 4px; right: 4px; border-radius: 10px; padding: 4px 9px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 0; border-left: 3px solid var(--c);
  text-align: left; font-size: 13px; line-height: 1.25; color: var(--text); cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.ev:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.10); z-index: 4; }
.ev b { font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { color: var(--muted); white-space: nowrap; }
.ev.pendiente { background: var(--surface); border: 1.5px dashed var(--c); border-left: 3px solid var(--c); }
.ev.cancelado, .ev.ausente { opacity: .5; text-decoration: line-through; }
.ev.atendido { opacity: .62; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); border-left: 3px solid var(--c); }
.legend i.dash { background: var(--surface); border: 1.5px dashed var(--muted); }

/* ===== Servicios ===== */
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--rule); }
.svc:first-child { border-top: 0; padding-top: 0; }
.svc .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.svc b { font-weight: 600; }
.svc .meta { color: var(--muted); font-size: 14px; }
.svc.off b, .svc.off .meta, .svc.off .price { opacity: .45; }
.svc .price { font-weight: 650; font-size: 16px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--control); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: grid; grid-template-columns: 52px 44px 1fr; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); min-height: 56px; }
.hours li:first-child { border-top: 0; }
.hours .range { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.hours select { height: 36px; }

/* ===== Formularios ===== */
.field { display: grid; gap: 6px; }
.field label, .field .lab { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--control); border-radius: 12px;
  background: var(--surface); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23666' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; width: auto; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help { font-size: 13px; color: var(--muted); }

/* ===== Mensajes ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--control); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--accent-text); }
.chip:hover { background: var(--tint); border-color: transparent; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -4px 0 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.phone {
  border-radius: 28px; overflow: hidden; background: #e9e1d6; border: 1px solid var(--border);
  max-width: 380px; width: 100%; justify-self: center;
}
.phone-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #1f5c4a; color: #fff; }
.phone-top .mark { width: 34px; height: 34px; background: #fff; color: #1f5c4a; }
.phone-top .mark svg { width: 18px; height: 18px; }
.phone-top b { display: block; font-size: 15px; }
.phone-top span { font-size: 12px; opacity: .8; }
.chat { padding: 18px 14px 26px; display: grid; gap: 8px; min-height: 280px; align-content: start;
  background-color: #ece5dd; }
.msg { max-width: 86%; padding: 8px 10px 6px; border-radius: 10px; font-size: 14.5px; line-height: 1.4; background: #fff; color: #111; word-wrap: break-word; white-space: pre-wrap; }
.msg.out { justify-self: end; background: #d9fdd3; border-top-right-radius: 2px; }
.msg.in { border-top-left-radius: 2px; }
.msg small { display: block; text-align: right; font-size: 11px; color: #667; margin-top: 2px; }
.msg a { color: #0b6bcb; }
.day-pill { justify-self: center; background: #fff; color: #555; font-size: 12px; padding: 4px 10px; border-radius: 8px; }

/* ===== Apariencia ===== */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme {
  border: 1px solid var(--border); border-radius: 16px; padding: 14px; background: var(--surface); text-align: left; display: grid; gap: 10px;
}
.theme[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.theme .sw { display: flex; gap: 6px; }
.theme .sw i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.theme b { font-weight: 650; }
.theme span { font-size: 13px; color: var(--muted); }
.colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.color { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.color[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.color-input { width: 36px; height: 36px; padding: 0; border: 1px dashed var(--control); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.color-input::-webkit-color-swatch-wrapper { padding: 4px; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* ===== Hoja (detalle de turno, formularios) ===== */
dialog#sheet {
  border: 0; padding: 0; border-radius: 22px; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-float, 0 24px 60px rgba(0,0,0,.22));
}
dialog#sheet::backdrop { background: rgba(20, 20, 18, .42); }
dialog#sheet[open] { animation: pop .22s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet-body { padding: 22px 22px 20px; display: grid; gap: 18px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 20px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 15px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.sheet-actions { display: grid; gap: 8px; }
.sheet-actions .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--primary); color: var(--primary-ink); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Móvil: barra inferior, encabezado con foto ===== */
.topbar, .tabbar { display: none; }
.hero-photo { display: none; }

/* ===== Página pública de reserva ===== */
.pub { min-height: 100vh; background: var(--ground); }
.pub-cover { position: relative; height: 260px; overflow: hidden; background: #2a2a26; }
.pub-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; filter: brightness(.62); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.06) translateY(-6px); } }
.pub-cover .who { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; padding-bottom: 36px; }
.pub-cover .who .mark { width: 54px; height: 54px; margin: 0 auto 12px; background: rgba(255,255,255,.92); color: var(--primary); }
.pub-cover .who b { font-family: var(--brand-font); font-weight: 600; font-size: 40px; letter-spacing: .03em; line-height: 1; text-transform: uppercase; }
.pub-cover .who .rubro { display: block; margin-top: 8px; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; opacity: .92; }
.pub-demo { position: absolute; top: 14px; left: 14px; z-index: 2; color: #fff; background: rgba(0,0,0,.38); border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; font-weight: 600; text-decoration: none; }
.pub-demo:hover { background: rgba(0,0,0,.55); }
.pub-sheet { position: relative; margin: -40px auto 0; max-width: 560px; background: var(--surface); border-radius: 28px 28px 0 0; padding: 26px 20px 120px; min-height: 60vh; }
.pub-sheet h1 { font-size: 26px; }
.pub-sheet > p { color: var(--muted); margin-top: 4px; }
.pub-sec { margin-top: 26px; }
.pub-sec h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; }
.opt label {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); cursor: pointer; transition: background .15s, border-color .15s;
}
.opt label:hover { background: var(--ground); }
.opt label b { display: block; font-weight: 600; font-size: 16px; }
.opt label span { font-size: 14px; color: var(--muted); }
.opt label strong { font-size: 16px; font-weight: 650; }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--control); display: grid; place-items: center; }
.opt input:checked + label { background: var(--tint); border-color: var(--accent); }
.opt input:checked + label .radio { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 64px; height: 70px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-content: center; text-align: center; gap: 2px; scroll-snap-align: start; transition: background .15s;
}
.day small { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.day b { font-size: 19px; font-weight: 650; }
.day:hover { background: var(--ground); }
.day[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.day[aria-pressed="true"] small { color: inherit; opacity: .8; }
.day[disabled] { opacity: .4; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot { height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 15px; transition: background .15s; }
.slot:hover:not([disabled]) { background: var(--ground); }
.slot[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.slot[disabled] { color: var(--faint); background: var(--raised); border-color: transparent; text-decoration: line-through; cursor: not-allowed; }
.pub-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 96%, transparent); border-top: 1px solid var(--border); z-index: 5; }
.pub-bar .inner { max-width: 528px; margin: 0 auto; display: grid; gap: 6px; }
.pub-bar .sum { font-size: 13px; color: var(--muted); text-align: center; min-height: 18px; }
.pub-foot { margin-top: 36px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.done { text-align: center; display: grid; gap: 14px; justify-items: center; padding-top: 10px; }
.done .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); color: var(--accent-text); display: grid; place-items: center; }
.done .ok svg { width: 30px; height: 30px; stroke-width: 2.2; }
.ticket { width: 100%; border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; text-align: left; }

/* ===== Piezas de la versión 2: recursos, clientes, pagos ===== */
.stack { display: grid; gap: var(--gap); }
.todo { padding: 6px var(--pad); }
.todo ul { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.todo li:first-child { border-top: 0; }
.todo li strong { font-weight: 650; }
.toolbar-l { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.res-name { display: inline-flex !important; align-items: center; gap: 8px; font-size: 15px !important; }
.res-name i { width: 10px; height: 10px; border-radius: 50%; }
.cal-closed { position: absolute; top: 40%; left: 0; right: 0; text-align: center; }
.ev.bloqueo { background: repeating-linear-gradient(135deg, var(--raised) 0 6px, var(--surface) 6px 12px); border-left-color: var(--faint); color: var(--muted); }
.ev.bloqueo b { font-weight: 500; }

.pay-box { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.pay-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pay-head span { color: var(--muted); }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.pay-list li { display: flex; justify-content: space-between; gap: 12px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; height: 34px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--muted); }
.seg-opt input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); }

.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip.sm { height: 28px; font-size: 12.5px; padding: 0 10px; }
.chip.sm[aria-pressed="false"] { color: var(--muted); }
.cli-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; }
.cli-head, .cli { display: grid; grid-template-columns: minmax(0, 1.6fr) 70px 110px 130px 120px 60px 24px; gap: 14px; align-items: center; }
.cli-head { font-size: 13px; color: var(--muted); padding: 0 8px 8px; border-bottom: 1px solid var(--rule); }
.cli-head span:last-child { grid-column: 6; }
.cli { padding: 10px 8px; border-top: 1px solid var(--rule); border-radius: 10px; cursor: pointer; }
.cli-list .cli:first-child { border-top: 0; }
.cli:hover { background: var(--ground); }
.cli .who b { display: block; font-weight: 600; }
.cli .who > span { font-size: 13px; color: var(--muted); }
.cli .r, .cli-head .r { text-align: right; }
.cli-chev { color: var(--faint); }
.cli-mob { display: none; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: 14px; }
.mini-kpis div { padding: 10px 12px; border-left: 1px solid var(--rule); display: grid; }
.mini-kpis div:first-child { border-left: 0; }
.mini-kpis span { font-size: 12px; color: var(--muted); }
.mini-kpis b { font-size: 18px; font-weight: 650; }
.hist { margin-top: 8px; }
.hist .row { padding: 8px 0; }

.rec { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rule); }
.rec:first-child { border-top: 0; padding-top: 0; }
.rec.off .rec-main, .rec.off .avatar { opacity: .45; }
.rec-main { display: grid; gap: 8px; min-width: 0; }
.rec-main b { font-weight: 650; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, #000); flex: none; }
.avatar.any { background: var(--raised); color: var(--muted); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting b { font-weight: 600; font-size: 15px; }
.slug { display: flex; align-items: center; gap: 6px; }
.slug .input { flex: 1; }
.t-name { display: inline-flex; align-items: center; gap: 8px; }
.t-name .dot { width: 10px; height: 10px; border-radius: 3px; }
.t-bar { height: 6px; border-radius: 3px; background: var(--raised); margin-top: 8px; max-width: 220px; }
.t-bar div { height: 100%; border-radius: 3px; opacity: .8; }

.pick-rec { display: flex; gap: 10px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.rec-opt { flex: none; display: grid; justify-items: center; gap: 8px; width: 104px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; text-align: center; }
.rec-opt .avatar { width: 48px; height: 48px; font-size: 18px; }
.rec-opt:hover { background: var(--ground); }
.rec-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.more-fields summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 14px; padding: 4px 0; }
.policy { margin-top: 16px; font-size: 13px; color: var(--muted); padding: 12px 14px; background: var(--ground); border-radius: 12px; }

/* ===== Fotos del negocio (versión 3) ===== */
.mark.has-img { background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mark-letter { font-family: var(--brand-font); font-weight: 600; font-size: 20px; line-height: 1; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xs { width: 26px; height: 26px; font-size: 12px; }
.avatar-btn { border: 0; padding: 0; background: none; border-radius: 50%; position: relative; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 2px var(--accent); }
.svc-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.svc:has(.svc-thumb) { grid-template-columns: 40px minmax(0, 1fr) auto auto auto; }

.upload { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.upload-prev { display: grid; place-items: center; overflow: hidden; background: var(--raised); color: var(--muted); flex: none; }
.upload-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-prev svg { width: 24px; height: 24px; }
.upload.circle .upload-prev { width: 76px; height: 76px; border-radius: 50%; }
.upload.square .upload-prev { width: 76px; height: 76px; border-radius: 14px; }
.upload.wide { grid-template-columns: 1fr; }
.upload.wide .upload-prev { width: 100%; aspect-ratio: 16 / 7; border-radius: 14px; }
.upload-txt { display: grid; gap: 4px; }
.upload-txt b { font-weight: 600; font-size: 15px; }
.upload-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.upload-btns label { cursor: pointer; }
.upload input[type=file]:focus-visible + * , .upload label:focus-within { outline: 2px solid var(--accent); }
.upload.loading .upload-prev { opacity: .5; }
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.brand-grid .form { align-content: start; }

.who-desc { margin: 12px auto 0; max-width: 34ch; font-size: 14.5px; line-height: 1.45; opacity: .95; text-wrap: balance; }
.pub-cover { height: 310px; }
.opt label.with-img { grid-template-columns: 56px minmax(0, 1fr) auto 24px; }
.opt-img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.rec-opt small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.rec-opt { width: 116px; }
.pub-foot .link svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

.gal { grid-column: 1 / -1; display: grid; gap: 6px; }
.gal-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gal-item { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; width: 56px; height: 56px; overflow: hidden; transition: border-color .15s, transform .1s; }
.gal-item.wide { width: 88px; height: 56px; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
.gal-item:hover { transform: translateY(-1px); }
.gal-item[aria-pressed="true"] { border-color: var(--accent); }
.avatar svg { width: 100%; height: 100%; color: color-mix(in srgb, var(--c) 85%, #000); }
.avatar.any svg { width: 22px; height: 22px; color: var(--muted); }
.pub-foot .credits { font-size: 12px; }
.pub-foot .credits a { color: inherit; }
.firma { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 6px 2px; font-size: 11.5px; color: var(--muted); }
.firma img { height: 20px; width: auto; display: block; }
.firma a { color: inherit; }
.page > .firma { justify-content: center; flex-direction: column; padding: 8px 0 0; }
.pub-marca { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; text-decoration: none; color: var(--muted); font-size: 13px; }
.pub-marca img { height: 22px; width: auto; }
/* Cobro al reservar */
.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.choice:hover { background: var(--ground); }
.choice b { display: block; font-weight: 600; font-size: 15px; }
.choice span span { font-size: 13px; color: var(--muted); }
.choice-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--control); flex: none; display: grid; place-items: center; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.choice[aria-pressed="true"] .choice-dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
.sena-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sena-in { width: 150px; }
.pay-wait { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; }
.pay-wait b { font-weight: 650; }
.pay-wait .btn { margin-top: 4px; }
.pay-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--tint); font-size: 14px; }
.pay-note svg { color: var(--accent-text); margin-top: 2px; }
.steps { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 12px; text-align: left; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li > span { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; }
.steps li div { display: grid; gap: 8px; padding-top: 4px; }
/* Medios de pago */
.pay-method { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: grid; gap: 12px; }
.pay-method.on { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.pm-title { display: flex; gap: 12px; align-items: center; }
.pm-title svg { width: 22px; height: 22px; color: var(--accent-text); }
.pay-opts { display: grid; gap: 10px; }
.pay-opt { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: var(--surface); }
.pay-opt-h b { display: block; font-weight: 650; }
.pay-opt-h span { font-size: 13px; color: var(--muted); }
.transf { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; font-size: 15px; }
.transf dt { color: var(--muted); font-size: 12px; margin-top: 8px; }
.transf dt:first-child { margin-top: 0; }
.transf dd { margin: 2px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 650; min-width: 0; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.transf dd:last-child { border-bottom: 0; padding-bottom: 0; }
.transf dd span { min-width: 0; overflow-wrap: anywhere; }
.transf .btn { flex: none; }
.sena-opt { width: 100%; text-align: left; }
.sena-opt .pay-opts { margin-top: 10px; }
.demo-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; padding: 10px 12px; border-radius: 12px; background: var(--raised); margin-bottom: 8px; }

/* ===== Animación de entrada de bloques ===== */
.enter .page > *, .enter .pub-sheet { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
.enter .page > *:nth-child(2) { animation-delay: .05s; }
.enter .page > *:nth-child(3) { animation-delay: .1s; }
.enter .page > *:nth-child(4) { animation-delay: .15s; }
.enter .page > *:nth-child(5) { animation-delay: .2s; }
.bar i, .split .track i { animation-play-state: running; }
#app:not(.enter) .bar i, #app:not(.enter) .split .track i { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Tablet y celular ===== */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 10;
    margin: 0 -16px 16px; padding: 10px 16px; background: var(--ground); border-bottom: 1px solid var(--border);
  }
  .topbar .brand { padding: 0; }
  .topbar .mark { width: 36px; height: 36px; }
  .topbar .mark svg { width: 19px; height: 19px; }
  .topbar .brand b { font-size: 18px; }
  .topbar .brand span { margin-top: 2px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--muted); border-radius: 14px; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--text); font-weight: 650; }
  .tabbar a[aria-current="page"] svg { color: var(--accent); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 2px; width: 44px; height: 30px; border-radius: 15px; background: var(--tint); z-index: -1; }
  .tabbar .count { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--negative); color: var(--on-negative, #fff); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
  .hero-photo { display: block; position: relative; margin: 0 -16px 0; height: 150px; overflow: hidden; }
  .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; filter: brightness(.6); }
  .hero-photo + .page { margin-top: -28px; position: relative; }
  .hero-photo + .page .title-row { background: var(--ground); border-radius: 24px 24px 0 0; margin: 0 -16px; padding: 20px 16px 4px; }
  :root { --fs-title: 22px; --fs-big: 26px; --pad: 16px; --gap: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 14px 16px; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .grid-even { grid-template-columns: 1fr; }
  .title-row { align-items: stretch; flex-direction: column; }
  .title-row .actions .btn { flex: 1; }
  .row { grid-template-columns: 58px minmax(0, 1fr) auto 40px; gap: 10px; }
  .row .amt { display: none; }
  .datenav strong { min-width: 0; flex: 1; font-size: 15px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .datenav { justify-content: space-between; }
  .seg { align-self: flex-start; }
  .svc { grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 10px; }
  .svc .meta-col { display: none; }
  .themes { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr; gap: 20px; }
  .cli-head { display: none; }
  .cli { grid-template-columns: minmax(0, 1fr) 24px; }
  .cli-d { display: none; }
  .cli-mob { display: inline; }
  .todo li { flex-wrap: wrap; }
  .rec { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .rec .icon-btn { grid-column: 3; grid-row: 1; }
  .rec .switch { grid-column: 3; grid-row: 2; justify-self: center; }
  .mini-kpis { grid-template-columns: 1fr 1fr; }
  .mini-kpis div:nth-child(3) { border-left: 0; }
  .mini-kpis div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .toolbar-l .seg { overflow-x: auto; max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  dialog#sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 88vh; }
  dialog#sheet[open] { animation: up .26s cubic-bezier(.2,.8,.2,1); }
  .sheet-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .big-money { font-size: 30px; }
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 901px) {
  .more-only { display: none; }
}

/* ===== Ajustes para el tema oscuro ===== */
[data-theme="darklime"] { --on-negative: #222522; }
[data-theme="darklime"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23a9b0a5' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
[data-theme="darklime"] .seg button[aria-pressed="true"], [data-theme="darklime"] .seg-opt input:checked + span { background: var(--control); }
[data-theme="darklime"] .ev:hover { box-shadow: 0 4px 14px rgba(0,0,0,.4); }
[data-theme="darklime"] .ev.pendiente { background: var(--raised); }
[data-theme="darklime"] .demo-note { background: var(--raised); }
[data-theme="darklime"] dialog#sheet::backdrop { background: rgba(0, 0, 0, .6); }

/* ===== Selector de temas con vista previa ===== */
.themes4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.themes4 .theme { padding: 10px; gap: 8px; cursor: pointer; transition: border-color .15s, transform .15s; }
.themes4 .theme:hover { transform: translateY(-2px); }
.theme-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px; }
.theme-name em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--accent-text); background: var(--tint); padding: 2px 8px; border-radius: 999px; }
.theme-desc { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.themes4 .sw { padding: 0 4px; }
.themes4 .sw i { width: 18px; height: 18px; }
.mini { background: var(--ground); color: var(--text); border-radius: 12px; padding: 10px; display: grid; gap: 8px; border: 1px solid var(--border); text-align: left; font-family: var(--font); }
.mini-top { display: flex; align-items: center; gap: 6px; }
.mini-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--primary); flex: none; }
.mini-line { height: 6px; width: 50%; border-radius: 3px; background: var(--border); }
.mini-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; display: grid; gap: 4px; }
.mini-card small { font-size: 10px; color: var(--muted); }
.mini-card b { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.mini-bars i { flex: 1; border-radius: 3px 3px 1px 1px; background: var(--tint-strong); }
.mini-bars i.now { background: var(--accent); }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mini-row .pill { height: 18px; font-size: 9.5px; padding: 0 6px; }
.mini-btn { display: inline-block; background: var(--primary); color: var(--primary-ink); font-size: 10.5px; font-weight: 700; padding: 5px 9px; border-radius: 999px; }
.mini-btn.wide { text-align: center; display: block; padding: 7px; }
.mini-cover { height: 34px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; }
.mini-cover .mini-mark { background: var(--surface); }
.mini-opt { display: flex; justify-content: space-between; font-size: 10.5px; padding: 5px 6px; border-radius: 6px; border: 1px solid var(--border); }
.mini-opt b { font-size: 10.5px; }
.mini-opt.on { background: var(--tint); border-color: var(--accent); }
.try-bar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--text); color: var(--ground); box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 14px; }
.try-bar b { font-weight: 700; }
.try-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.try-bar .btn { min-height: 32px; border-color: transparent; }
.try-bar .btn.ghost { color: var(--ground); }
.try-bar .btn.ghost:hover { background: rgba(255,255,255,.12); }
.try-bar .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pub > .try-bar { position: fixed; top: 10px; left: 10px; right: 10px; z-index: 30; }
@media (max-width: 1100px) { .themes4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .try-bar { top: 66px; } }
/* En los temas nuevos, las etiquetas marcadas son suaves: el color fuerte queda para la acción principal */
[data-theme="darklime"] .chip[aria-pressed="true"], [data-theme="lavender"] .chip[aria-pressed="true"] { background: var(--tint-strong); border-color: transparent; color: var(--text); }
[data-theme="darklime"] .chip[aria-pressed="false"], [data-theme="lavender"] .chip[aria-pressed="false"] { color: var(--muted); }

/* ===== Menú lateral oscuro (en todos los temas) ===== */
:root, [data-theme="natural"] {
  --side-bg: #151a16; --side-text: #f1efe8; --side-muted: #a7ada4; --side-hover: rgba(255,255,255,.06);
  --side-active-bg: #2b6e3d; --side-active-ink: #ffffff; --side-icon: #f1efe8; --side-count-bg: rgba(255,255,255,.14);
  --chip-bg: var(--warn-bg); --chip-ink: var(--warn-ink);
}
[data-theme="urbana"] { --side-bg: #221c17; --side-text: #f4efe6; --side-muted: #b3a999; --side-active-bg: #9c7141; --side-active-ink: #fff; --side-icon: #f4efe6; --chip-bg: var(--warn-bg); --chip-ink: var(--warn-ink); }
[data-theme="darklime"] { --side-bg: #1b1e1b; --side-text: #f5efdf; --side-muted: #a9b0a5; --side-active-bg: #c8f45b; --side-active-ink: #222522; --side-icon: #c8f45b; --side-count-bg: rgba(200,244,91,.16); --chip-bg: #c8f45b; --chip-ink: #222522; }
[data-theme="lavender"] { --side-bg: #3b2a55; --side-text: #f3edf9; --side-muted: #c9bcdb; --side-active-bg: #8a70b0; --side-active-ink: #ffffff; --side-icon: #f3edf9; --side-count-bg: rgba(255,255,255,.16); --chip-bg: #dccdee; --chip-ink: #493362; }
[data-theme="lila"] { --side-bg: #241f35; --side-text: #f2f0f8; --side-muted: #b8b4c8; --side-active-bg: #6a56b4; --side-active-ink: #fff; --side-icon: #f2f0f8; }

.side { background: var(--side-bg); border-right: 0; color: var(--side-text); }
.side .brand b { color: var(--side-text); }
.side .brand > span > span { color: var(--side-muted); }
.side .brand .mark { background: rgba(255,255,255,.1); color: var(--side-icon); }
.side .brand .mark.has-img { background: #fff; }
.side .nav a { color: var(--side-muted); font-size: 15.5px; height: 44px; }
.side .nav a svg { color: var(--side-muted); }
.side .nav a:hover { background: var(--side-hover); color: var(--side-text); }
.side .nav a:hover svg { color: var(--side-text); }
.side .nav a[aria-current="page"] { background: var(--side-active-bg); color: var(--side-active-ink); box-shadow: none; font-weight: 650; }
.side .nav a[aria-current="page"] svg { color: var(--side-active-ink); }
.side .nav .count { background: var(--side-count-bg); color: var(--side-text); }
.side .demo-note { background: rgba(255,255,255,.06); color: var(--side-muted); }
.side .firma { color: var(--side-muted); }
.side :focus-visible { outline-color: var(--side-active-bg); }

/* ===== Inicio ===== */
svg.tiny { width: 15px; height: 15px; vertical-align: -2px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 6px; }
.head-row h1 { font-size: 32px; letter-spacing: -0.02em; }
.head-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); flex-wrap: wrap; }
.head-line strong { color: var(--text); font-weight: 650; }
.head-line .sep { display: inline-block; width: 1px; height: 16px; background: var(--control); margin: 0 10px; vertical-align: middle; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.round-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background-color .15s; }
.round-btn:hover { background: var(--raised); }
.round-btn:active { transform: scale(.95); }
.round-btn svg { width: 20px; height: 20px; }
.round-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.avatar-neg { overflow: hidden; padding: 0; }
.avatar-neg img { width: 100%; height: 100%; object-fit: cover; }
.btn.big { min-height: 48px; padding: 0 22px; font-size: 16px; }

.kpi-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kcard { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); min-height: 128px; overflow: hidden; }
.kcard.lead { background: var(--tint); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.k-ico { color: var(--accent-text); padding-top: 2px; }
.k-ico svg { width: 26px; height: 26px; }
.k-ico.warn { color: var(--warn-ink); }
[data-theme="darklime"] .k-ico.warn { color: var(--accent); }
.k-body { display: grid; gap: 2px; min-width: 0; }
.k-lab { font-size: 14px; color: var(--muted); }
.k-val { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.k-sub { font-size: 13.5px; color: var(--muted); }
.k-sub b { font-weight: 700; }
.k-chip { justify-self: start; margin-top: 4px; border: 0; border-radius: 999px; padding: 4px 12px; font-size: 13.5px; font-weight: 650; background: var(--chip-bg); color: var(--chip-ink); cursor: pointer; transition: transform .12s, filter .15s; }
.k-chip:hover { filter: brightness(.96); }
.k-chip:active { transform: scale(.96); }
.kcard { container-type: inline-size; }
.spark { align-self: end; width: 84px; height: 34px; margin-bottom: 4px; }
@container (max-width: 330px) { .spark { display: none; } }

.alert-strip { display: flex; align-items: stretch; gap: 0; padding: 8px 10px 8px 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); }
.alert-strip .strip-ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--tint); color: var(--accent-text); align-self: center; margin-right: 10px; }
.alert-item { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; text-align: left; padding: 10px 14px; font-size: 14px; color: var(--text); border-left: 1px solid var(--rule); cursor: pointer; border-radius: 10px; transition: background-color .15s; }
.alert-item:first-of-type { border-left: 0; }
.alert-item:hover { background: var(--raised); }
.alert-item strong { font-weight: 700; }
.alert-item svg { flex: none; color: var(--muted); }

.h-ico { display: flex; align-items: center; gap: 10px; }
.h-ico svg { width: 22px; height: 22px; color: var(--accent-text); }
.card-head h2.h-ico { font-size: 18px; }
.rows-ini .row { grid-template-columns: 70px 42px minmax(0, 1fr) auto auto 40px; padding: 12px 0; }
.ini { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--text)); }
.rows-ini .time { font-size: 17px; }
.pill-ico { gap: 4px; }
.pill-ico::before { display: none; }
.pill-ico svg { width: 13px; height: 13px; stroke-width: 2.4; }
.duo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gap); }
.top1 { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; margin-bottom: 10px; }
.top1 b { font-weight: 700; }
.track.big { display: block; height: 12px; border-radius: 6px; background: var(--raised); overflow: hidden; }
.track.big i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.ring-card { display: grid; place-items: center; text-align: center; gap: 6px; }
.ring { position: relative; width: 128px; height: 128px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--raised); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2,.7,.2,1); }
.ring > span { position: absolute; inset: 0; display: grid; place-content: center; }
.ring b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.ring small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ring-note { font-size: 12.5px; max-width: 22ch; }

@media (max-width: 1240px) {
  .kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alert-strip { flex-direction: column; padding: 8px; }
  .alert-strip .strip-ico { display: none; }
  .alert-item { border-left: 0; border-top: 1px solid var(--rule); }
  .alert-item:first-of-type { border-top: 0; }
}
@media (max-width: 900px) {
  .head-row h1 { font-size: 24px; }
  .head-actions { width: 100%; }
  .head-actions .round-btn[data-act="buscar"], .head-actions .avatar-neg { display: none; }
  .head-actions .btn.big { flex: 1; }
  .head-line .sep { display: none; }
  .hero-photo + .page .head-row { background: var(--ground); border-radius: 24px 24px 0 0; margin: 0 -16px; padding: 20px 16px 4px; }
  .kcard { padding: 14px; min-height: 0; gap: 10px; grid-template-columns: 1fr; }
  .k-ico svg { width: 22px; height: 22px; }
  .k-val { font-size: 26px; }
  .spark { display: none; }
  .rows-ini .row { grid-template-columns: 56px 34px minmax(0, 1fr) auto 40px; gap: 10px; }
  .ini { width: 34px; height: 34px; font-size: 12px; }
  .duo { grid-template-columns: 1fr 1fr; }
  .ring { width: 104px; height: 104px; }
}

/* ===== Tema Premium: carbón y grises, sin color fuerte; los estados conservan su color ===== */
[data-theme="premium"] {
  color-scheme: dark;
  --ground: #1e201f; --raised: #262928; --surface: #2b2e2d;
  --border: #3a3d3b; --rule: #343735; --control: #4d514e;
  --text: #f2f0ea; --muted: #a9aca6; --faint: #9a9d97;
  --accent: #d8d3c7; --accent-ink: #1e201f;
  --primary: #ebe7de; --primary-ink: #1e201f; --primary-hover: #d8d3c7;
  --positive: #9be0a8; --pill-ok-bg: #263a2b; --pill-ok-ink: #a9e8b4;
  --warn-bg: #3e3522; --warn-ink: #f2c66d;
  --negative: #ff8a7e; --pill-bad-bg: #442b28; --pill-bad-ink: #ffa79d; --on-negative: #1e201f;
  --svc-1: #d8d3c7; --svc-2: #e3b866; --svc-3: #9fc3a5; --svc-4: #d99a9a;
  --shadow-float: 0 24px 60px rgba(0, 0, 0, .5);
  --side-bg: #171918; --side-text: #f2f0ea; --side-muted: #a9aca6; --side-active-bg: #3a3d3b; --side-active-ink: #f2f0ea;
  --side-icon: #d8d3c7; --side-count-bg: rgba(255,255,255,.12); --chip-bg: #3a3d3b; --chip-ink: #f2f0ea;
}
[data-theme="premium"] { --primary-hover: #d8d3c7; --tint: color-mix(in srgb, var(--accent) 9%, var(--surface)); --tint-strong: color-mix(in srgb, var(--accent) 22%, var(--raised)); --accent-text: var(--accent); }
[data-theme="premium"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23a9aca6' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
[data-theme="premium"] .seg button[aria-pressed="true"], [data-theme="premium"] .seg-opt input:checked + span { background: var(--control); }
[data-theme="premium"] .ev.pendiente { background: var(--raised); }
[data-theme="premium"] dialog#sheet::backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="premium"] .chip[aria-pressed="true"] { background: var(--tint-strong); border-color: transparent; color: var(--text); }
[data-theme="premium"] .k-ico.warn { color: var(--warn-ink); }

/* ===== Menú lateral claro (opción) ===== */
.menu-claro .side { --side-bg: var(--surface); --side-text: var(--text); --side-muted: var(--muted); --side-hover: var(--raised);
  --side-active-bg: var(--tint-strong); --side-active-ink: var(--text); --side-icon: var(--accent-text); --side-count-bg: var(--tint-strong);
  border-right: 1px solid var(--border); }
.menu-claro .side .brand .mark { background: var(--primary); color: var(--primary-ink); }
.menu-claro .side .demo-note { background: var(--raised); }

/* ===== Inicio en el celular ===== */
.m-head, .m-tiles, .m-ing { display: none; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .topbar { display: grid; grid-template-columns: 44px 1fr 44px; }
  .topbar .brand { justify-self: center; flex-direction: column; gap: 4px; text-align: center; }
  .topbar .brand .mark { width: 30px; height: 30px; }
  .topbar .brand b { font-size: 19px; }
  .topbar .brand > span > span { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; }
  .topbar .round-btn { width: 40px; height: 40px; border: 0; background: transparent; }
  .d-head, .kpi-cards, .cobro-card, .head-actions .round-btn { display: none !important; }
  .m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
  .m-head h1 { font-size: 24px; }
  .m-head p { color: var(--muted); margin-top: 2px; }
  .date-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text); }
  .date-chip svg { width: 15px; height: 15px; }
  .head-row { gap: 14px; }
  .m-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .m-tile { display: grid; gap: 2px; padding: 10px 10px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); }
  .m-tile svg { width: 20px; height: 20px; margin-bottom: 4px; }
  .m-tile b { font-size: 22px; font-weight: 700; line-height: 1.1; }
  .m-tile span { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
  .m-tile.t1 { background: var(--tint); } .m-tile.t1 svg { color: var(--accent-text); }
  .m-tile.t2 { background: color-mix(in srgb, var(--pill-ok-bg) 70%, var(--surface)); } .m-tile.t2 svg { color: var(--positive); }
  .m-tile.t3 { background: color-mix(in srgb, var(--warn-bg) 80%, var(--surface)); } .m-tile.t3 svg { color: var(--warn-ink); }
  .m-tile.t4 { background: color-mix(in srgb, var(--pill-bad-bg) 70%, var(--surface)); } .m-tile.t4 svg { color: var(--negative); }
  .m-ing { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
  .m-ing .m-ing-h { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
  .m-ing .m-ing-h svg { width: 18px; height: 18px; color: var(--accent-text); }
  .m-ing b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
  .m-ing .m-delta { display: grid; justify-items: end; gap: 6px; grid-row: span 2; }
  .m-ing .m-delta small { font-size: 11.5px; color: var(--muted); }
  .delta-pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
  .delta-pill.neg { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
  .m-ing .spark { display: block; width: 90px; height: 30px; }
}
.m-tile { text-align: left; cursor: pointer; font: inherit; }
.menu-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 900px) {
  .card-head h2.h-ico { font-size: 16px; gap: 8px; }
  .card-head h2.h-ico svg { width: 18px; height: 18px; }
  .card-head a { white-space: nowrap; }
  .rows-ini .row .pill { font-size: 11px; padding: 0 8px; }
}
@media (max-width: 900px) {
  .rows-ini .row { grid-template-columns: 50px 32px minmax(0, 1fr) auto; gap: 8px; }
  .rows-ini .row .wa { display: none; }
  .rows-ini .time { font-size: 15px; padding-left: 8px; }
  .rows-ini .ini { width: 32px; height: 32px; font-size: 11.5px; }
}
@media (max-width: 560px) { .duo { grid-template-columns: 1fr; } .ring-card { grid-template-columns: auto 1fr; text-align: left; justify-items: start; } }

/* ===== Página de reservas por pasos ===== */
.pub2 { min-height: 100vh; background: var(--ground); }
.pub-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 72px; padding: 0 clamp(16px, 3vw, 40px); background: var(--ground); border-bottom: 1px solid var(--border); }
.pub-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.pub-brand .mark { width: 40px; height: 40px; background: var(--primary); color: var(--primary-ink); }
.pub-brand .mark svg { width: 20px; height: 20px; }
.pub-brand b { display: block; font-family: var(--brand-font); font-weight: 600; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.pub-brand small { display: block; font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.pub-links { margin-left: auto; display: flex; gap: clamp(18px, 3vw, 40px); }
.pub-links a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.pub-links a:hover { color: var(--text); }
.pub-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.pub-back, .pub-menu { display: none; }
.pub-back[hidden] { visibility: hidden; display: grid; }

.pub-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; max-width: 1280px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px); align-items: start; }
.pub-hero { position: sticky; top: 100px; overflow: hidden; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); min-height: 560px; display: flex; }
.hero-img { position: absolute; right: -8%; bottom: -6%; width: 66%; height: 52%; object-fit: cover; border-radius: 40% 0 0 0; }
.hero-txt { position: relative; z-index: 1; padding: 44px 40px; display: flex; flex-direction: column; gap: 18px; max-width: 420px; }
.hero-txt h1 { font-size: clamp(40px, 4.4vw, 60px); font-weight: 800; line-height: .98; letter-spacing: -0.035em; }
.hero-txt > p { color: var(--muted); font-size: 16px; max-width: 30ch; }
.perks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; }
.perks li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.perks svg { width: 22px; height: 22px; color: var(--accent-text); flex: none; }
.hero-cta { display: none; }
.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); text-decoration: none; margin-top: auto; }
.powered img { height: 18px; width: auto; }
/* En los temas oscuros la foto va de fondo, con una capa para que se lea el texto */
[data-theme="darklime"] .hero-img, [data-theme="premium"] .hero-img { inset: 0; width: 100%; height: 100%; border-radius: 0; opacity: .42; }
[data-theme="darklime"] .pub-hero::after, [data-theme="premium"] .pub-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,22,20,.92) 0%, rgba(20,22,20,.55) 70%, rgba(20,22,20,.3) 100%); }

.pub-main { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 28px 32px 32px; min-height: 560px; display: flex; flex-direction: column; }
.stepper { list-style: none; margin: 0 0 26px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 0; }
.stepper button { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: left; }
.stepper button:disabled { cursor: default; opacity: .7; }
.stepper button > span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--control); font-size: 12.5px; }
.stepper button svg { width: 14px; height: 14px; stroke-width: 2.6; }
.stepper li.on button { color: var(--text); }
.stepper li.on button > span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.stepper li.ok button > span { background: var(--tint-strong); border-color: transparent; color: var(--accent-text); }
.step-title { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 18px; }
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.svc-opt { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) 26px; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, transform .12s; }
.svc-opt:hover { border-color: var(--control); }
.svc-opt:active { transform: scale(.99); }
.svc-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.svc-opt img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.svc-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--raised); color: var(--accent-text); }
.svc-txt b { display: block; font-size: 16px; font-weight: 650; }
.svc-txt span { font-size: 14px; color: var(--muted); }
.svc-txt small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.svc-check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--control); display: grid; place-items: center; }
.svc-opt[aria-pressed="true"] .svc-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.svc-check svg { width: 15px; height: 15px; stroke-width: 2.6; }
.pick-rec.big { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pick-rec.big .rec-opt { width: auto; padding: 20px 10px; }
.step-foot { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.step-sum { color: var(--muted); font-size: 14px; margin-right: auto; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-nav b { font-size: 17px; font-weight: 700; }
.cal-nav .round-btn { width: 40px; height: 40px; }
.cal-nav .round-btn:disabled { opacity: .35; cursor: default; }
.days.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; overflow: visible; }
.days.week .day { width: auto; }
.slot-h { font-size: 15px; font-weight: 700; margin: 20px 0 10px; }
.resumen { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 18px; padding: 4px 18px; margin-bottom: 20px; }
.resumen > div { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rule); }
.resumen > div:first-child { border-top: 0; }
.resumen svg { width: 22px; height: 22px; color: var(--accent-text); }
.resumen b { display: block; font-weight: 650; }
.resumen small { font-size: 13px; color: var(--muted); }
.resumen .link { background: none; border: 0; cursor: pointer; font-size: 13px; }
.total { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 16px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 17px; }
.total b { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.pub-main .done { padding-top: 0; }
.pub-main .done h2 { font-size: 26px; }

.pub-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1280px; margin: 20px auto 0; padding: 0 clamp(16px, 3vw, 40px); }
.pub-info section { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px 24px; scroll-margin-top: 90px; }
.pub-info h2 { font-size: 18px; margin-bottom: 12px; }
.info-list, .team, .info-contact { list-style: none; margin: 0; padding: 0; display: grid; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.info-list li:first-child { border-top: 0; }
.info-list small { display: block; color: var(--muted); font-size: 12.5px; }
.team { gap: 12px; }
.team li { display: flex; align-items: center; gap: 12px; }
.team small { display: block; color: var(--muted); font-size: 13px; }
.info-contact { gap: 12px; }
.info-contact li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.info-contact svg { width: 20px; height: 20px; color: var(--accent-text); flex: none; }
.info-contact a { color: var(--text); }
.pub-foot2 { max-width: 1280px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 13px; color: var(--muted); }
.pub-foot2 .powered { margin-top: 0; }
.pub-foot2 a { color: var(--muted); }
.pub-info.en-hoja { display: grid; grid-template-columns: 1fr; padding: 0; margin: 0; gap: 12px; }
.pub-info.en-hoja section { padding: 16px; }
.pub2 > .try-bar { position: fixed; top: 80px; left: 10px; right: 10px; z-index: 30; }

@media (max-width: 1100px) {
  .pub-info { grid-template-columns: 1fr 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pub-nav { display: grid; grid-template-columns: 44px 1fr 44px; height: 70px; gap: 8px; border-bottom: 0; }
  .pub-links { display: none; }
  .pub-back, .pub-menu { display: grid; width: 42px; height: 42px; border: 0; background: transparent; }
  .pub-brand { justify-self: center; flex-direction: column; gap: 4px; text-align: center; }
  .pub-brand .mark { width: 30px; height: 30px; background: transparent; color: var(--text); }
  .pub-brand b { font-size: 19px; }
  .pub-brand small { font-size: 9px; }
  .pub-wrap { display: block; padding: 0; }
  .pub2:not(.en-bienvenida) .pub-hero, .en-bienvenida .pub-main, .pub-info { display: none; }
  .en-bienvenida .pub-foot2 { display: none; }
  .pub-hero { position: relative; top: 0; border-radius: 0; border: 0; min-height: calc(100svh - 70px); background: var(--ground); }
  .hero-txt { padding: 28px 24px 32px; max-width: none; width: 100%; }
  .hero-txt h1 { font-size: 46px; }
  .hero-img { width: 60%; height: 44%; right: -10%; bottom: 22%; }
  .hero-cta { display: inline-flex; margin-top: auto; min-height: 54px; font-size: 17px; }
  .powered { align-self: center; }
  .pub-main { border-radius: 0; border: 0; background: var(--ground); padding: 8px 16px calc(120px + env(safe-area-inset-bottom)); min-height: 0; }
  .stepper { display: none; }
  .step-title { font-size: 24px; }
  .svc-opt { padding: 14px; grid-template-columns: 48px minmax(0, 1fr) 24px; background: var(--surface); }
  .svc-opt img, .svc-ico { width: 48px; height: 48px; }
  .step-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); flex-direction: column; align-items: stretch; gap: 6px; }
  .step-foot .btn { width: 100%; min-height: 54px; }
  .step-sum { margin: 0; text-align: center; font-size: 13px; }
  .days.week { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .days.week .day { width: 58px; flex: none; }
  .total + .btn { position: sticky; bottom: 12px; }
  .pub2 > .try-bar { top: 76px; }
}
@media (max-width: 900px) { .pub-foot2 { display: none; } }
.pub-foot2.en-hoja { display: flex; padding: 8px 0 12px; }
.pub-hero { min-height: 660px; }
.hero-img { width: 58%; height: 40%; right: -6%; bottom: -4%; }
@media (max-width: 900px) { .pub-hero { min-height: calc(100svh - 70px); } .hero-img { width: 56%; height: 30%; right: -8%; bottom: 15%; } }

/* ===== Página pública v2: encabezado compacto, sin bienvenida ===== */
.pub-col { display: grid; gap: 16px; position: sticky; top: 96px; align-self: start; }
.pub-head { position: relative; overflow: hidden; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); }
.ph-cover { height: 150px; background: var(--primary); position: relative; overflow: hidden; }
.ph-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-head.tipografica .ph-cover { height: 96px; background: radial-gradient(circle at 85% 20%, var(--tint-strong) 0 28%, transparent 29%), var(--primary); }
.ph-body { position: relative; padding: 0 22px 22px; display: grid; gap: 6px; }
.ph-logo { width: 64px; height: 64px; margin-top: -32px; border: 4px solid var(--surface); background: var(--primary); color: var(--primary-ink); }
.ph-logo svg { width: 28px; height: 28px; }
.ph-name { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--muted); margin-top: 6px; }
.ph-name span { font-weight: 500; }
.ph-body h1 { font-size: clamp(28px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.ph-desc { color: var(--muted); font-size: 15px; }
.ph-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--raised); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; max-width: 100%; transition: background-color .15s; }
.chip-link:hover { background: var(--tint-strong); }
.chip-link svg { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.chip-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-sum { border-radius: 22px; background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; }
.side-sum h2 { font-size: 16px; margin-bottom: 10px; }
.side-sum dl { margin: 0; display: grid; gap: 10px; }
.side-sum dl > div { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.side-sum dt svg { width: 20px; height: 20px; color: var(--accent-text); }
.side-sum dd { margin: 0; }
.side-sum dd b { display: block; font-weight: 650; font-size: 14.5px; }
.side-sum dd small { color: var(--muted); font-size: 13px; }
.ss-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ss-total b { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; transition: color .2s; }
.ss-note { font-size: 13px; color: var(--muted); margin-top: 4px; }

.next-slot { display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 4px; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--tint); color: var(--text); text-align: left; cursor: pointer; font-size: 14.5px; transition: transform .12s, background-color .15s; }
.next-slot:hover { background: var(--tint-strong); }
.next-slot:active { transform: scale(.99); }
.next-slot svg { width: 20px; height: 20px; color: var(--accent-text); flex: none; }
.next-slot em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.repeat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border-radius: 18px; background: var(--tint); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.repeat small { display: block; font-size: 12.5px; font-weight: 700; color: var(--accent-text); }
.repeat b { display: block; font-weight: 650; }
.repeat span { font-size: 13px; color: var(--muted); }
.empty-day { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--raised); display: grid; gap: 10px; justify-items: start; }
.after-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.after-actions .btn { font-size: 13.5px; }
.tk-neg { font-weight: 700; margin-bottom: 8px; }
.remember { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.forget { background: none; border: 0; justify-self: start; font-size: 13px; cursor: pointer; padding: 0; }
.step-foot.final { padding-top: 4px; }
.done .ok.pop { animation: pop-ok .5s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes pop-ok { from { transform: scale(.4); opacity: 0; } }
.slot[aria-pressed="true"], .svc-opt[aria-pressed="true"] { animation: sel .25s ease-out; }
@keyframes sel { 50% { transform: scale(.97); } }
.pub-wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }

@media (max-width: 900px) {
  .pub-col { position: static; display: block; }
  .side-sum { display: none; }
  .pub2.en-paso .pub-head, .pub2.en-paso .pub-col { display: none; }
  .pub-head { border-radius: 0; border: 0; background: var(--ground); }
  .ph-cover { height: 120px; }
  .ph-body { padding: 0 16px 6px; }
  .ph-body h1 { font-size: 30px; }
  .pub-main { padding-top: 14px; }
  .after-actions { grid-template-columns: 1fr; }
  .repeat { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .done .ok.pop, .slot[aria-pressed="true"], .svc-opt[aria-pressed="true"] { animation: none; } }

/* ===== Mi página de reservas ===== */
.mp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.mp-config { display: grid; gap: var(--gap); }
.mp-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: 13px; margin-right: 10px; vertical-align: 1px; }
.mp-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-preview { position: sticky; top: 16px; display: grid; gap: 12px; }
.mp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mp-frame-wrap { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--border); background: var(--raised); }
.mp-frame-wrap iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.mp-ver { display: none; }
.mp-sheet iframe { width: 100%; height: 72vh; border: 0; border-radius: 16px; background: #fff; }
.advanced { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.card-head .link { background: none; border: 0; cursor: pointer; font-size: 13.5px; }
@media (max-width: 1100px) { .mp-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .mp-grid { grid-template-columns: 1fr; }
  .mp-preview { display: none; }
  .mp-ver { display: inline-flex; position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; min-height: 52px; }
}
.mp-frame-wrap { margin: 0 auto; max-width: 100%; }

/* ===== Arranque guiado ===== */
.onb { min-height: 100vh; min-height: 100dvh; background: var(--bg); padding: 0 16px 48px; }
.onb-top { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.onb-top .link { font-size: 14px; color: var(--muted); }
.onb-steps { max-width: 760px; margin: 0 auto 18px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; counter-reset: none; }
.onb-steps li { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.onb-steps li::before { content: ''; height: 4px; border-radius: 4px; background: var(--rule); }
.onb-steps li.ok::before, .onb-steps li.on::before { background: var(--primary); }
.onb-steps li span { display: none; }
.onb-steps li em { font-style: normal; }
.onb-steps li.on em { color: var(--text); font-weight: 600; }
.onb-card { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(20px, 4vw, 40px); display: grid; gap: 14px; }
.onb-card h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.onb-sub { margin: -6px 0 6px; color: var(--muted); font-size: 15.5px; max-width: 56ch; }
.onb-card .rubros { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-svcs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onb-svcs li { display: grid; grid-template-columns: minmax(0, 1fr) 104px 118px 40px; gap: 8px; align-items: center; }
.onb-svcs select, .onb-card .range select { min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; }
.onb-card .range { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.onb-person { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; margin-bottom: 8px; max-width: 420px; }
.onb-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--rule); }
.onb-nav .btn.primary[disabled] { opacity: .45; cursor: not-allowed; }
.onb-final { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 8px; }
.qr { display: grid; gap: 10px; justify-items: center; background: #fff; border-radius: 18px; padding: 14px; border: 1px solid var(--border); }
.qr svg { width: 190px; height: 190px; display: block; }
.qr .link { color: #222; font-size: 13.5px; background: none; border: 0; cursor: pointer; text-decoration: underline; }
.onb-acts { display: grid; gap: 10px; }
.onb-link { padding: 12px 14px; border-radius: 12px; background: var(--raised); font-size: 15px; overflow-wrap: anywhere; }
.onb-card > .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); color: var(--accent-text); display: grid; place-items: center; }
.onb-card > .ok svg { width: 30px; height: 30px; }
.onb-card > .ok.pop { animation: pop-ok .5s cubic-bezier(.34, 1.56, .64, 1) both; }
@media (max-width: 640px) {
  .onb { padding: 0 12px 32px; }
  .onb-steps li em { display: none; }
  .onb-steps li.on em { display: block; grid-column: 1 / -1; }
  .onb-steps { grid-template-columns: repeat(5, 1fr); }
  .onb-svcs li { grid-template-columns: minmax(0, 1fr) 40px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; }
  .onb-svcs li > input.input { grid-column: 1; }
  .onb-svcs li > select { grid-column: 1; grid-row: 2; }
  .onb-svcs li > .slug { grid-column: 1; grid-row: 3; }
  .onb-svcs li > .icon-btn { grid-column: 2; grid-row: 1; }
  .onb-final { grid-template-columns: 1fr; justify-items: stretch; }
  .qr { justify-self: center; }
  .onb-nav .btn.primary { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .onb-card > .ok.pop { animation: none; } }

/* ===== Lista "Para dejar tu página lista" ===== */
.checklist { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 18px; padding: 14px 16px 14px 20px; margin-bottom: var(--gap); }
.checklist > div { display: grid; gap: 2px; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.checklist a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 14.5px; text-decoration: none; min-height: 32px; }
.checklist a:hover { text-decoration: underline; }
.checklist a svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .checklist { grid-template-columns: minmax(0, 1fr) auto; } .checklist ul { grid-column: 1 / -1; grid-row: 2; flex-direction: column; } }
.public-card.sin-foto { background: var(--primary); color: var(--primary-ink); display: grid; align-content: start; padding: 16px; }
.public-card.sin-foto .pc-name { font-family: var(--display, inherit); font-size: 20px; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
.avatar-neg b { display: grid; place-items: center; width: 100%; height: 100%; background: var(--tint); color: var(--accent-text); font-size: 18px; }
.onb-top .pub-brand { display: flex; align-items: center; gap: 12px; flex-direction: row; text-align: left; }
.onb-card .field > .btn.sm { justify-self: start; }
.onb-sub[style*="center"] { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .onb-svcs li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
  .onb-svcs li > input.input { grid-column: 1 / 3; grid-row: 1; }
  .onb-svcs li > select { grid-column: 1; grid-row: 2; }
  .onb-svcs li > .slug { grid-column: 2 / 4; grid-row: 2; }
  .onb-svcs li > .icon-btn { grid-column: 3; grid-row: 1; }
}
.public-card.sin-foto span { background: none; color: inherit; }
.avatar-neg .ini { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; font-size: 16px; }
@media (max-width: 900px) { .solo-pc { display: none; } }

/* ===== Inicio v2: tarjetas suaves, como el diseño de Javier (todo con los colores del tema) ===== */
:root, [data-theme] {
  --card-line: color-mix(in srgb, var(--border) 60%, transparent);
  --card-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 10px 28px -14px rgb(0 0 0 / .16);
}
[data-theme="darklime"], [data-theme="premium"] { --card-shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 30px -16px rgb(0 0 0 / .6); }
.shell .main { background:
  radial-gradient(900px 520px at 88% -8%, color-mix(in srgb, var(--surface) 85%, transparent), transparent 70%),
  radial-gradient(700px 500px at 30% 110%, color-mix(in srgb, var(--tint) 45%, transparent), transparent 70%),
  var(--bg); }
.shell .card, .kcard, .alert-strip, .checklist { border-color: var(--card-line); box-shadow: var(--card-shadow); border-radius: 22px; }
.checklist { border-style: solid; margin: var(--gap) 0 0; }
.round-btn { border-color: transparent; box-shadow: var(--card-shadow); }
.head-sep { width: 1px; height: 30px; background: var(--rule); margin: 0 4px; }

/* Tarjetas de números */
.kcard { padding: 22px 22px 20px; min-height: 136px; grid-template-columns: auto minmax(0, 1fr); }
.kcard .spark { position: absolute; right: 18px; bottom: 22px; width: 92px; height: 38px; margin: 0; }
.kcard.lead { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 24%, var(--surface)) 0%, var(--tint) 70%); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
@media (min-width: 901px) { .k-val { font-size: 38px; } }
.k-ico svg { width: 28px; height: 28px; }
@container (max-width: 330px) { .kcard .spark { display: block; width: 70px; height: 30px; right: 14px; bottom: 18px; } }
@container (max-width: 190px) { .kcard .spark { display: none; } }

/* Franja de avisos */
.alert-strip { padding: 10px 12px 10px 18px; }
.alert-strip .strip-ico { width: 38px; height: 38px; border-radius: 50%; }
.alert-item { font-size: 14.5px; }

/* Próximos turnos */
@media (min-width: 901px) {
  .rows-ini .row { grid-template-columns: 74px 46px minmax(0, 1fr) auto auto 40px; padding: 13px 0; }
  .rows-ini .time { font-size: 18px; }
  .rows-ini .ini { width: 46px; height: 46px; font-size: 15px; }
}
.rows-ini .time { font-weight: 700; border-left-width: 4px; }
.rows-ini .who b { font-size: 16px; }
.rows-ini .amt { font-weight: 600; }
.rows-ini .pill { padding: 5px 12px; font-size: 13px; font-weight: 650; }
.rows-ini .wa svg { width: 24px; height: 24px; color: var(--accent-text); }

/* Cobrado en el mes: barras con degradé */
.cobro-card .bars { gap: 18px; height: 160px; }
.cobro-card .bar-labels { gap: 18px; }
.cobro-card .bar i { border-radius: 14px 14px 8px 8px; background: linear-gradient(to top, var(--tint-strong), color-mix(in srgb, var(--tint-strong) 45%, var(--surface))); }
.cobro-card .bar.now i { background: linear-gradient(to top, color-mix(in srgb, var(--accent) 80%, #000), var(--accent)); }
.cobro-card .bar em { font-size: 13px; color: var(--text); opacity: .8; }

/* Lo más pedido y anillo */
.track.big { height: 14px; border-radius: 8px; }
.track.big i { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 65%, var(--surface)), var(--accent)); }
.ring circle { stroke-width: 13; }

/* Menú lateral: activo con degradé suave */
.side .nav { gap: 4px; }
.side .nav a { height: 46px; border-radius: 14px; }
.side .nav a[aria-current="page"] { background: linear-gradient(90deg, var(--side-active-bg), color-mix(in srgb, var(--side-active-bg) 78%, var(--side-bg))); box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--side-active-bg) 80%, #000); }
.side .public-card { border-radius: 18px; box-shadow: 0 12px 28px -14px rgb(0 0 0 / .6); }

@media (max-width: 760px) {
  .head-sep { display: none; }
  .kcard .spark { display: none; }
}

/* Inicio a lo ancho de la pantalla, como en el diseño */
@media (min-width: 1300px) { .page:has(> .kpi-cards) { max-width: 1400px; } }
.kcard.lead { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 32%, var(--surface)) 0%, color-mix(in srgb, var(--accent) 12%, var(--surface)) 75%); }
.kcard .spark path { stroke-width: 2.6; }
.duo .card-head h2 { font-size: 16.5px; }
.ring-card .ring-note { display: none; }
.ring small { font-size: 11.5px; }
.kcard:has(.spark) .k-sub { padding-right: 92px; }
@container (max-width: 330px) { .kcard:has(.spark) .k-sub { padding-right: 70px; } }
@media (max-width: 900px) { .kcard:has(.spark) .k-sub { padding-right: 0; } }
@container (max-width: 300px) { .kcard .spark { width: 58px; height: 26px; right: 12px; } .kcard:has(.spark) .k-sub { padding-right: 58px; } }
@media (max-width: 900px) {
  .ring-card { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; gap: 18px; }
  .ring-card .ring-note { display: block; }
  .ring-card .ring { width: 104px; height: 104px; }
}

/* ===== Demo: ver como otro rubro ===== */
.demo-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--surface); border: 1px dashed var(--border); box-shadow: var(--card-shadow); }
.demo-bar .db-lab { font-size: 13px; font-weight: 650; color: var(--muted); }
.db-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.db-opt { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s, transform .12s; }
.db-opt:hover { background: var(--raised); }
.db-opt:active { transform: scale(.96); }
.db-opt[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pub2 ~ .demo-bar, body > .demo-bar { }
#app > .demo-bar { position: sticky; top: 0; z-index: 30; margin: 0; border-radius: 0; border-width: 0 0 1px; justify-content: center; }
@media (max-width: 760px) {
  .demo-bar { border-radius: 16px; padding: 10px 12px; gap: 8px; }
  .demo-bar .db-lab { width: 100%; }
  .db-opts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .db-opt { flex: none; }
  #app > .demo-bar { border-radius: 0; }
}
#app > .demo-bar { position: relative; padding: 8px 12px; }
@media (max-width: 760px) {
  #app > .demo-bar { flex-wrap: nowrap; }
  #app > .demo-bar .db-lab { width: auto; flex: none; font-size: 12px; }
  #app > .demo-bar .db-opt { min-height: 32px; padding: 0 12px; font-size: 13px; }
}
