/* Panel de PeluContesta. La misma identidad que la web (portal/static/css/site.css): papel crema de peluquería,
   tinta azul marino, el palo de barbero (rojo, blanco y azul) y las tijeras, que aquí marcan la hora actual en el
   libro de citas. Bricolage Grotesque para titulares, Lexend para el texto y Caveat para las notas a mano.
   Móvil primero; desde 960 px, menú lateral y paneles a la derecha. Todo en rem: en 2K y 4K crece como la web.
   Lo usan el subdominio de cada peluquería y pelucontesta.es/panel (con la pestaña «Cuenta» y los pasos de inicio). */
:root {
  --paper: #f6f1e7;
  --paper-2: #ede5d6;
  --paper-3: #e3d8c4;
  --card: #fffcf6;
  --white: #ffffff;
  --ink: #141a33;
  --ink-2: #3b4262;
  --steel: #5c6279;
  --line: #e0d6c4;
  --line-2: #d2c6b0;
  --rule: #e8dfcf;
  --red: #c8243a;
  --red-700: #a61b2f;
  --red-soft: #fbe2e2;
  --blue: #2443c4;
  --blue-700: #1b349e;
  --blue-soft: #e2e8fb;
  --ok: #12804f;
  --ok-soft: #dcf2e6;
  --warn: #8a5a00;
  --warn-soft: #fcefd0;
  --hl: #ffd84d;
  --wa: #157a45;
  --scrim: rgb(20 26 51 / .45);
  --r-sm: .625rem;
  --r-md: .875rem;
  --r-lg: 1.375rem;
  --r-xl: 2rem;
  --tap: 3.25rem;
  --side: 16.5rem;
  --shadow: 0 1px 0 rgb(20 26 51 / .04), 0 1.4rem 2.8rem -1.6rem rgb(20 26 51 / .35);
  --shadow-sm: 0 1px 0 rgb(20 26 51 / .04), 0 .6rem 1.4rem -1rem rgb(20 26 51 / .35);
  --shadow-lg: 0 2px 0 rgb(20 26 51 / .05), 0 2.5rem 5rem -2.5rem rgb(20 26 51 / .5);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --stripes: repeating-linear-gradient(135deg, var(--red) 0 .375rem, var(--white) .375rem .75rem, var(--blue) .75rem 1.125rem, var(--white) 1.125rem 1.5rem);
  --cut: repeating-linear-gradient(90deg, rgb(20 26 51 / .3) 0 .55rem, transparent .55rem .95rem);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  /* 16 px hasta ~1650 px de ancho; de ahí crece (como la web): ~17,5 px en 1920, ~21 px en 2560 */
  font-size: clamp(100%, .4375rem + .547vw, 137.5%);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
html, body { margin: 0; }
body {
  background-color: var(--paper);
  /* el mismo grano de papel que la web */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .1 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink); font: 400 1.0625rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden;
}
body.noscroll { overflow: hidden; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--blue); text-underline-offset: .18em; }
h1, h2, h3 { font-family: var(--display); font-weight: 780; font-stretch: 86%; margin: 0; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: .375rem; }
::selection { background: var(--hl); color: var(--ink); }
.i { width: 1.375rem; height: 1.375rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--steel); font-size: .9375rem; margin: .375rem 0; }
.lead { margin: .25rem 0 1rem; max-width: 36em; }
.error { color: var(--red); font-size: .9375rem; font-weight: 500; min-height: 1.2em; margin: .625rem 0 0; }
.hand { font-family: var(--hand); font-weight: 600; letter-spacing: 0; line-height: 1.1; }

/* la etiqueta de sección de la web: mayúsculas en rojo con una tira del palo de barbero */
.kicker {
  display: inline-flex; align-items: center; gap: .6rem; margin: .5rem 0 .5rem;
  font: 600 .78rem/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.kicker::before {
  content: ""; flex: none; width: 1.75rem; height: .5rem; border-radius: 99px;
  background: var(--stripes); box-shadow: inset 0 0 0 1px rgb(20 26 51 / .12);
}

input, textarea, select {
  font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--line-2);
  border-radius: .75rem; padding: .75rem .875rem; width: 100%; min-height: var(--tap); outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder, textarea::placeholder { color: #8c8a92; }
input:hover, textarea:hover, select:hover { border-color: #b9ab92; }
textarea { min-height: 0; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgb(36 67 196 / .16); }
input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgb(200 36 58 / .12); }
input:disabled { background: var(--paper-2); color: var(--steel); border-color: var(--line); }
input[type="time"], input[type="date"] { min-width: 0; }
label { display: block; font-size: .9375rem; font-weight: 600; color: var(--ink); margin: .875rem 0 0; }
label > input, label > textarea, label > select { margin-top: .375rem; }
label small { color: var(--steel); font-weight: 400; }

/* ---------- el palo de barbero: gira mientras el asistente contesta ---------- */
.pole {
  --h: 2.5rem; --w: .875rem; display: inline-block; position: relative; flex: none;
  width: var(--w); height: var(--h); border-radius: 99px; overflow: hidden; background: var(--white);
  box-shadow: inset 0 0 0 1.5px rgb(20 26 51 / .18);
}
.pole > i {
  position: absolute; left: 0; right: 0; top: -2.12rem; bottom: 0;
  background: repeating-linear-gradient(135deg, var(--red) 0 .375rem, var(--white) .375rem .75rem, var(--blue) .75rem 1.125rem, var(--white) 1.125rem 1.5rem);
}
.pole::after { /* el cristal: brillo y sombra como el de la web */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgb(20 26 51 / .28), transparent 32%, rgb(255 255 255 / .45) 50%, transparent 68%, rgb(20 26 51 / .3));
}
.pole.on > i { animation: pole 1.6s linear infinite; }
.pole.off > i { filter: grayscale(1) opacity(.45); }
@keyframes pole { to { transform: translateY(2.12rem); } }
.pole-sm { --h: 1.5rem; --w: .5625rem; }
.pole-lg { --h: 4.5rem; --w: 1.375rem; }
.pole-bot { --h: 4rem; --w: 1.25rem; }

/* la marca de la web: palo pequeño + «PeluContesta» */
.wordmark { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; min-width: 0; }
.wordmark-mark {
  position: relative; display: inline-block; overflow: hidden; flex: none;
  width: .8rem; height: 1.6rem; border-radius: 99px; background: var(--white);
  box-shadow: inset 0 0 0 1.5px rgb(20 26 51 / .18);
}
.wordmark-mark > i {
  position: absolute; left: 0; right: 0; top: -100%; height: 300%;
  background: repeating-linear-gradient(135deg, var(--red) 0 3px, var(--white) 3px 6px, var(--blue) 6px 9px, var(--white) 9px 12px);
}
.wordmark-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgb(20 26 51 / .28), transparent 32%, rgb(255 255 255 / .45) 50%, transparent 68%, rgb(20 26 51 / .3));
}
.wordmark-name { font-family: var(--display); font-weight: 800; font-stretch: 84%; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1; }
.wordmark-name span { color: var(--red); }

