/* Base de la plataforma (estilo de la propuesta 02). Cada página agrega lo suyo en su propio CSS. */
:root {
  color-scheme: dark;
  --bg: #0c1220;
  --surface: #151d30;      /* fondo de tarjetas, campos y menús */
  --on-accent: #fff;    /* texto sobre el color de acento */
  --white: #fff;
  --ink: #eef2f8;
  --muted: #a7b0c2;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --line-2: color-mix(in srgb, var(--ink) 22%, transparent);
  --blue: #4c74ff;
  --blue-dark: #3b60e0;
  --blue-soft: rgb(76 116 255 / .2);
  --ok: #6fd8a4; --ok-soft: rgb(111 216 164 / .16);
  --warn: #f0c27b; --warn-soft: rgb(240 194 123 / .16);
  --bad: #ff8f7d; --bad-soft: rgb(255 143 125 / .16);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radio: 20px;
  --radio-btn: 14px;   /* forma de botón de la propuesta */
  --shadow: 0 25px 60px -15px rgb(0 0 0 / .65);
  --shadow-sm: 0 8px 24px -10px rgb(0 0 0 / .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.05; }
h1 { font-size: clamp(34px, 4.6vw, 54px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.marca { font: 400 26px/1 var(--serif); color: var(--ink); text-decoration: none; }
.marca em { color: var(--acento, var(--blue)); }   /* --acento y --on-acento: opcionales en cliente.json */

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: var(--radio-btn); border: 0; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--azul { background: var(--blue); color: var(--on-accent); }
.btn--azul:hover:not([disabled]) { background: var(--blue-dark); }
.btn--acento { background: var(--acento, var(--blue)); color: var(--on-acento, var(--on-accent)); }
.btn--acento:hover { filter: brightness(1.08); }
.btn--linea { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--linea:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.btn--texto { background: none; padding: 0; min-height: 44px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.btn--ancho { width: 100%; }
.btn--peligro { background: var(--bad-soft); color: var(--bad); }

/* ── Campos ── */
.campo { display: grid; gap: 6px; }
.campo label { font-size: 13px; font-weight: 700; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.campo.error input, .campo.error select { border-color: var(--bad); }
.campo .ayuda { font-size: 13px; color: var(--muted); }
.campo .msj { font-size: 13px; color: var(--bad); min-height: 0; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; } /* sin start, un campo con ayuda debajo estira y desalinea al vecino */
@media (max-width: 560px) { .fila { grid-template-columns: 1fr; } }

.tarjeta { background: var(--surface); border-radius: var(--radio); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--blue-soft); color: var(--blue); }
.estado--confirmada { background: var(--ok-soft); color: var(--ok); }
.estado--pendiente { background: var(--warn-soft); color: var(--warn); }
.estado--cancelada, .estado--rechazada { background: var(--bad-soft); color: var(--bad); }
.vacio { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ── Encabezado ── */
.topo { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topo__in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.topo__nav { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15px; }
.topo__nav a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color .2s; }
.topo__nav a:hover { color: var(--ink); }
.topo__btn { min-height: 44px; padding: 0 18px; }
.menu-usuario { position: relative; }
.avatar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 6px 5px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.avatar:hover { box-shadow: var(--shadow-sm); }
.avatar svg { width: 18px; height: 18px; }
.avatar__ini { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.avatar__ini svg { width: 20px; height: 20px; }
.menu-usuario__lista { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 8px 0; display: grid; }
.menu-usuario__lista a, .menu-usuario__lista button { padding: 11px 18px; text-align: left; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-size: 15px; }
.menu-usuario__lista a:hover, .menu-usuario__lista button:hover { background: var(--bg); }
.menu-usuario__hola { padding: 8px 18px 6px; font-size: 13px; color: var(--muted); }
.menu-usuario__lista hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
@media (max-width: 700px) { .topo__nav, .topo__btn { display: none; } .menu-usuario { margin-left: auto; } }

/* ── Pie ── */
.pie { margin-top: 80px; border-top: 1px solid var(--line); background: var(--surface); }
.pie__in { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding-block: 28px; font-size: 14px; color: var(--muted); }
.pie__in .marca { font-size: 22px; }
.pie__in a { color: inherit; }

/* ── Aviso flotante ── */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 14px 20px; border-radius: 14px; font-weight: 600; max-width: min(92vw, 520px); transition: opacity .3s, transform .3s var(--ease); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--bad); }
.toast--ok { background: var(--ok); }

/* ── WhatsApp ── */
.whats { position: fixed; right: 16px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .2); }
.whats svg { width: 28px; height: 28px; }

/* ── Calendario ── */
.cal { position: relative; }
.cal__nav { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; pointer-events: none; }
.cal__nav button { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; }
.cal__nav button:hover:not([disabled]) { background: var(--bg); }
.cal__nav button[disabled] { opacity: .25; cursor: default; }
.cal__meses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.cal__nom { text-align: center; font-weight: 700; line-height: 40px; margin-bottom: 8px; }
.cal__sem, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__sem span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding-bottom: 6px; }
.cal__d { aspect-ratio: 1; min-height: 40px; border: 0; background: none; border-radius: 50%; font-size: 14px; font-weight: 600; cursor: pointer; position: relative; }
.cal__d:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal__d[disabled] { cursor: default; color: color-mix(in srgb, var(--ink) 30%, transparent); }
.cal__d.ocupado { color: color-mix(in srgb, var(--ink) 30%, transparent); text-decoration: line-through; }
.cal__d.pasado { color: color-mix(in srgb, var(--ink) 30%, transparent); }
.cal__d.hoy::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--blue); }
.cal__d.entre { background: var(--blue-soft); border-radius: 0; }
.cal__d.ini, .cal__d.fin { background: var(--ink); color: var(--bg); text-decoration: none; }
.cal__d.ini.hoy::after, .cal__d.fin.hoy::after { background: var(--surface); }

/* ── Visor ── */
.visor { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 56px 64px; border: 0; background: rgb(16 16 18 / .96); color: #fff; }
.visor[open] { display: grid; place-items: center; }
.visor::backdrop { background: rgb(0 0 0 / .6); }
.visor img { max-width: 100%; max-height: calc(100vh - 112px); object-fit: contain; border-radius: 10px; }
.visor button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .1); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.visor__x { top: 14px; right: 14px; }
.visor__f--a { left: 14px; top: 50%; transform: translateY(-50%); }
.visor__f--s { right: 14px; top: 50%; transform: translateY(-50%); }
.visor__n { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 14px; opacity: .8; }
@media (max-width: 640px) { .visor { padding: 64px 8px; } .visor__f--a, .visor__f--s { top: auto; bottom: 8px; transform: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