/* ---------- botones (los de la web) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap);
  padding: 0 1.25rem; border-radius: var(--r-md); border: 2px solid rgb(20 26 51 / .16); background: var(--card);
  color: var(--ink); font: 600 1rem/1.2 var(--body); text-decoration: none; text-align: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary {
  background: var(--red); border-color: var(--red); color: var(--white);
  box-shadow: 0 .7rem 1.4rem -.8rem rgb(200 36 58 / .8), inset 0 -2px 0 rgb(0 0 0 / .14);
}
.btn.primary:hover { background: var(--red-700); border-color: var(--red-700); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: rgb(20 26 51 / .05); }
.btn.danger-outline { color: var(--red); border-color: rgb(200 36 58 / .35); background: transparent; }
.btn.danger-outline:hover { border-color: var(--red); background: var(--red-soft); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: var(--white); }
.btn.wa:hover { background: #0f6136; border-color: #0f6136; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 3.625rem; font-size: 1.0625rem; border-radius: 1rem; }
.btn.small { min-height: 2.75rem; padding: 0 .875rem; font-size: .9375rem; border-radius: .7rem; }
.btn .i { width: 1.25rem; height: 1.25rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%; flex: none;
  border: 2px solid rgb(20 26 51 / .14); background: var(--card); transition: border-color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn.small { width: 2.75rem; height: 2.75rem; border: 0; background: transparent; color: var(--steel); }
.icon-btn.small .i { width: 1.125rem; height: 1.125rem; }
.link {
  background: none; border: 0; padding: .625rem .125rem; color: var(--blue); font-weight: 600; font-size: .9375rem;
  text-decoration: underline; text-underline-offset: 3px; min-height: 2.75rem;
}
.btn-col { display: grid; gap: .625rem; margin-top: .875rem; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; margin-top: .625rem; }

/* ---------- entrar (solo en el subdominio: administrador e instalaciones sin portal) ---------- */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem 1rem;
  background:
    radial-gradient(60rem 30rem at 50% -10%, rgb(255 255 255 / .7), transparent 70%),
    repeating-linear-gradient(135deg, rgb(200 36 58 / .06) 0 1.1rem, transparent 1.1rem 2.25rem, rgb(36 67 196 / .06) 2.25rem 3.4rem, transparent 3.4rem 4.5rem);
}
.login-card {
  width: 100%; max-width: 25rem; background: var(--card); border-radius: var(--r-xl); padding: 2rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.login-card h1 { font-size: 2.4rem; margin: 1.5rem 0 .125rem; letter-spacing: -.03em; }
.login-card .btn { margin-top: 1.125rem; }

/* ---------- estructura ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: calc(.625rem + env(safe-area-inset-top)) 1rem .625rem;
  background: rgb(246 241 231 / .86); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--cut); }
.brand { display: flex; align-items: center; gap: .625rem; font-family: var(--display); font-weight: 780; font-stretch: 86%; font-size: 1.2rem; letter-spacing: -.015em; min-width: 0; }
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.5rem; padding: 0 .875rem; border-radius: 99px;
  border: 1.5px solid var(--line-2); background: var(--card); font-size: .875rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 .4rem 1rem -.7rem rgb(20 26 51 / .35);
}
.dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--steel); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.bad { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

main { padding: .5rem 1rem calc(7rem + env(safe-area-inset-bottom)); max-width: 48rem; margin: 0 auto; }
.view { animation: viewIn .3s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(.375rem); } }
.page-title { font-size: 2.25rem; font-weight: 800; font-stretch: 82%; letter-spacing: -.03em; line-height: 1; margin: .125rem 0 .5rem; }
.section-title { font-size: 1.3rem; font-weight: 760; letter-spacing: -.015em; margin: 1.75rem 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.75rem 0 .5rem; }
.section-head .section-title { margin: 0; }
.count {
  display: inline-grid; place-items: center; min-width: 1.625rem; height: 1.625rem; padding: 0 .45rem; border-radius: 99px;
  background: var(--red); color: var(--white); font: 700 .875rem/1 var(--body);
}
.sub-title { font-size: 1.0625rem; margin: 1.5rem 0 .375rem; }
.stack { display: grid; gap: .75rem; }
.stack.tight { gap: .5rem; margin-top: .75rem; }
.empty {
  padding: 1.625rem 1.125rem; text-align: center; color: var(--steel); border: 1.5px dashed var(--line-2); border-radius: var(--r-md);
  font: 600 1.4rem/1.2 var(--hand); list-style: none; background: rgb(255 252 246 / .5);
}
.empty.small { padding: 1rem; font-size: 1.25rem; }

/* avisos del portal (pago pendiente, baja programada) encima de cada pantalla */
.portal-notice { margin-top: .75rem; }
.portal-notice .banner { margin-top: 0; }

/* ---------- barra de pestañas (móvil) / menú lateral (ordenador) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgb(255 252 246 / .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding: .375rem .375rem calc(.375rem + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 0 var(--line), 0 -.75rem 1.5rem -1.25rem rgb(20 26 51 / .3);
}
.tabbar button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  min-height: 3.5rem; border: 0; background: none; color: var(--steel); font-size: .8125rem; font-weight: 600; border-radius: var(--r-md);
  transition: color .2s var(--ease);
}
.tabbar button .i { width: 1.5rem; height: 1.5rem; }
.tabbar button.active { color: var(--ink); }
/* la pestaña activa lleva una tira del palo de barbero */
.tabbar button::before {
  content: ""; position: absolute; top: 0; width: 1.75rem; height: .3rem; border-radius: 99px; background: var(--stripes);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.tabbar button.active::before { transform: scaleX(1); }
.tabbar .side-brand { display: none; }
.badge {
  position: absolute; top: .25rem; left: calc(50% + .375rem); min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 99px;
  background: var(--red); color: var(--white); font: 700 .75rem/1.25rem var(--body); font-style: normal; text-align: center;
}

/* ---------- HOY ---------- */
.hoy-grid { display: grid; grid-template-areas: "head" "side" "main"; }
.hoy-head { grid-area: head; padding-top: .5rem; }
.hoy-side { grid-area: side; }
.hoy-main { grid-area: main; }

.bot-card {
  display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1rem 1rem 1rem 1.125rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.bot-card > div { flex: 1; min-width: 0; }
.bot-card b { display: block; font: 780 1.2rem/1.15 var(--display); font-stretch: 86%; letter-spacing: -.015em; }
.bot-card span:not(.pole) { display: block; color: var(--steel); font-size: .9375rem; margin-top: .125rem; }
.bot-card.off { background: rgb(255 252 246 / .5); border: 1.5px dashed var(--line-2); box-shadow: none; }
.bot-card .btn { flex: none; }

.banner {
  display: flex; gap: .75rem; align-items: flex-start; width: 100%; text-align: left; margin-top: 1rem; padding: 1rem;
  border-radius: var(--r-lg); border: 1px solid #f1b8bf; border-left: 4px solid var(--red); background: var(--red-soft); color: var(--ink);
  font: inherit; text-decoration: none;
}
.banner.warn { border-color: #ecd49a; border-left-color: var(--warn); background: var(--warn-soft); }
.banner .i { color: var(--red); margin-top: .125rem; }
.banner.warn .i { color: var(--warn); }
.banner b { display: block; font-size: 1.0625rem; }
.banner span { display: block; font-size: .9375rem; color: var(--ink-2); margin-top: .125rem; }

/* primeros pasos: hasta que se vincula WhatsApp */
.setup {
  margin-top: 1rem; padding: 1.125rem 1.125rem 1rem; border-radius: var(--r-lg); background: var(--card);
  border: 2px dashed rgb(20 26 51 / .28); box-shadow: var(--shadow-sm);
}
.setup .kicker { margin-top: 0; }
.setup-steps { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .25rem; }
.setup-steps li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .75rem; align-items: center; padding: .625rem 0; border-top: 1px solid var(--rule); }
.setup-steps li:first-child { border-top: 0; }
.setup-n {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--paper);
  font: 800 1rem/1 var(--display);
}
.setup-txt b { display: block; font-size: 1rem; }
.setup-txt span { display: block; color: var(--steel); font-size: .875rem; }
.setup-help { margin: .5rem 0 0; color: var(--red); font-size: 1.35rem; text-align: right; transform: rotate(-1.5deg); }

/* avisos de Hoy: borde de color según lo urgente que sea */
.alert {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: var(--r-md);
  padding: 1rem; box-shadow: var(--shadow-sm);
}
.alert.urgent { border-left-color: var(--red); }
.alert-title { font-weight: 700; font-size: 1.0625rem; margin: 0; }
.alert .muted { margin-top: .25rem; }
.quote {
  margin: .625rem 0 0; padding: .625rem .75rem; background: var(--paper); border-radius: var(--r-sm); font-size: 1rem;
  color: var(--ink-2); overflow-wrap: anywhere; border-left: 3px solid var(--line-2);
}

/* el libro de citas: una fila por cita y renglones finos, como la libreta de la peluquería */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger > li { border-bottom: 1px solid var(--rule); }
.ledger > li.empty { border: 1.5px dashed var(--line-2); margin-top: .75rem; }
.appt {
  display: grid; grid-template-columns: 4.75rem 1fr auto; align-items: center; gap: .75rem; width: 100%; min-height: 4.5rem;
  padding: .75rem .375rem; background: none; border: 0; text-align: left; border-radius: var(--r-sm);
  transition: background-color .15s var(--ease);
}
.appt:hover { background: var(--card); }
.appt .time { font: 800 1.6rem/1 var(--display); font-stretch: 78%; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.appt .main { display: flex; flex-direction: column; min-width: 0; }
.appt .title { font-weight: 600; font-size: 1.0625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt .sub { color: var(--steel); font-size: .9375rem; }  /* sin cortar: la hora final tiene que verse entera */
.appt .chev { color: var(--steel); }
.appt.done { opacity: .5; }
.src-bot {
  display: inline-block; margin-left: .375rem; padding: .05rem .5rem; border-radius: 99px; background: var(--blue-soft); color: var(--blue);
  font-size: .75rem; font-weight: 600; vertical-align: .125rem;
}
.gap { padding: .5rem .375rem .5rem 5.875rem; color: var(--ok); font-size: .875rem; font-weight: 600; }
/* la hora actual: una línea de corte en rojo con sus tijeras */
.now-line {
  position: relative; display: flex; align-items: center; gap: .5rem; padding: .375rem 0; border-bottom: 0 !important;
  color: var(--red); font-weight: 700; font-size: .875rem;
}
.now-line .i { width: 1.125rem; height: 1.125rem; transform: rotate(-90deg); }
.now-line::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--red) 0 .55rem, transparent .55rem .95rem); }
.now-line b { display: inline-block; min-width: 4.25rem; font-variant-numeric: tabular-nums; }

/* ---------- AGENDA ---------- */
.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: .625rem; margin: .25rem 0 .875rem; }
.day-title { flex: 1; text-align: center; min-width: 0; }
.day-title h1 { font-size: 1.6rem; font-weight: 800; font-stretch: 82%; letter-spacing: -.025em; line-height: 1.1; }
.day-title .link { padding: .25rem; min-height: 2.25rem; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .375rem; margin-bottom: .875rem; }
.week button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .125rem; padding: .5rem 0 .625rem;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); font-size: .8125rem; color: var(--steel);
  font-weight: 600; min-height: 4.5rem; transition: border-color .15s var(--ease);
}
.week button:hover { border-color: var(--ink); }
.week button b { font: 800 1.35rem/1.05 var(--display); font-stretch: 80%; color: var(--ink); }
.week button i { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--blue); min-height: 1em; }
.week button.today b { color: var(--red); }
.week button.sel { border-color: var(--ink); background: var(--ink); color: rgb(246 241 231 / .75); }
.week button.sel b { color: var(--paper); }
.week button.sel i { color: var(--hl); }
.week button.closed { background: transparent; border: 1.5px dashed var(--line-2); }
.week button.closed b { color: var(--steel); }
.fab {
  position: fixed; right: 1rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 25; display: inline-flex;
  align-items: center; gap: .5rem; min-height: 3.5rem; padding: 0 1.375rem; border: 0; border-radius: 99px;
  background: var(--red); color: var(--white); font-weight: 600; font-size: 1rem;
  box-shadow: 0 1rem 1.8rem -.9rem rgb(200 36 58 / .9), inset 0 -2px 0 rgb(0 0 0 / .14);
}
.fab:hover { background: var(--red-700); }

/* ---------- MENSAJES ---------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .375rem; margin-bottom: .5rem; scrollbar-width: none; }
.chip {
  flex: none; min-height: 2.75rem; padding: 0 1rem; border-radius: 99px; border: 1.5px solid var(--line-2); background: var(--card);
  font-weight: 600; font-size: .9375rem; color: var(--ink-2);
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.list { border-top: 1px solid var(--rule); }
.conv {
  display: grid; grid-template-columns: 3rem 1fr auto; gap: .75rem; align-items: center; width: 100%; padding: .75rem .375rem;
  border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; min-height: 4.5rem;
  transition: background-color .15s var(--ease);
}
.conv:hover { background: var(--card); }
.avatar {
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2);
  color: var(--ink); font: 800 1.2rem/1 var(--display); box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.conv .main { display: flex; flex-direction: column; min-width: 0; }
.conv .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .sub { color: var(--steel); font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .side { display: flex; flex-direction: column; align-items: flex-end; gap: .375rem; }
.conv .side small { color: var(--steel); font-size: .8125rem; white-space: nowrap; }
.tag { padding: .125rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.tag.cliente { background: var(--ok-soft); color: var(--ok); }
.tag.personal { background: var(--paper-2); color: var(--ink-2); }
.tag.revisar { background: var(--warn-soft); color: var(--warn); }

/* la conversación, sobre el fondo de chat con dibujitos de peluquería de la web */
.bubbles {
  display: flex; flex-direction: column; gap: .5rem; max-height: 46dvh; overflow-y: auto; padding: .875rem .75rem; margin: .875rem 0;
  border-radius: var(--r-lg); background-color: #efe7dc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120' fill='none' stroke='%23141a33' stroke-opacity='.07' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='14' cy='18' r='5'/%3E%3Ccircle cx='14' cy='34' r='5'/%3E%3Cpath d='M18 21l20 9M18 31l20-9'/%3E%3Cpath d='M70 12h30M74 12v10M80 12v10M86 12v10M92 12v10M98 12v10'/%3E%3Cpath d='M60 70c6-10 14-10 20 0s14 10 20 0'/%3E%3Cpath d='M20 82l4 8 9 1-7 6 2 9-8-5-8 5 2-9-7-6 9-1z'/%3E%3Cpath d='M96 96a8 8 0 1 0 0 .1M96 88v-6'/%3E%3C/svg%3E");
}
.bubble {
  max-width: 84%; padding: .5625rem .75rem .4375rem; border-radius: 1rem; font-size: 1rem; line-height: 1.4; white-space: pre-wrap;
  overflow-wrap: anywhere; background: var(--white); align-self: flex-start; border-bottom-left-radius: .25rem;
  box-shadow: 0 1px 1px rgb(20 26 51 / .08);
}
.bubble small { display: block; margin-top: .2rem; font-size: .75rem; color: var(--steel); text-align: right; }
.bubble.bot, .bubble.manual { align-self: flex-end; background: #d9f7c7; border-radius: 1rem; border-bottom-right-radius: .25rem; }
.bubble.manual { background: var(--ink); color: var(--paper); }
.bubble.manual small { color: rgb(246 241 231 / .7); }
.bubble.note {
  align-self: center; max-width: 100%; background: var(--card); color: var(--ok); font-size: .875rem; font-weight: 600;
  border-radius: 99px; padding: .3rem .75rem; box-shadow: none; border: 1px solid var(--line);
}
.bubble .i { width: .95rem; height: .95rem; vertical-align: -.125rem; margin-right: .25rem; }
.question { font-weight: 700; margin: .375rem 0 0; }

/* ---------- AJUSTES (y la pestaña Cuenta, que usa las mismas tarjetas) ---------- */
.settings { display: grid; gap: .625rem; margin-top: .875rem; }
.acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: box-shadow .2s var(--ease); }
.acc[open] { box-shadow: var(--shadow); }
.acc summary {
  display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; min-height: 4.25rem; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; margin-left: auto; width: .625rem; height: .625rem; border-right: 2px solid var(--steel); border-bottom: 2px solid var(--steel);
  transform: rotate(45deg); transition: transform .2s var(--ease); flex: none;
}
.acc[open] summary::after { transform: rotate(-135deg); }
.acc summary > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.acc summary small { font-weight: 400; color: var(--steel); font-size: .875rem; }
.ico {
  width: 2.625rem; height: 2.625rem; border-radius: .75rem; display: grid; place-items: center; flex: none;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.acc[open] .ico { background: var(--ink); color: var(--paper); box-shadow: none; }
.acc-body { padding: 0 1rem 1.125rem; }
.acc-body > .btn, .acc-body > form > .btn { margin-top: .875rem; }
.grid2 { display: grid; gap: 0 .75rem; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: .875rem; padding: .75rem 0; margin: .25rem 0 0; color: var(--ink); }
.toggle span { display: flex; flex-direction: column; font-size: 1rem; }
.toggle small { font-weight: 400; color: var(--steel); font-size: .875rem; }
.toggle.compact { padding: .375rem 0; margin: 0; }
.switch {
  appearance: none; -webkit-appearance: none; width: 3.5rem; height: 2rem; min-height: 0; border-radius: 99px; background: var(--line-2);
  position: relative; border: 0; padding: 0; flex: none; cursor: pointer; transition: background-color .2s var(--ease); margin: 0;
}
.switch::after {
  content: ""; position: absolute; top: .1875rem; left: .1875rem; width: 1.625rem; height: 1.625rem; border-radius: 50%; background: var(--white);
  box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease);
}
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(1.5rem); }
.switch:focus { box-shadow: none; }
.switch:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.day-row { padding: .625rem 0; border-bottom: 1px solid var(--rule); }
.day-row:last-child { border-bottom: 0; }
.day-row .toggle span { font-weight: 700; }
.ranges { display: grid; gap: .5rem; margin-top: .25rem; }
.range { display: flex; align-items: center; gap: .5rem; }
.range span { color: var(--steel); font-size: .9375rem; }
.closed-txt { margin: 0; }

.svc { padding: .25rem 0 .875rem; border-bottom: 1px solid var(--rule); }
.svc.off { opacity: .6; }
.svc [data-del-svc] { margin-top: .625rem; }
.svc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.closure, .person {
  display: flex; align-items: center; justify-content: space-between; gap: .625rem; padding: .5rem .25rem .5rem .875rem; min-height: 3.25rem;
  background: var(--paper); border-radius: var(--r-sm); font-size: 1rem; border: 1px solid var(--rule);
}
.person span { display: flex; flex-direction: column; min-width: 0; }
.person small { color: var(--steel); font-size: .8125rem; }
/* la lista de contactos puede ser larga: se desplaza dentro de la sección */
.people-list { max-height: min(60vh, 32rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .25rem; }
.suggest { padding: .875rem; background: var(--warn-soft); border-radius: var(--r-md); margin: .625rem 0; }
.suggest p { margin: 0 0 .625rem; }
.usage-figs { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; margin: .375rem 0; }
.usage-figs div { background: var(--paper); border-radius: var(--r-sm); padding: .75rem; }
.usage-figs b { display: block; font: 800 1.5rem/1.1 var(--display); font-stretch: 82%; }
.usage-figs span { color: var(--steel); font-size: .875rem; }
.meter { height: .625rem; border-radius: 99px; background: var(--paper-2); overflow: hidden; margin: .625rem 0 .25rem; }
.meter i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 99px; }
.meter i.warn { background: var(--warn); }
.meter i.bad { background: var(--red); }

.status-line { display: flex; align-items: center; gap: .625rem; font-size: 1rem; }
.steps { padding-left: 1.375rem; margin: .5rem 0; }
.steps li { margin: .375rem 0; }
.qr { display: grid; place-items: center; background: var(--white); border-radius: var(--r-md); padding: .875rem; margin: .75rem 0; border: 1px solid var(--line); }
.qr img { width: 100%; max-width: 17.5rem; image-rendering: pixelated; }
.qr img.stale { opacity: .25; transition: opacity .2s; }
.code {
  font: 800 2.1rem/1 var(--display); font-stretch: 82%; letter-spacing: .12em; text-align: center; padding: 1.125rem; margin: .875rem 0;
  background: var(--card); color: var(--ink); border-radius: var(--r-md); border: 2px dashed rgb(20 26 51 / .3);
}

.savebar {
  position: fixed; left: .75rem; right: .75rem; bottom: calc(5.25rem + env(safe-area-inset-bottom)); z-index: 26;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .625rem .625rem .625rem 1.125rem;
  background: var(--ink); color: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  font-weight: 600; animation: viewIn .2s var(--ease);
}
#logout { margin-top: 1.125rem; color: var(--steel); }

/* ---------- ventana inferior / panel lateral ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: .25rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  animation: sheetUp .3s var(--ease); box-shadow: var(--shadow-lg);
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.sheet-top { position: sticky; top: 0; display: flex; justify-content: center; padding: .5rem 0 .25rem; background: var(--paper); z-index: 1; }
.sheet-grip { width: 2.75rem; height: .3rem; border-radius: 99px; background: var(--line-2); margin-top: .25rem; }
.close-x {
  position: absolute; right: -.375rem; top: .25rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--card);
  display: grid; place-items: center; color: var(--ink-2);
}
.close-x:hover { border-color: var(--ink); }
.close-x .i { width: 1.25rem; height: 1.25rem; }
.sheet-title { font-size: 1.75rem; font-weight: 800; font-stretch: 82%; letter-spacing: -.03em; margin: .5rem 3rem .375rem 0; }
.step { font: 760 1.0625rem/1.3 var(--display); font-stretch: 88%; margin: 1.375rem 0 .5rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.choice-grid button, .day-scroll button, .slots button {
  border: 1.5px solid var(--line-2); background: var(--card); border-radius: var(--r-md); font-weight: 600;
  transition: border-color .15s var(--ease);
}
.choice-grid button:hover, .day-scroll button:hover, .slots button:hover { border-color: var(--ink); }
.choice-grid button { display: flex; flex-direction: column; align-items: flex-start; padding: .75rem .875rem; min-height: 4rem; text-align: left; font-size: 1rem; }
.choice-grid small { color: var(--steel); font-weight: 400; font-size: .875rem; }
.choice-grid button.sel, .day-scroll button.sel, .slots button.sel { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.choice-grid button.sel small, .day-scroll button.sel small { color: inherit; opacity: .8; }
.day-scroll { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .375rem; scrollbar-width: thin; }
.day-scroll button { flex: none; width: 4.25rem; min-height: 4.75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.day-scroll button b { font: 800 1.4rem/1.05 var(--display); font-stretch: 80%; }
.day-scroll small { font-size: .75rem; color: var(--steel); font-weight: 600; }
.day-scroll button.closed { border-style: dashed; color: var(--steel); background: transparent; }
.other-day { flex: none; margin: 0; min-width: 9.5rem; font-size: .8125rem; }
.other-day input { min-height: 3rem; padding: .5rem .625rem; font-size: .9375rem; }
.slot-group { margin: .875rem 0 .375rem; font-weight: 600; color: var(--steel); font-size: .875rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.875rem, 1fr)); gap: .5rem; }
.slots button { min-height: 3rem; font-variant-numeric: tabular-nums; font-size: 1rem; }
.sheet-actions { position: sticky; bottom: calc(-1.5rem - env(safe-area-inset-bottom)); padding: .875rem 0 .5rem; background: var(--paper); margin-top: .625rem; }
.appt-when { font: 600 1.125rem/1.4 var(--body); margin: .125rem 0 .375rem; }
.appt-when b { font: 800 2rem/1.15 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.note { display: flex; gap: .5rem; padding: .625rem .75rem; background: var(--warn-soft); border-radius: var(--r-sm); }
.note .i { width: 1.125rem; height: 1.125rem; margin-top: .125rem; color: var(--warn); }

.toast {
  position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  width: max-content; max-width: calc(100% - 2rem); padding: .75rem 1.125rem; border-radius: 1.25rem; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: .9375rem; box-shadow: var(--shadow-lg); animation: viewIn .2s var(--ease); text-align: center;
}
.toast.bad { background: var(--red); color: var(--white); }

/* ---------- pestaña «Cuenta» y pasos de inicio (solo en pelucontesta.es/panel) ---------- */
.cuenta-grid { display: grid; gap: 1.25rem; margin-top: .5rem; }
.cuenta-main { display: grid; gap: .625rem; align-content: start; min-width: 0; }
.cuenta-main form { margin: 0; }

/* el plan, como el cupón de precio de la web */
.coupon-wrap { position: relative; padding: .75rem; border-radius: 1.875rem; border: 2px dashed rgb(20 26 51 / .3); }
.coupon-tool { position: absolute; left: 0; top: 0; width: 2.75rem; margin: -.8rem 0 0 -1.1rem; filter: drop-shadow(0 .25rem .35rem rgb(20 26 51 / .3)); }
.coupon {
  position: relative; padding: 1.375rem 1.375rem 1.25rem; border-radius: 1.375rem; background-color: var(--card); box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 0 50%, var(--paper) .8rem, transparent .85rem), radial-gradient(circle at 100% 50%, var(--paper) .8rem, transparent .85rem);
}
.coupon-brand { margin: 0; font: 800 1.45rem/1.1 var(--display); font-stretch: 84%; letter-spacing: -.02em; }
.coupon-sub { margin: .125rem 0 1rem; color: var(--steel); font-size: .875rem; }
.coupon-price { display: flex; align-items: flex-end; gap: .5rem; margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 2px dashed var(--line-2); }
.coupon-price b { font: 800 3.4rem/.8 var(--display); font-stretch: 78%; letter-spacing: -.04em; }
.coupon-price span { display: grid; font-weight: 700; font-size: 1.05rem; line-height: 1.1; padding-bottom: .125rem; }
.coupon-price small { font-weight: 500; font-size: .78rem; color: var(--steel); }
.coupon-note { margin: .625rem 0 0; color: var(--ink-2); font-size: .9375rem; }
.coupon form { margin: 1rem 0 0; }
.fine { margin: .5rem 0 0; color: var(--steel); font-size: .8125rem; text-align: center; }
.estados { display: flex; flex-wrap: wrap; gap: .375rem; }
.estado {
  display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .7rem; border-radius: 99px;
  background: var(--paper-2); color: var(--ink-2); font-size: .8125rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.estado--ok { background: var(--ok-soft); color: var(--ok); }
.estado--warn { background: var(--warn-soft); color: var(--warn); }
.estado--err { background: var(--red-soft); color: #a3182a; }

.help-card {
  display: grid; gap: .25rem; padding: 1.125rem; border-radius: var(--r-lg); background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow);
}
.help-card .hand { font-size: 1.6rem; color: #ff8a97; margin: 0; }
.help-card p { margin: 0 0 .5rem; color: rgb(246 241 231 / .8); font-size: .9375rem; }
.acc.danger summary { color: var(--red); }
.acc.danger .ico { color: var(--red); }
.acc.danger[open] .ico { background: var(--red); color: var(--white); }
.salir-form { margin: 0; }
.field-error { color: var(--red); font-size: .875rem; font-weight: 500; margin: .375rem 0 0; }
.field-hint { color: var(--steel); font-size: .875rem; margin: .375rem 0 0; }

/* mensajes del portal en los pasos de inicio */
.flash { margin: .75rem 0 0; padding: .875rem 1rem; border-radius: .75rem; border: 1px solid transparent; border-left-width: 4px; font-size: .95rem; }
.flash--ok { background: var(--ok-soft); border-color: #a9dcc0; border-left-color: var(--ok); color: #0b5634; }
.flash--info { background: var(--blue-soft); border-color: #c3d0f5; border-left-color: var(--blue); color: #172f7c; }
.flash--error { background: var(--red-soft); border-color: #f1b8bf; border-left-color: var(--red); color: #7d1422; }

/* pasos de inicio: confirmar el email, empezar la prueba y esperar a que se prepare */
.onb-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: calc(.625rem + env(safe-area-inset-top)) 1rem .625rem;
  background: rgb(246 241 231 / .86); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
}
.onb-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--cut); }
.onb-top form { margin: 0; }
.onb { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.onb .page-title { font-size: 2.6rem; }
.pasos { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .375rem; margin: 1.25rem 0 1rem; padding: 0; counter-reset: paso; }
.pasos li { counter-increment: paso; display: grid; gap: .375rem; font-size: .8125rem; font-weight: 600; color: var(--steel); }
.pasos li::before { content: ""; height: .375rem; border-radius: 99px; background: var(--line); }
.pasos li.hecho::before { background: var(--ink); }
.pasos li.ahora { color: var(--ink); }
.pasos li.ahora::before { background: var(--stripes); background-size: 1.5rem .375rem; animation: stripes 1.2s linear infinite; }
@keyframes stripes { to { background-position: 1.5rem 0; } }
.paso-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 1.5rem 1.25rem; box-shadow: var(--shadow-lg);
}
.paso-card h2 { font-size: 1.75rem; font-weight: 800; font-stretch: 84%; letter-spacing: -.025em; margin: 0 0 .5rem; }
.paso-card p { margin: .5rem 0; }
.paso-card ul { margin: .5rem 0 1rem; padding-left: 1.25rem; display: grid; gap: .375rem; }
.paso-card .btn { margin-top: .75rem; }
.paso-card form { margin: 0; }
.preparando { display: flex; align-items: center; gap: 1.25rem; margin-top: 1rem; }
.preparando .hand { font-size: 1.5rem; color: var(--red); }
.onb-cuenta { margin-top: 2.5rem; }
.onb-cuenta > h2 { font-size: 1.5rem; font-weight: 800; font-stretch: 84%; margin: 0 0 .75rem; }

/* tijeras de la web (en el cupón del plan) */
.scissors { overflow: visible; width: 100%; height: auto; display: block; }
.scissors__blade { fill: #dfe3ec; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.scissors__shank, .scissors__ring { fill: none; stroke-width: 4.6; stroke-linecap: round; }
.scissors__ring--a, .scissors__shank--a { stroke: var(--red); }
.scissors__ring--b, .scissors__shank--b { stroke: var(--blue); }
.scissors__pin { fill: var(--ink); stroke: #fff; stroke-width: .9; }

/* ---------- tablet y ordenador ---------- */
@media (min-width: 600px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .choice-grid { grid-template-columns: repeat(3, 1fr); }
  .onb { padding-top: 2rem; }
  .paso-card { padding: 2rem; }
}
@media (min-width: 960px) {
  body { font-size: 1rem; }
  #app { display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  .topbar { grid-column: 2; grid-row: 1; padding: 1.125rem 2.5rem .625rem; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; position: static; justify-content: flex-end; }
  .topbar::after { display: none; }
  .topbar .brand { display: none; }
  main { grid-column: 2; grid-row: 2; max-width: 74rem; width: 100%; margin: 0; padding: 0 2.5rem 3rem; }
  /* menú lateral: papel con la línea de corte a la derecha */
  .tabbar {
    position: sticky; top: 0; grid-row: 1 / span 2; grid-column: 1; height: 100dvh; display: flex; flex-direction: column;
    gap: .25rem; padding: 1.5rem .875rem; background: var(--paper-2); box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tabbar::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1.5px; background: repeating-linear-gradient(180deg, rgb(20 26 51 / .3) 0 .55rem, transparent .55rem .95rem); }
  .tabbar .side-brand { display: grid; gap: .875rem; padding: .25rem .625rem 1.5rem; }
  .side-shop {
    font: 780 1.15rem/1.2 var(--display); font-stretch: 86%; letter-spacing: -.015em; color: var(--ink-2);
    overflow: hidden; text-overflow: ellipsis; padding-top: .875rem; border-top: 1px solid var(--line-2);
  }
  .tabbar button { flex-direction: row; justify-content: flex-start; gap: .875rem; min-height: 3.25rem; padding: 0 .875rem; font-size: 1rem; color: var(--ink-2); }
  .tabbar button:hover { background: rgb(255 252 246 / .7); color: var(--ink); }
  .tabbar button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
  .tabbar button::before { top: .625rem; bottom: .625rem; left: 0; width: .3rem; height: auto; background: repeating-linear-gradient(160deg, var(--red) 0 .3rem, var(--white) .3rem .5rem, var(--blue) .5rem .8rem, var(--white) .8rem 1rem); transform: scaleY(0); }
  .tabbar button.active::before { transform: scaleY(1); }
  .tabbar button[data-go="cuenta"] { margin-top: auto; }
  .badge { position: static; margin-left: auto; }
  .page-title { font-size: 2.9rem; }
  .hoy-grid { grid-template-columns: minmax(0, 1fr) 24rem; grid-template-areas: "head head" "main side"; column-gap: 2.5rem; align-items: start; }
  .hoy-side { position: sticky; top: 1.25rem; }
  .hoy-main .section-head { margin-top: 1.25rem; }
  .hoy-side .bot-card, .hoy-side .setup, .hoy-side .banner { margin-top: 1.25rem; }

  [data-view="agenda"], [data-view="mensajes"], [data-view="ajustes"] { max-width: 52rem; }
  .fab { right: 2.5rem; bottom: 2rem; }
  .savebar { left: auto; right: 2.5rem; bottom: 1.75rem; width: 27.5rem; }
  .toast { bottom: 2rem; left: calc(50% + var(--side) / 2); }
  .cuenta-grid { grid-template-columns: minmax(0, 1fr) 22rem; gap: 2rem; align-items: start; }
  .cuenta-plan { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 1.25rem; }
  .cuenta-main { grid-column: 1; grid-row: 1; }
  .onb .cuenta-grid { grid-template-columns: minmax(0, 1fr) 19rem; }

  .sheet-panel {
    left: auto; top: 0; width: min(33rem, 100%); max-height: none; height: 100dvh; border-radius: var(--r-xl) 0 0 var(--r-xl);
    padding: .75rem 1.75rem 1.75rem; animation: sheetSide .3s var(--ease);
  }
  .sheet-grip { visibility: hidden; }
  .sheet-actions { bottom: -1.75rem; }
  .bubbles { max-height: 52dvh; }
  .onb .page-title { font-size: 3.4rem; }
}
@keyframes sheetSide { from { transform: translateX(30%); opacity: .4; } }

@media (max-width: 370px) {
  main { padding-left: .75rem; padding-right: .75rem; }
  .page-title { font-size: 1.9rem; }
  .appt { grid-template-columns: 3.9rem 1fr auto; }
  .appt .time { font-size: 1.35rem; }
  .gap { padding-left: 4.9rem; }
  .bot-card { flex-wrap: wrap; }
  .tabbar button { font-size: .75rem; }
}
/* móviles: en los primeros pasos el botón va debajo del texto */
@media (max-width: 459px) {
  .setup-steps li { grid-template-columns: 2rem 1fr; row-gap: .5rem; }
  .setup-steps li .btn { grid-column: 2; justify-self: start; }
  .setup-help { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
