/* =========================================================
   CitasPro · temas y componentes
   Cada tema solo redefine variables; los componentes son comunes.
   ========================================================= */
:root, [data-theme="serio"] {
  --bg: #eef1f5; --bg-band: #1f3a5f; --on-band: #f4f6fa; --surface: #ffffff; --surface-2: #f5f7fa;
  --text: #17202e; --muted: #5b6678; --primary: #1f3a5f; --on-primary: #ffffff; --accent: #b08d3c;
  --border: #d5dbe4; --border-w: 1px; --radius: 6px; --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(23,32,46,.08), 0 6px 16px rgba(23,32,46,.06);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif; --head-weight: 700; --head-transform: none; --head-spacing: 0;
  --ok: #1f7a4d; --warn: #b7791f; --danger: #b42318; --focus: #3b82f6;
  --free-bg: #e8f4ee; --busy-bg: repeating-linear-gradient(45deg, #eef0f3 0 6px, #e3e6eb 6px 12px);
  --bg-pattern: none;
}
[data-theme="elegante"] {
  --bg: #161412; --bg-band: #0f0d0c; --on-band: #efe8dc; --surface: #211e1b; --surface-2: #2a2622;
  --text: #efe8dc; --muted: #a79d8e; --primary: #c9a96e; --on-primary: #1a1612; --accent: #8e6f45;
  --border: #3a342d; --radius: 2px; --radius-lg: 3px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font-head: Didot, "Bodoni MT", "Bodoni 72", Georgia, serif; --head-weight: 400; --head-spacing: .02em;
  --ok: #8fbf8a; --warn: #d9a74a; --danger: #e07a6a; --focus: #c9a96e;
  --free-bg: #2b3226; --busy-bg: repeating-linear-gradient(45deg, #26221e 0 6px, #2e2924 6px 12px);
}
[data-theme="divertido"] {
  --bg: #fff4e6; --bg-band: #ffc23d; --on-band: #2b1d3a; --surface: #ffffff; --surface-2: #fff0f5;
  --text: #2b1d3a; --muted: #6f5e80; --primary: #ff4f7b; --on-primary: #ffffff; --accent: #3dbbff;
  --border: #2b1d3a; --border-w: 2px; --radius: 18px; --radius-lg: 26px; --shadow: 0 5px 0 #2b1d3a;
  --font-body: "Trebuchet MS", "Nunito", "Segoe UI Rounded", system-ui, sans-serif;
  --font-head: "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", system-ui, sans-serif; --head-weight: 800;
  --ok: #10a36b; --warn: #e08a00; --danger: #e5383b; --focus: #3dbbff;
  --free-bg: #dcfbe9; --busy-bg: repeating-linear-gradient(45deg, #ffe3ec 0 6px, #ffd0de 6px 12px);
  --bg-pattern: radial-gradient(#ffd9a8 1.5px, transparent 1.6px) 0 0 / 22px 22px;
}
[data-theme="retro"] {
  --bg: #efe3c8; --bg-band: #3a2a1d; --on-band: #f8f0dc; --surface: #f8f0dc; --surface-2: #f1e5c9;
  --text: #3a2a1d; --muted: #7a634c; --primary: #d9480f; --on-primary: #fff8ec; --accent: #13776f;
  --border: #3a2a1d; --border-w: 2px; --radius: 0; --radius-lg: 0; --shadow: 4px 4px 0 #3a2a1d;
  --font-body: "Courier Prime", "Courier New", Courier, monospace;
  --font-head: "Cooper Black", "Cooper Std", Rockwell, "Rockwell Extra Bold", Georgia, serif; --head-weight: 900;
  --ok: #13776f; --warn: #c27c0e; --danger: #b3261e; --focus: #13776f;
  --free-bg: #d8ead3; --busy-bg: repeating-linear-gradient(45deg, #e6d6b3 0 5px, #dccaa2 5px 10px);
}
[data-theme="futurista"] {
  --bg: #070a1a; --bg-band: #0b1030; --on-band: #dfe8ff; --surface: rgba(16,22,56,.82); --surface-2: #141a3d;
  --text: #dfe8ff; --muted: #8391c0; --primary: #00e0ff; --on-primary: #03121a; --accent: #ff3ecf;
  --border: rgba(0,224,255,.28); --radius: 12px; --radius-lg: 16px;
  --shadow: 0 0 0 1px rgba(0,224,255,.12), 0 0 28px rgba(0,224,255,.08);
  --font-body: "Segoe UI", "Inter", system-ui, sans-serif;
  --font-head: Orbitron, Eurostile, "Bank Gothic", "Segoe UI", system-ui, sans-serif; --head-weight: 700;
  --head-transform: uppercase; --head-spacing: .08em;
  --ok: #37f5a4; --warn: #ffd166; --danger: #ff5c7a; --focus: #ff3ecf;
  --free-bg: rgba(55,245,164,.12); --busy-bg: repeating-linear-gradient(45deg, rgba(255,62,207,.08) 0 6px, rgba(255,62,207,.14) 6px 12px);
  --bg-pattern: linear-gradient(rgba(0,224,255,.05) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(0,224,255,.05) 1px, transparent 1px) 0 0 / 40px 40px;
}
[data-theme="natural"] {
  --bg: #eef2ea; --bg-band: #2f6b45; --on-band: #f3f7ef; --surface: #fbfcf8; --surface-2: #f1f5ec;
  --text: #1f2b22; --muted: #5c6b5f; --primary: #2f6b45; --on-primary: #ffffff; --accent: #c98f2c;
  --border: #d3dccf; --radius: 14px; --radius-lg: 22px; --shadow: 0 2px 10px rgba(31,43,34,.07);
  --font-head: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; --head-weight: 700;
  --ok: #2f6b45; --warn: #b8741a; --danger: #a33a2b; --focus: #c98f2c;
  --free-bg: #e2efdc; --busy-bg: repeating-linear-gradient(45deg, #e9ece5 0 6px, #dfe4d9 6px 12px);
}
[data-theme="minimal"] {
  --bg: #ffffff; --bg-band: #ffffff; --on-band: #111111; --surface: #ffffff; --surface-2: #f5f5f5;
  --text: #111111; --muted: #6b6b6b; --primary: #111111; --on-primary: #ffffff; --accent: #777777;
  --border: #e6e6e6; --radius: 10px; --radius-lg: 14px; --shadow: none;
  --font-head: system-ui, -apple-system, "Segoe UI", sans-serif; --head-weight: 650; --head-spacing: -.02em;
  --ok: #1a7f37; --warn: #9a6700; --danger: #cf222e; --focus: #0969da;
  --free-bg: #f0f7f1; --busy-bg: repeating-linear-gradient(45deg, #f5f5f5 0 6px, #ececec 6px 12px);
}
[data-theme="clinico"] {
  --bg: #f2f8fc; --bg-band: #0f6fa8; --on-band: #ffffff; --surface: #ffffff; --surface-2: #eef6fb;
  --text: #0e2a3d; --muted: #50687a; --primary: #0f6fa8; --on-primary: #ffffff; --accent: #19a38a;
  --border: #d4e4ef; --radius: 10px; --radius-lg: 14px; --shadow: 0 2px 8px rgba(14,42,61,.07);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 600;
  --ok: #19a38a; --warn: #c07d10; --danger: #c0392b; --focus: #19a38a;
  --free-bg: #e3f5f1; --busy-bg: repeating-linear-gradient(45deg, #eef3f7 0 6px, #e3ebf1 6px 12px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); background-image: var(--bg-pattern, none);
  color: var(--text); font: 16px/1.55 var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.grow { flex: 1 1 auto; }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.pre { white-space: pre-line; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; cursor: pointer;
  padding: .62rem 1.1rem; border-radius: var(--radius); border: var(--border-w, 1px) solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: .35rem .7rem; font-size: .875rem; }
.btn-icon { padding: .5rem; width: 2.5rem; height: 2.5rem; }
[data-theme="divertido"] .btn-primary, [data-theme="retro"] .btn-primary { border-color: var(--border); box-shadow: 0 3px 0 var(--border); }
[data-theme="futurista"] .btn-primary { box-shadow: 0 0 18px rgba(0,224,255,.45); }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .25rem; }
input, select, textarea {
  width: 100%; padding: .6rem .75rem; font: inherit; color: var(--text);
  background: var(--surface-2); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius);
}
textarea { min-height: 6rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; }
input[type="color"] { padding: 0; height: 2.6rem; width: 4rem; cursor: pointer; }
.switch { display: flex; align-items: center; gap: .6rem; font-weight: 500; cursor: pointer; margin: .4rem 0; }
.switch input { appearance: none; width: 2.6rem; height: 1.45rem; border-radius: 1rem; background: var(--border); position: relative; transition: background .15s; flex: none; border: 0; padding: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.45rem - 6px); height: calc(1.45rem - 6px); border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(1.15rem); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1rem; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.25rem; }
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); }
.badge.ok { background: var(--ok); color: #fff; border-color: transparent; }
.badge.warn { background: var(--warn); color: #fff; border-color: transparent; }
.badge.danger { background: var(--danger); color: #fff; border-color: transparent; }
.dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }

/* ---------- Cabecera y pestañas (cliente) ---------- */
.site-header { background: var(--surface); border-bottom: var(--border-w, 1px) solid var(--border); position: sticky; top: 0; z-index: 30; }
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.2rem; text-transform: var(--head-transform); letter-spacing: var(--head-spacing); }
.brand img { height: 40px; width: auto; border-radius: var(--radius); }
.tabs { display: flex; gap: .25rem; margin-left: auto; }
.tab { background: none; border: 0; font: inherit; color: var(--muted); padding: .55rem .9rem; border-radius: var(--radius); cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.tab[aria-selected="true"] { color: var(--primary); background: var(--surface-2); }
[data-theme="futurista"] .tab[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--primary); }
.tab svg { width: 20px; height: 20px; }
.account-btn { margin-left: .5rem; }
@media (max-width: 760px) {
  .tabs { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--surface); border-top: var(--border-w, 1px) solid var(--border); justify-content: space-around; padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); z-index: 40; }
  .tab { flex-direction: column; font-size: .75rem; gap: .1rem; padding: .35rem .5rem; flex: 1; }
  body.has-tabs { padding-bottom: 76px; }
  .account-btn { margin-left: auto; }
}

/* ---------- Pestaña Negocio ---------- */
.hero { background: var(--bg-band); color: var(--on-band); padding: clamp(2.5rem, 7vw, 5rem) 0; }
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.hero.no-image .container { grid-template-columns: 1fr; }
.hero h1 { margin-bottom: .3em; max-width: 18ch; }
.hero p.tagline { font-size: 1.2rem; opacity: .9; max-width: 50ch; }
.hero .hero-img { border-radius: var(--radius-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.hero .btn { border-color: currentColor; }
.hero .btn-outline { background: transparent; color: var(--on-band); }
[data-theme="minimal"] .hero { border-bottom: 1px solid var(--border); }
[data-theme="futurista"] .hero h1 { text-shadow: 0 0 24px rgba(0,224,255,.45); }
[data-theme="retro"] .hero { border-bottom: 6px double var(--primary); }
@media (max-width: 760px) { .hero .container { grid-template-columns: 1fr; } }
.section { padding: 2.5rem 0; }
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.hours-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours-table td { padding: .3rem 0; border-bottom: 1px dashed var(--border); }
.hours-table td:last-child { text-align: right; }
.hours-table tr.today td { font-weight: 700; color: var(--primary); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.chip { border: var(--border-w, 1px) solid var(--border); background: var(--surface); color: var(--text); padding: .4rem .9rem; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.service { display: flex; flex-direction: column; background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.service .ph { aspect-ratio: 16/10; background: var(--surface-2); object-fit: cover; width: 100%; }
.service .ph.empty { display: grid; place-items: center; font-size: 2.5rem; }
.service .body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.service h3 { margin: 0; }
.service .meta { display: flex; gap: .6rem; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.service .price { font-weight: 800; color: var(--primary); font-size: 1.15rem; }
.service .desc { color: var(--muted); font-size: .95rem; flex: 1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .25s; }
.gallery button:hover img { transform: scale(1.04); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: .45rem 0; display: flex; gap: .6rem; align-items: baseline; }

/* ---------- Calendario de citas ---------- */
.booking { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .booking { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.cal-head h3 { margin: 0; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.cal-dow { text-align: center; font-size: .78rem; color: var(--muted); font-weight: 700; padding-bottom: .2rem; }
.cal-day {
  aspect-ratio: 1; border-radius: var(--radius); border: var(--border-w, 1px) solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  font: inherit; color: var(--text); cursor: pointer; position: relative; padding: 0;
}
.cal-day .n { font-weight: 700; font-size: 1rem; }
.cal-day .c { font-size: .68rem; font-weight: 700; color: var(--ok); }
.cal-day.available { background: var(--free-bg); }
.cal-day.full { background: var(--busy-bg); cursor: not-allowed; }
.cal-day.full .c { color: var(--danger); }
.cal-day.closed, .cal-day.past, .cal-day.out_of_range { opacity: .38; cursor: not-allowed; background: var(--surface-2); }
.cal-day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-day.selected { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.cal-day.selected .c { color: var(--on-primary); }
.cal-day.empty { visibility: hidden; }
.cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; font-size: .8rem; color: var(--muted); }
.cal-legend span::before { content: ""; display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; border: 1px solid var(--border); }
.cal-legend .l-free::before { background: var(--free-bg); }
.cal-legend .l-full::before { background: var(--busy-bg); }
.cal-legend .l-closed::before { background: var(--surface-2); opacity: .5; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: .45rem; }
.slot { padding: .55rem .3rem; border-radius: var(--radius); border: var(--border-w, 1px) solid var(--border); background: var(--free-bg); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.slot small { display: block; font-weight: 500; font-size: .7rem; color: var(--muted); }
.slot:hover:not([disabled]) { border-color: var(--primary); }
.slot[disabled] { background: var(--busy-bg); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.appt-list { list-style: none; padding: 0; margin: 0; }
.appt-list li { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .7rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.appt-list li:last-child { border-bottom: 0; }
.date-chip { min-width: 3.4rem; text-align: center; border-radius: var(--radius); background: var(--surface-2); padding: .3rem .4rem; line-height: 1.1; border: 1px solid var(--border); }
.date-chip b { display: block; font-size: 1.2rem; }
.date-chip span { font-size: .7rem; text-transform: uppercase; color: var(--muted); }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: min(70vh, 620px); background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.chat-top { padding: .75rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .7rem; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; background: var(--surface-2); }
.msg { max-width: 78%; padding: .55rem .8rem; border-radius: calc(var(--radius) + 6px); background: var(--surface); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.msg time { display: block; font-size: .68rem; opacity: .7; margin-top: .2rem; }
.msg .who { font-size: .72rem; font-weight: 700; opacity: .75; }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); }
.chat-form textarea { min-height: 2.6rem; height: 2.6rem; max-height: 8rem; }
.typing { font-size: .8rem; color: var(--muted); padding: 0 1rem .3rem; min-height: 1.2rem; background: var(--surface-2); }
.notice { padding: 1rem; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border); }

/* ---------- Llamada ---------- */
.call-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(5,8,15,.92); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; }
.call-overlay video.remote { width: min(960px, 100%); max-height: 70vh; background: #000; border-radius: 12px; }
.call-overlay video.local { position: absolute; right: 1rem; top: 1rem; width: min(220px, 32vw); border-radius: 10px; background: #111; border: 2px solid rgba(255,255,255,.3); }
.call-overlay .who { font-size: 1.4rem; font-weight: 700; }
.call-overlay .status { opacity: .8; }
.call-overlay .controls { display: flex; gap: .8rem; }
.call-overlay .controls .btn { border-radius: 999px; min-width: 3.2rem; height: 3.2rem; }
.call-avatar { width: 110px; height: 110px; border-radius: 50%; background: #2a3350; display: grid; place-items: center; font-size: 2.6rem; font-weight: 700; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 100% { box-shadow: 0 0 0 26px rgba(255,255,255,0); } }

/* ---------- Modal y avisos ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,14,22,.55); z-index: 80; display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--surface); color: var(--text); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); width: min(520px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal.wide { width: min(820px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal header h3 { margin: 0; }
.modal .content { padding: 1.25rem; }
.modal footer { display: flex; gap: .6rem; justify-content: flex-end; padding: 1rem 1.25rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 120; display: flex; flex-direction: column; gap: .5rem; }
@media (max-width: 760px) { .toasts { bottom: 90px; left: 1rem; } }
.toast { background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 380px; font-weight: 500; }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 90; display: grid; place-items: center; padding: 1rem; cursor: zoom-out; }
.lightbox img { max-height: 90vh; border-radius: 8px; }
.lightbox p { color: #fff; text-align: center; margin-top: .6rem; }
.site-footer { padding: 2rem 0 3rem; color: var(--muted); font-size: .88rem; text-align: center; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* ---------- Panel de administración ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: var(--bg-band); color: var(--on-band); padding: 1rem .7rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: var(--on-band); padding: .4rem .5rem 1rem; font-size: 1.05rem; }
.admin-side .role { font-size: .75rem; opacity: .75; padding: 0 .5rem .8rem; }
.admin-side nav button { width: 100%; text-align: left; display: flex; gap: .6rem; align-items: center; background: none; border: 0; color: inherit; opacity: .82; padding: .55rem .7rem; border-radius: var(--radius); font: inherit; cursor: pointer; }
.admin-side nav button:hover { opacity: 1; background: rgba(255,255,255,.08); }
.admin-side nav button[aria-current="page"] { opacity: 1; background: rgba(255,255,255,.16); font-weight: 700; }
[data-theme="minimal"] .admin-side nav button:hover, [data-theme="minimal"] .admin-side nav button[aria-current="page"] { background: #f0f0f0; }
[data-theme="minimal"] .admin-side { border-right: 1px solid var(--border); }
.admin-side .group { font-size: .72rem; opacity: .6; padding: 1rem .7rem .3rem; }
.admin-side .nb { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .45rem; font-weight: 700; }
.admin-main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem; min-width: 0; }
.admin-main > h2 { margin-bottom: 1.2rem; }
.admin-topbar { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; }
  .admin-topbar { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.7rem; font-family: var(--font-head); }
.stat span { color: var(--muted); font-size: .85rem; }
.meter { height: .5rem; border-radius: 1rem; background: var(--surface-2); overflow: hidden; margin-top: .5rem; border: 1px solid var(--border); }
.meter i { display: block; height: 100%; background: var(--ok); }
.meter i.hi { background: var(--warn); }
.meter i.crit { background: var(--danger); }
.table-wrap { overflow-x: auto; background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data th { font-size: .78rem; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.actions { white-space: nowrap; text-align: right; }
table.data select { padding: .3rem .4rem; width: auto; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.toolbar .field { margin: 0; }
.toolbar input, .toolbar select { width: auto; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.theme-card { border: 2px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; background: none; padding: 0; text-align: left; font: inherit; color: var(--text); }
.theme-card[aria-pressed="true"] { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 30%, transparent); }
.theme-card .pv { height: 96px; display: flex; flex-direction: column; justify-content: flex-end; padding: .7rem; gap: .35rem; }
.theme-card .pv b { font-size: 1.05rem; }
.theme-card .pv .bar { display: flex; gap: .3rem; }
.theme-card .pv .bar i { width: 26px; height: 10px; border-radius: 3px; }
.theme-card .nm { padding: .55rem .7rem; font-weight: 700; background: var(--surface); }
.hours-edit .day { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.hours-edit .range { display: flex; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.hours-edit .range input { width: 7.5rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.thumbs figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.thumbs figcaption { padding: .4rem; display: flex; gap: .3rem; }
.thumbs figcaption input { padding: .3rem .4rem; font-size: .8rem; }
.photo-pick { display: flex; gap: .8rem; align-items: center; }
.photo-pick img { width: 90px; height: 70px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.chat-admin { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; }
@media (max-width: 900px) { .chat-admin { grid-template-columns: 1fr; } }
.conv-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); max-height: 70vh; overflow-y: auto; }
.conv-list button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: .7rem .9rem; cursor: pointer; font: inherit; color: var(--text); }
.conv-list button[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); }
.conv-list .last { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { width: 100%; height: 70px; display: block; }
.spark path.l { fill: none; stroke: var(--primary); stroke-width: 2; }
.spark path.a { fill: color-mix(in srgb, var(--primary) 16%, transparent); stroke: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-screen .card { width: min(420px, 100%); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }

/* =========================================================
   Temas por profesión
   ========================================================= */
[data-theme="mecanico"] {
  --bg: #1c1f24; --bg-band: #111316; --on-band: #f4f5f6; --surface: #262a31; --surface-2: #2f343c;
  --text: #eef0f2; --muted: #a3aab4; --primary: #ffb400; --on-primary: #16181b; --accent: #e5532d;
  --border: #3b414b; --border-w: 2px; --radius: 3px; --radius-lg: 4px; --shadow: 0 4px 0 #0c0d0f;
  --font-body: "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif; --head-weight: 400; --head-transform: uppercase; --head-spacing: .03em;
  --ok: #5fd068; --warn: #ffb400; --danger: #ff5b3a; --focus: #ffb400;
  --free-bg: #26402c; --busy-bg: repeating-linear-gradient(45deg, #2f343c 0 6px, #262a31 6px 12px);
  --bg-pattern: linear-gradient(135deg, rgba(255,255,255,.02) 25%, transparent 25%) 0 0 / 8px 8px;
}
[data-theme="mecanico"] .hero { border-bottom: 10px solid; border-image: repeating-linear-gradient(-45deg, #ffb400 0 18px, #16181b 18px 36px) 10; }

[data-theme="abogado"] {
  --bg: #f6f1e7; --bg-band: #3e1119; --on-band: #f6efe2; --surface: #fffdf8; --surface-2: #f2ebdd;
  --text: #231a17; --muted: #6d5f55; --primary: #6b1d2a; --on-primary: #fff8ee; --accent: #b08d3c;
  --border: #ddd1bd; --radius: 2px; --radius-lg: 3px; --shadow: 0 1px 3px rgba(35,26,23,.12);
  --font-body: Georgia, "Times New Roman", serif;
  --font-head: Garamond, "EB Garamond", "Adobe Garamond Pro", Georgia, serif; --head-weight: 600; --head-spacing: .01em;
  --ok: #3d6b3a; --warn: #a2701a; --danger: #9a1f2b; --focus: #b08d3c;
  --free-bg: #edf0e2; --busy-bg: repeating-linear-gradient(45deg, #efe7d8 0 6px, #e6dcc9 6px 12px);
}
[data-theme="abogado"] .hero h1 { border-bottom: 1px solid var(--accent); padding-bottom: .3em; display: inline-block; }
[data-theme="abogado"] body, [data-theme="abogado"] .pre { line-height: 1.65; }

[data-theme="juridico"] {
  --bg: #eef1f6; --bg-band: #14264a; --on-band: #eef2fa; --surface: #ffffff; --surface-2: #f3f5f9;
  --text: #131a26; --muted: #56627a; --primary: #14264a; --on-primary: #ffffff; --accent: #8a96a8;
  --border: #d3d9e4; --radius: 4px; --radius-lg: 6px; --shadow: 0 1px 2px rgba(19,26,38,.08), 0 8px 20px rgba(19,26,38,.05);
  --font-head: "Book Antiqua", Palatino, "Palatino Linotype", Georgia, serif; --head-weight: 700;
  --ok: #2e7d4f; --warn: #b7791f; --danger: #b42318; --focus: #4f6fb0;
  --free-bg: #e7eef8; --busy-bg: repeating-linear-gradient(45deg, #edf0f5 0 6px, #e1e6ee 6px 12px);
}
[data-theme="juridico"] .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 64px 100%; }

[data-theme="masajista"] {
  --bg: #f5efe8; --bg-band: #e9dccf; --on-band: #3a2c25; --surface: #fffaf5; --surface-2: #f3eadf;
  --text: #3a2c25; --muted: #7c6a5f; --primary: #8a5a44; --on-primary: #fffaf4; --accent: #9aa88a;
  --border: #e3d6c8; --radius: 22px; --radius-lg: 30px; --shadow: 0 6px 24px rgba(138,90,68,.10);
  --font-body: "Segoe UI", "Helvetica Neue", sans-serif;
  --font-head: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; --head-weight: 400; --head-spacing: .02em;
  --ok: #6f8a5f; --warn: #b8864a; --danger: #a24c3c; --focus: #9aa88a;
  --free-bg: #eef0e4; --busy-bg: repeating-linear-gradient(45deg, #efe6db 0 6px, #e8ddcf 6px 12px);
}
[data-theme="masajista"] .hero-img { border-radius: 999px 999px 30px 30px; }

[data-theme="fisio"] {
  --bg: #eef7f6; --bg-band: #00796b; --on-band: #ffffff; --surface: #ffffff; --surface-2: #e8f4f2;
  --text: #0f2e2b; --muted: #4d6b67; --primary: #00796b; --on-primary: #ffffff; --accent: #ff7043;
  --border: #cfe5e1; --radius: 12px; --radius-lg: 16px; --shadow: 0 3px 12px rgba(0,121,107,.10);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 700; --head-spacing: -.01em;
  --ok: #00897b; --warn: #f57c00; --danger: #d84315; --focus: #ff7043;
  --free-bg: #dff3ef; --busy-bg: repeating-linear-gradient(45deg, #eef4f3 0 6px, #e2ecea 6px 12px);
}
[data-theme="fisio"] .hero { background-image: radial-gradient(circle at 85% 20%, rgba(255,255,255,.14) 0 120px, transparent 121px); }

[data-theme="consultor"] {
  --bg: #f3f5f8; --bg-band: #141b2d; --on-band: #eef1f8; --surface: #ffffff; --surface-2: #f0f3f8;
  --text: #141b2d; --muted: #5a6479; --primary: #2447d6; --on-primary: #ffffff; --accent: #12b886;
  --border: #dde2ec; --radius: 8px; --radius-lg: 12px; --shadow: 0 1px 2px rgba(20,27,45,.06), 0 10px 24px rgba(20,27,45,.06);
  --font-head: "Segoe UI", "Helvetica Neue", Arial, sans-serif; --head-weight: 700; --head-spacing: -.02em;
  --ok: #12b886; --warn: #f59f00; --danger: #e03131; --focus: #2447d6;
  --free-bg: #e6f7f1; --busy-bg: repeating-linear-gradient(45deg, #f0f2f6 0 6px, #e6e9ef 6px 12px);
}

[data-theme="gestoria"] {
  --bg: #f1f4f0; --bg-band: #1f4d3a; --on-band: #f1f5ef; --surface: #ffffff; --surface-2: #eef2ec;
  --text: #17241d; --muted: #58695f; --primary: #1f4d3a; --on-primary: #ffffff; --accent: #c29b40;
  --border: #d4ddd4; --radius: 4px; --radius-lg: 6px; --shadow: 0 1px 3px rgba(23,36,29,.08);
  --font-head: Georgia, "Times New Roman", serif; --head-weight: 700;
  --ok: #2f7d4e; --warn: #b7791f; --danger: #a8322a; --focus: #c29b40;
  --free-bg: #e3efe5; --busy-bg: repeating-linear-gradient(45deg, #eef1ec 0 6px, #e3e8e0 6px 12px);
  --bg-pattern: linear-gradient(rgba(31,77,58,.05) 1px, transparent 1px) 0 0 / 100% 28px;
}

[data-theme="peluqueria"] {
  --bg: #141414; --bg-band: #0a0a0a; --on-band: #f2ece4; --surface: #1e1e1e; --surface-2: #262626;
  --text: #f2ece4; --muted: #a79e92; --primary: #c8874a; --on-primary: #140c05; --accent: #e6d3b3;
  --border: #353535; --radius: 6px; --radius-lg: 8px; --shadow: 0 8px 24px rgba(0,0,0,.4);
  --font-head: Rockwell, "Rockwell Nova", "Arial Narrow", Georgia, serif; --head-weight: 700; --head-transform: uppercase; --head-spacing: .06em;
  --ok: #7fbf7f; --warn: #e0a24a; --danger: #e0584a; --focus: #c8874a;
  --free-bg: #22301f; --busy-bg: repeating-linear-gradient(45deg, #262626 0 6px, #1e1e1e 6px 12px);
}
[data-theme="peluqueria"] .hero { border-top: 8px solid; border-image: repeating-linear-gradient(-45deg, #b3261e 0 12px, #f2ece4 12px 24px, #1f4ea3 24px 36px, #f2ece4 36px 48px) 8; }

[data-theme="estetica"] {
  --bg: #fbf2f2; --bg-band: #f3dfe0; --on-band: #3b2328; --surface: #ffffff; --surface-2: #fbeeee;
  --text: #3b2328; --muted: #86656b; --primary: #b85c73; --on-primary: #ffffff; --accent: #d8a48f;
  --border: #efd9da; --radius: 16px; --radius-lg: 24px; --shadow: 0 8px 26px rgba(184,92,115,.10);
  --font-head: Didot, "Bodoni MT", "Bodoni 72", Georgia, serif; --head-weight: 400; --head-spacing: .03em;
  --ok: #5f9e7a; --warn: #c98a3c; --danger: #c0425a; --focus: #b85c73;
  --free-bg: #f2f6ef; --busy-bg: repeating-linear-gradient(45deg, #f7eaea 0 6px, #f0dfe0 6px 12px);
}

[data-theme="dentista"] {
  --bg: #f5fbfd; --bg-band: #e3f4f9; --on-band: #0c2a36; --surface: #ffffff; --surface-2: #eef8fb;
  --text: #0c2a36; --muted: #50707c; --primary: #0a8fb5; --on-primary: #ffffff; --accent: #34c3a1;
  --border: #d6ebf2; --radius: 14px; --radius-lg: 20px; --shadow: 0 4px 16px rgba(10,143,181,.08);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 600;
  --ok: #1fa37f; --warn: #d68a1a; --danger: #d64545; --focus: #34c3a1;
  --free-bg: #e2f6f1; --busy-bg: repeating-linear-gradient(45deg, #eef4f6 0 6px, #e4edf0 6px 12px);
}

[data-theme="veterinario"] {
  --bg: #fff8ef; --bg-band: #e07a1f; --on-band: #ffffff; --surface: #ffffff; --surface-2: #fff1e0;
  --text: #2f2418; --muted: #7a6653; --primary: #e07a1f; --on-primary: #ffffff; --accent: #3c8d5a;
  --border: #f1dcc3; --radius: 16px; --radius-lg: 22px; --shadow: 0 4px 0 #f1dcc3;
  --font-body: "Trebuchet MS", "Nunito", system-ui, sans-serif;
  --font-head: "Trebuchet MS", "Nunito", system-ui, sans-serif; --head-weight: 800;
  --ok: #3c8d5a; --warn: #d9861c; --danger: #d0453a; --focus: #3c8d5a;
  --free-bg: #e6f3e8; --busy-bg: repeating-linear-gradient(45deg, #fbeee0 0 6px, #f5e3cf 6px 12px);
  --bg-pattern: radial-gradient(circle, rgba(224,122,31,.07) 3px, transparent 3.5px) 0 0 / 34px 34px;
}

[data-theme="psicologo"] {
  --bg: #f4f2f8; --bg-band: #e7e2f1; --on-band: #26223a; --surface: #ffffff; --surface-2: #f1eef7;
  --text: #26223a; --muted: #6c6682; --primary: #6a5a9a; --on-primary: #ffffff; --accent: #8fb3a3;
  --border: #e2ddec; --radius: 18px; --radius-lg: 26px; --shadow: 0 6px 22px rgba(106,90,154,.08);
  --font-head: "Palatino Linotype", Palatino, Georgia, serif; --head-weight: 400; --head-spacing: .01em;
  --ok: #5c9a82; --warn: #b88a44; --danger: #b2556b; --focus: #8fb3a3;
  --free-bg: #e9f2ee; --busy-bg: repeating-linear-gradient(45deg, #f1eef6 0 6px, #e8e4f0 6px 12px);
}

[data-theme="nutricionista"] {
  --bg: #f4f9ef; --bg-band: #4c9a2a; --on-band: #ffffff; --surface: #ffffff; --surface-2: #eef6e7;
  --text: #1f2a19; --muted: #5d6c55; --primary: #4c9a2a; --on-primary: #ffffff; --accent: #f28c28;
  --border: #dbe8d1; --radius: 14px; --radius-lg: 20px; --shadow: 0 3px 12px rgba(76,154,42,.10);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.01em;
  --ok: #4c9a2a; --warn: #f28c28; --danger: #d64533; --focus: #f28c28;
  --free-bg: #e4f3da; --busy-bg: repeating-linear-gradient(45deg, #f0f4ec 0 6px, #e6ede0 6px 12px);
}

[data-theme="entrenador"] {
  --bg: #0d0d0d; --bg-band: #000000; --on-band: #f2f2f2; --surface: #171717; --surface-2: #1f1f1f;
  --text: #f2f2f2; --muted: #9a9a9a; --primary: #c6ff00; --on-primary: #0d0d0d; --accent: #ff3d00;
  --border: #2c2c2c; --border-w: 2px; --radius: 4px; --radius-lg: 6px; --shadow: none;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-head: Impact, "Arial Black", "Arial Narrow Bold", sans-serif; --head-weight: 400; --head-transform: uppercase; --head-spacing: .02em;
  --ok: #c6ff00; --warn: #ffb300; --danger: #ff3d00; --focus: #c6ff00;
  --free-bg: #1e2a07; --busy-bg: repeating-linear-gradient(45deg, #1f1f1f 0 6px, #171717 6px 12px);
}
[data-theme="entrenador"] .hero h1 { font-size: clamp(2.4rem, 8vw, 5rem); line-height: .95; }

[data-theme="fotografo"] {
  --bg: #1a1a1a; --bg-band: #111111; --on-band: #f5f5f5; --surface: #222222; --surface-2: #2a2a2a;
  --text: #eaeaea; --muted: #9b9b9b; --primary: #f5f5f5; --on-primary: #111111; --accent: #e0a526;
  --border: #333333; --radius: 0; --radius-lg: 0; --shadow: none;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-head: "Helvetica Neue", Helvetica, Arial, sans-serif; --head-weight: 300; --head-spacing: .04em;
  --ok: #7ccf8a; --warn: #e0a526; --danger: #e05a4a; --focus: #e0a526;
  --free-bg: #26311f; --busy-bg: repeating-linear-gradient(45deg, #2a2a2a 0 6px, #222222 6px 12px);
}
[data-theme="fotografo"] .gallery { gap: 2px; }
[data-theme="fotografo"] .gallery button { border-radius: 0; }

[data-theme="tatuador"] {
  --bg: #0b0b0b; --bg-band: #000000; --on-band: #ececec; --surface: #151515; --surface-2: #1c1c1c;
  --text: #ececec; --muted: #9a9a9a; --primary: #d7263d; --on-primary: #ffffff; --accent: #9a9a9a;
  --border: #2a2a2a; --border-w: 1px; --radius: 2px; --radius-lg: 2px; --shadow: 0 0 0 1px #2a2a2a;
  --font-head: "Old English Text MT", "UnifrakturMaguntia", Rockwell, Georgia, serif; --head-weight: 400;
  --ok: #7fbf7f; --warn: #d9a441; --danger: #ff4d5e; --focus: #d7263d;
  --free-bg: #1f2a1f; --busy-bg: repeating-linear-gradient(45deg, #1c1c1c 0 6px, #151515 6px 12px);
}

[data-theme="academia"] {
  --bg: #f5f8ff; --bg-band: #1d4ed8; --on-band: #ffffff; --surface: #ffffff; --surface-2: #eef3ff;
  --text: #111c3a; --muted: #56617f; --primary: #1d4ed8; --on-primary: #ffffff; --accent: #facc15;
  --border: #d8e1f7; --radius: 10px; --radius-lg: 14px; --shadow: 0 3px 0 #d8e1f7;
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 800;
  --ok: #16a34a; --warn: #ca8a04; --danger: #dc2626; --focus: #facc15;
  --free-bg: #e4f5ea; --busy-bg: repeating-linear-gradient(45deg, #eef2fb 0 6px, #e3e9f7 6px 12px);
  --bg-pattern: linear-gradient(90deg, rgba(29,78,216,.04) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(rgba(29,78,216,.04) 1px, transparent 1px) 0 0 / 24px 24px;
}
[data-theme="academia"] .btn-accent { color: #111c3a; }

[data-theme="inmobiliaria"] {
  --bg: #f4f6f9; --bg-band: #0f3057; --on-band: #ffffff; --surface: #ffffff; --surface-2: #eef2f7;
  --text: #132033; --muted: #56647a; --primary: #0f3057; --on-primary: #ffffff; --accent: #e8773a;
  --border: #d9e0ea; --radius: 8px; --radius-lg: 12px; --shadow: 0 2px 10px rgba(15,48,87,.08);
  --font-head: "Segoe UI", "Helvetica Neue", sans-serif; --head-weight: 700;
  --ok: #2e8b57; --warn: #e8773a; --danger: #c62828; --focus: #e8773a;
  --free-bg: #e5f2ea; --busy-bg: repeating-linear-gradient(45deg, #eef1f5 0 6px, #e4e8ee 6px 12px);
}
[data-theme="inmobiliaria"] .service .ph { aspect-ratio: 4/3; }

/* Grupos de temas en el panel */
.theme-group-title { margin: 1.5rem 0 .7rem; font-size: 1rem; }
.theme-card .pv .ico { font-size: 1.4rem; line-height: 1; }

/* Botón principal de la portada cuando el color principal coincide con el fondo de la portada */
.hero .btn-primary { background: var(--hero-btn-bg, var(--primary)); color: var(--hero-btn-fg, var(--on-primary)); border-color: var(--hero-btn-bg, var(--primary)); }
[data-theme="serio"], [data-theme="gestoria"], [data-theme="abogado"] { --hero-btn-bg: var(--accent); --hero-btn-fg: #1a1408; }
[data-theme="fisio"], [data-theme="nutricionista"], [data-theme="inmobiliaria"] { --hero-btn-bg: var(--accent); --hero-btn-fg: #ffffff; }
[data-theme="academia"] { --hero-btn-bg: var(--accent); --hero-btn-fg: #111c3a; }
[data-theme="juridico"], [data-theme="clinico"], [data-theme="veterinario"] { --hero-btn-bg: #ffffff; --hero-btn-fg: var(--primary); }

/* =========================================================
   ★ Diseño web — tema estrella
   Aurora animada de fondo, titular con degradado vivo, ventana de navegador
   que se "construye" sola, palabras que rotan y cinta de servicios.
   ========================================================= */
[data-theme="disenoweb"] {
  --bg: #0a0714; --bg-band: transparent; --on-band: #f4f1ff; --surface: rgba(255,255,255,.045); --surface-2: rgba(255,255,255,.07);
  --text: #f4f1ff; --muted: #a9a3c9; --primary: #8b5cf6; --on-primary: #ffffff; --accent: #22d3ee;
  --border: rgba(255,255,255,.1); --radius: 12px; --radius-lg: 20px; --shadow: 0 10px 40px rgba(0,0,0,.35);
  --font-body: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-head: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.035em;
  --ok: #34d399; --warn: #fbbf24; --danger: #fb7185; --focus: #22d3ee;
  --free-bg: rgba(52,211,153,.12); --busy-bg: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 6px, rgba(255,255,255,.06) 6px 12px);
  --grad: linear-gradient(100deg, #a78bfa 0%, #22d3ee 35%, #f472b6 70%, #a78bfa 100%);
}
[data-theme="disenoweb"] body { background: #0a0714; }
[data-theme="disenoweb"] body::before {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 20% 25%, rgba(139,92,246,.35), transparent 70%),
    radial-gradient(35% 30% at 80% 20%, rgba(34,211,238,.22), transparent 70%),
    radial-gradient(40% 40% at 60% 85%, rgba(244,114,182,.18), transparent 70%);
  filter: blur(20px); animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora { 0% { transform: translate3d(0,0,0) rotate(0deg); } 50% { transform: translate3d(3%,-2%,0) rotate(6deg); } 100% { transform: translate3d(-3%,2%,0) rotate(-4deg); } }
[data-theme="disenoweb"] .site-header { background: rgba(10,7,20,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
[data-theme="disenoweb"] .hero { padding: clamp(3rem, 9vw, 7rem) 0; }
[data-theme="disenoweb"] .hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem); line-height: .98; max-width: 14ch;
  background: var(--grad); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 9s linear infinite;
}
@keyframes gradShift { to { background-position: -250% 0; } }
[data-theme="disenoweb"] .btn-primary { background: linear-gradient(100deg, #8b5cf6, #22d3ee); border: 0; box-shadow: 0 8px 30px rgba(139,92,246,.45); }
[data-theme="disenoweb"] .btn-primary:hover { box-shadow: 0 10px 40px rgba(34,211,238,.55); transform: translateY(-1px); }
[data-theme="disenoweb"] .card, [data-theme="disenoweb"] .service, [data-theme="disenoweb"] .chat, [data-theme="disenoweb"] .modal { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
[data-theme="disenoweb"] .modal { background: #151126; }
[data-theme="disenoweb"] .service { position: relative; transition: transform .25s ease, box-shadow .25s ease; }
[data-theme="disenoweb"] .service::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad); opacity: 0; transition: opacity .25s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
[data-theme="disenoweb"] .service:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(139,92,246,.25); }
[data-theme="disenoweb"] .service:hover::before { opacity: 1; }
[data-theme="disenoweb"] .service .price { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="disenoweb"] .section h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
[data-theme="disenoweb"] .marquee-track span { font-size: clamp(1.6rem, 4vw, 3rem); color: transparent; -webkit-text-stroke: 1px rgba(244,241,255,.35); }
[data-theme="disenoweb"] .marquee-track span:nth-child(3n) { -webkit-text-stroke: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
[data-theme="disenoweb"] .process li::before { background: var(--grad); color: #0a0714; }

/* ----- Resto de profesiones nuevas ----- */
[data-theme="programador"] {
  --bg: #0d1117; --bg-band: #010409; --on-band: #e6edf3; --surface: #161b22; --surface-2: #1c232d;
  --text: #e6edf3; --muted: #8b949e; --primary: #3fb950; --on-primary: #04160a; --accent: #58a6ff;
  --border: #30363d; --radius: 6px; --radius-lg: 8px; --shadow: 0 0 0 1px #30363d;
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 700; --head-spacing: -.02em;
  --ok: #3fb950; --warn: #d29922; --danger: #f85149; --focus: #58a6ff;
  --free-bg: rgba(63,185,80,.14); --busy-bg: repeating-linear-gradient(45deg, #161b22 0 6px, #1c232d 6px 12px);
  --bg-pattern: radial-gradient(rgba(88,166,255,.07) 1px, transparent 1.4px) 0 0 / 18px 18px;
}
[data-theme="programador"] .hero h1::after { content: "_"; color: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
[data-theme="marketing"] {
  --bg: #fff7f2; --bg-band: #1e1b4b; --on-band: #ffffff; --surface: #ffffff; --surface-2: #fff1ea;
  --text: #1e1b2e; --muted: #625b78; --primary: #ff5a36; --on-primary: #ffffff; --accent: #6366f1;
  --border: #f2dfd6; --radius: 14px; --radius-lg: 20px; --shadow: 0 10px 30px rgba(30,27,75,.08);
  --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.03em;
  --ok: #16a34a; --warn: #f59e0b; --danger: #e11d48; --focus: #6366f1;
  --free-bg: #e9f7ee; --busy-bg: repeating-linear-gradient(45deg, #fbeee7 0 6px, #f5e2d8 6px 12px);
}
[data-theme="marketing"] .hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
[data-theme="arquitecto"] {
  --bg: #f4f6f8; --bg-band: #1f3b57; --on-band: #eef3f8; --surface: #ffffff; --surface-2: #eef2f5;
  --text: #16202b; --muted: #5b6977; --primary: #1f3b57; --on-primary: #ffffff; --accent: #d2691e;
  --border: #d6dee6; --radius: 0; --radius-lg: 0; --shadow: none; --border-w: 1px;
  --font-head: "Helvetica Neue", Arial, sans-serif; --head-weight: 300; --head-spacing: .06em; --head-transform: uppercase;
  --ok: #2e7d4f; --warn: #d2691e; --danger: #b42318; --focus: #d2691e;
  --free-bg: #e8f0e9; --busy-bg: repeating-linear-gradient(45deg, #eef1f4 0 6px, #e4e9ee 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #fff;
}
[data-theme="arquitecto"] .hero { background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; }
[data-theme="reformas"] {
  --bg: #f5f5f0; --bg-band: #0b5ed7; --on-band: #ffffff; --surface: #ffffff; --surface-2: #eef1f5;
  --text: #1b1f24; --muted: #59616b; --primary: #0b5ed7; --on-primary: #ffffff; --accent: #ffc107;
  --border: #dde1e6; --border-w: 2px; --radius: 6px; --radius-lg: 8px; --shadow: 0 3px 0 #dde1e6;
  --font-head: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; --head-weight: 800; --head-transform: uppercase;
  --ok: #198754; --warn: #ffc107; --danger: #dc3545; --focus: #ffc107;
  --free-bg: #e5f4ea; --busy-bg: repeating-linear-gradient(45deg, #f0f1f3 0 6px, #e5e7ea 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #1b1f24;
}
[data-theme="yoga"] {
  --bg: #f7f4ef; --bg-band: #e8e1d6; --on-band: #2b2a26; --surface: #fffdf9; --surface-2: #f3eee6;
  --text: #2b2a26; --muted: #726c62; --primary: #5e7c6b; --on-primary: #ffffff; --accent: #d99a6c;
  --border: #e6dfd3; --radius: 24px; --radius-lg: 32px; --shadow: 0 8px 28px rgba(94,124,107,.10);
  --font-head: "Palatino Linotype", Palatino, Georgia, serif; --head-weight: 400; --head-spacing: .02em;
  --ok: #5e7c6b; --warn: #c08a4a; --danger: #b25a4a; --focus: #d99a6c;
  --free-bg: #e8efe9; --busy-bg: repeating-linear-gradient(45deg, #f1ece4 0 6px, #e9e2d7 6px 12px);
}
[data-theme="coach"] {
  --bg: #fbf8f3; --bg-band: #1f1a14; --on-band: #fbf8f3; --surface: #ffffff; --surface-2: #f5efe6;
  --text: #1f1a14; --muted: #6f655a; --primary: #c2410c; --on-primary: #ffffff; --accent: #0f766e;
  --border: #eadfce; --radius: 8px; --radius-lg: 12px; --shadow: 0 2px 12px rgba(31,26,20,.07);
  --font-head: Georgia, "Times New Roman", serif; --head-weight: 700; --head-spacing: -.01em;
  --ok: #0f766e; --warn: #c2410c; --danger: #b91c1c; --focus: #0f766e;
  --free-bg: #e4f1ee; --busy-bg: repeating-linear-gradient(45deg, #f4ede2 0 6px, #ece3d4 6px 12px);
}
[data-theme="musica"] {
  --bg: #111018; --bg-band: #09080f; --on-band: #eeeaf5; --surface: #1a1824; --surface-2: #221f2e;
  --text: #eeeaf5; --muted: #9d97b0; --primary: #ff2e63; --on-primary: #ffffff; --accent: #08d9d6;
  --border: #2d2a3a; --radius: 10px; --radius-lg: 14px; --shadow: 0 10px 30px rgba(0,0,0,.4);
  --font-head: "Arial Black", "Segoe UI Black", system-ui, sans-serif; --head-weight: 900; --head-spacing: -.02em;
  --ok: #08d9d6; --warn: #ffb400; --danger: #ff2e63; --focus: #08d9d6;
  --free-bg: rgba(8,217,214,.12); --busy-bg: repeating-linear-gradient(45deg, #1a1824 0 6px, #221f2e 6px 12px);
}

/* =========================================================
   Temas IA 2030 · 2050 · Red neuronal · Holograma
   Toman el color de la profesión elegida (--prof-primary) y lo adaptan
   al fondo (más claro en temas oscuros, más oscuro en claros).
   ========================================================= */
[data-theme="ia2030"] {
  --bg: #f3f5ff; --bg-band: transparent; --on-band: #10132b; --surface: rgba(255,255,255,.72); --surface-2: rgba(240,243,255,.9);
  --text: #10132b; --muted: #5b6186;
  --primary: #5b5bf7; --primary: color-mix(in oklab, var(--prof-primary, #5b5bf7) 88%, #0b0d2a);
  --accent: #00c2a8; --accent: color-mix(in oklab, var(--prof-accent, #00c2a8) 85%, #0b0d2a);
  --on-primary: #ffffff; --border: rgba(91,97,134,.18); --radius: 14px; --radius-lg: 22px;
  --shadow: 0 1px 1px rgba(16,19,43,.04), 0 12px 40px rgba(16,19,43,.08);
  --font-body: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --head-weight: 700; --head-spacing: -.03em;
  --ok: #10b981; --warn: #f59e0b; --danger: #ef4444; --focus: var(--primary);
  --free-bg: rgba(16,185,129,.1); --busy-bg: repeating-linear-gradient(45deg, rgba(91,97,134,.06) 0 6px, rgba(91,97,134,.11) 6px 12px);
}
[data-theme="ia2030"] body { background: radial-gradient(60% 50% at 85% 0%, color-mix(in oklab, var(--prof-primary, #5b5bf7) 22%, transparent), transparent 70%), radial-gradient(50% 40% at 0% 30%, color-mix(in oklab, var(--prof-accent, #00c2a8) 16%, transparent), transparent 70%), #f3f5ff; background-attachment: fixed; }
[data-theme="ia2030"] .card, [data-theme="ia2030"] .service, [data-theme="ia2030"] .site-header { backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
[data-theme="ia2030"] .hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); }

[data-theme="ia2050"] {
  --bg: #04030c; --bg-band: transparent; --on-band: #ecebff; --surface: rgba(20,18,44,.66); --surface-2: rgba(30,27,62,.7);
  --text: #ecebff; --muted: #9a97c7;
  --primary: #b388ff; --primary: color-mix(in oklab, var(--prof-primary, #b388ff) 58%, #ffffff);
  --accent: #00e5ff; --accent: color-mix(in oklab, var(--prof-accent, #00e5ff) 60%, #ffffff);
  --on-primary: #07051a; --border: rgba(179,136,255,.22); --radius: 16px; --radius-lg: 24px;
  --shadow: 0 0 0 1px rgba(255,255,255,.04), 0 20px 60px rgba(0,0,0,.5);
  --font-body: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --head-weight: 200; --head-spacing: .01em;
  --ok: #5eead4; --warn: #fcd34d; --danger: #fb7185; --focus: var(--accent);
  --free-bg: rgba(94,234,212,.1); --busy-bg: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 6px, rgba(255,255,255,.05) 6px 12px);
}
[data-theme="ia2050"] body::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 35% at 25% 20%, color-mix(in oklab, var(--prof-primary, #7c4dff) 45%, transparent), transparent 70%),
              radial-gradient(35% 30% at 80% 70%, color-mix(in oklab, var(--prof-accent, #00e5ff) 30%, transparent), transparent 70%);
  filter: blur(30px); animation: aurora 26s ease-in-out infinite alternate;
}
[data-theme="ia2050"] .hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.2rem); background: linear-gradient(180deg, #fff, var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="ia2050"] .btn-primary { box-shadow: 0 0 30px color-mix(in oklab, var(--primary) 60%, transparent); }
[data-theme="ia2050"] .card, [data-theme="ia2050"] .service, [data-theme="ia2050"] .site-header { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
[data-theme="ia2050"] .modal { background: #110f26; }

[data-theme="neural"] {
  --bg: #070b14; --bg-band: transparent; --on-band: #e2e8f0; --surface: #0c1322; --surface-2: #111b2e;
  --text: #e2e8f0; --muted: #8190a8;
  --primary: #4ade80; --primary: color-mix(in oklab, var(--prof-primary, #4ade80) 55%, #ffffff);
  --accent: #60a5fa; --accent: color-mix(in oklab, var(--prof-accent, #60a5fa) 60%, #ffffff);
  --on-primary: #05080f; --border: #1c2a42; --radius: 6px; --radius-lg: 10px; --shadow: 0 0 0 1px #1c2a42;
  --font-body: "Segoe UI", system-ui, sans-serif; --font-head: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; --head-weight: 600; --head-spacing: -.01em;
  --ok: #4ade80; --warn: #fbbf24; --danger: #f87171; --focus: var(--accent);
  --free-bg: rgba(74,222,128,.1); --busy-bg: repeating-linear-gradient(45deg, #0c1322 0 6px, #111b2e 6px 12px);
  --bg-pattern: radial-gradient(color-mix(in oklab, var(--prof-primary, #4ade80) 30%, transparent) 1px, transparent 1.5px) 0 0 / 26px 26px;
}
[data-theme="holograma"] {
  --bg: #f6f4fb; --bg-band: transparent; --on-band: #1b1530; --surface: rgba(255,255,255,.75); --surface-2: rgba(246,242,255,.9);
  --text: #1b1530; --muted: #6a6285;
  --primary: #7c3aed; --primary: color-mix(in oklab, var(--prof-primary, #7c3aed) 85%, #1b1530);
  --accent: #ec4899; --on-primary: #ffffff; --border: rgba(124,58,237,.16); --radius: 18px; --radius-lg: 26px;
  --shadow: 0 12px 40px rgba(124,58,237,.10);
  --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; --head-weight: 700; --head-spacing: -.03em;
  --ok: #10b981; --warn: #f59e0b; --danger: #e11d48; --focus: var(--primary);
  --free-bg: rgba(16,185,129,.1); --busy-bg: repeating-linear-gradient(45deg, rgba(124,58,237,.05) 0 6px, rgba(124,58,237,.1) 6px 12px);
}
[data-theme="holograma"] body { background: conic-gradient(from 210deg at 70% 10%, #e0f2fe, #fce7f3, #ede9fe, #dcfce7, #e0f2fe); background-attachment: fixed; }
[data-theme="holograma"] .hero h1 { background: linear-gradient(90deg, var(--primary), #ec4899, #06b6d4, var(--primary)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 12s linear infinite; font-size: clamp(2.4rem, 6.5vw, 4.4rem); }
[data-theme="holograma"] .card, [data-theme="holograma"] .service, [data-theme="holograma"] .site-header { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.hero-badge { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; margin-bottom: 1rem; }

/* =========================================================
   Decoraciones animadas de la portada
   ========================================================= */
.hero-text { position: relative; z-index: 1; }
.hx { position: relative; width: 100%; max-width: 520px; justify-self: end; }
.hx-bar { display: flex; gap: .35rem; align-items: center; padding: .6rem .8rem; background: rgba(255,255,255,.06); border-bottom: 1px solid var(--border); }
.hx-bar i { width: .7rem; height: .7rem; border-radius: 50%; background: #ff5f57; }
.hx-bar i:nth-child(2) { background: #febc2e; } .hx-bar i:nth-child(3) { background: #28c840; }
.hx-url { margin-left: .8rem; flex: 1; font-size: .75rem; opacity: .7; padding: .2rem .7rem; border-radius: 999px; background: rgba(255,255,255,.08); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-browser { border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.35); transform: perspective(1200px) rotateY(-9deg) rotateX(4deg); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 50% { transform: perspective(1200px) rotateY(-6deg) rotateX(2deg) translateY(-8px); } }
.hx-page { padding: 1.1rem; display: grid; gap: .75rem; min-height: 290px; }
.hx-page img { width: 100%; border-radius: 10px; aspect-ratio: 16/10; object-fit: cover; }
.hx-nav { display: flex; gap: .5rem; justify-content: flex-end; }
.hx-nav b, .hx-line, .hx-block, .hx-cards b { display: block; border-radius: 8px; background: rgba(255,255,255,.1); transform-origin: left; animation: build 6s ease-in-out infinite; }
.hx-nav b { width: 42px; height: 8px; }
.hx-block { height: 110px; background: linear-gradient(120deg, color-mix(in oklab, var(--primary) 70%, transparent), color-mix(in oklab, var(--accent) 60%, transparent)); animation-delay: .3s; }
.hx-line { height: 10px; width: 80%; animation-delay: .6s; } .hx-line.s { width: 55%; animation-delay: .8s; }
.hx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.hx-cards b { height: 60px; animation-delay: 1s; } .hx-cards b:nth-child(2) { animation-delay: 1.2s; } .hx-cards b:nth-child(3) { animation-delay: 1.4s; }
@keyframes build { 0%, 8% { transform: scaleX(0); opacity: 0; } 22%, 85% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.hx-cursor { position: absolute; width: 18px; height: 18px; left: 70%; top: 70%; border-radius: 50% 50% 50% 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); transform: rotate(-45deg); animation: cursor 6s ease-in-out infinite; }
@keyframes cursor { 0% { left: 80%; top: 80%; } 30% { left: 30%; top: 45%; } 38% { transform: rotate(-45deg) scale(.8); } 42% { transform: rotate(-45deg) scale(1); } 70% { left: 62%; top: 82%; } 100% { left: 80%; top: 80%; } }
.hx-words { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; margin: -.2em 0 .6em; font-family: var(--font-head); }
.hx-rot { display: inline-block; color: var(--accent); border-bottom: 3px solid currentColor; }
.hx-rot.in { animation: wordIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes wordIn { from { opacity: 0; transform: translateY(.5em); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.hx-terminal { border-radius: 12px; overflow: hidden; background: #0b0f14; border: 1px solid var(--border); box-shadow: 0 25px 70px rgba(0,0,0,.45); }
.hx-term { margin: 0; padding: 1.1rem 1.2rem; min-height: 230px; color: #7ee787; font: .95rem/1.7 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }
.hx-term::after { content: "▋"; animation: blink 1s steps(1) infinite; }
.hx-chart svg { width: 100%; }
.hx-chart rect { fill: color-mix(in oklab, var(--on-band) 25%, transparent); transform-box: fill-box; transform-origin: bottom; animation: grow 1.2s cubic-bezier(.2,.8,.2,1) both; }
.hx-chart rect:last-child { fill: var(--primary); }
.hx-chart .trend { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2s 1s ease forwards; }
.hx-kpi { position: absolute; top: 0; right: 0; background: var(--primary); color: var(--on-primary); padding: .35rem .8rem; border-radius: 999px; font-weight: 800; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hx-wave { display: flex; align-items: center; gap: 5px; height: 220px; }
.hx-wave i { flex: 1; height: 30%; border-radius: 6px; background: linear-gradient(var(--primary), var(--accent)); animation: eq 1s ease-in-out infinite alternate; }
@keyframes eq { from { height: 12%; } to { height: 95%; } }
.hx-blueprint svg { width: 100%; }
.hx-blueprint path { fill: none; stroke: var(--on-band); stroke-width: 1.5; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 4s ease forwards; opacity: .85; }
.hx-blueprint path.dim { stroke: var(--accent); animation-delay: 2s; }
.hx-orbit { aspect-ratio: 1; max-width: 400px; display: grid; place-items: center; }
.hx-orbit .ring { position: absolute; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--primary) 40%, transparent); animation: spin 18s linear infinite; }
.hx-orbit .r1 { inset: 22%; } .hx-orbit .r2 { inset: 10%; animation-duration: 28s; animation-direction: reverse; } .hx-orbit .r3 { inset: 0; animation-duration: 40s; border-style: dashed; }
.hx-orbit .ring i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); top: -6px; left: calc(50% - 6px); }
.hx-orbit .ring i:nth-child(2) { top: auto; bottom: -6px; background: var(--primary); box-shadow: 0 0 16px var(--primary); }
.hx-orbit .ring i:nth-child(3) { top: calc(50% - 6px); left: -6px; }
.hx-orbit .core { width: 34%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(2.4rem, 6vw, 3.6rem);
  background: radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--primary) 70%, #fff), var(--primary)); box-shadow: 0 0 60px color-mix(in oklab, var(--primary) 60%, transparent), inset 0 0 30px rgba(255,255,255,.3); animation: pulseCore 3.5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseCore { 50% { transform: scale(1.06); box-shadow: 0 0 90px color-mix(in oklab, var(--primary) 70%, transparent), inset 0 0 30px rgba(255,255,255,.3); } }
@media (max-width: 760px) { .hx { justify-self: center; max-width: 420px; } .hx-browser { transform: none; animation: none; } }

/* Cinta de servicios y proceso */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 1rem 0; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; white-space: nowrap; color: var(--muted); }
.marquee-track span::after { content: "✦"; margin-left: 2.5rem; color: var(--accent); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; counter-reset: step; }
.process li { counter-increment: step; background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem; display: grid; gap: .3rem; box-shadow: var(--shadow); }
.process li::before { content: counter(step); width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: .4rem; }
.process li b { font-size: 1.1rem; font-family: var(--font-head); }
.process li span { color: var(--muted); font-size: .95rem; }

@media (prefers-reduced-motion: reduce) {
  .hx *, .hx, .marquee-track, [data-theme] body::before, .hero h1 { animation: none !important; }
  .hx-nav b, .hx-line, .hx-block, .hx-cards b { transform: none; opacity: 1; }
  .hx-chart .trend, .hx-blueprint path { stroke-dashoffset: 0; }
}

/* =========================================================
   Panel: resumen en directo, seguridad
   ========================================================= */
.live-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: .9rem; }
.live-bar .dot.on { animation: livePulse 2s infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent); } }
.stat.attention { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 35%, transparent); }
.next-up { border-left: 5px solid var(--primary); }
.appt-list li.fresh { animation: fresh 2.5s ease; border-radius: var(--radius); }
@keyframes fresh { 0%, 40% { background: color-mix(in srgb, var(--ok) 22%, transparent); } }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem .8rem; border-radius: var(--radius); background: var(--surface-2); }
.checklist li > span { font-weight: 800; }
.checklist li.ok > span { color: var(--ok); } .checklist li.ko > span { color: var(--danger); }
.score { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; padding: .2rem .8rem; border-radius: 999px; }
.score.ok { color: var(--ok); } .score.warn { color: var(--warn); } .score.bad { color: var(--danger); }
.theme-card.ia .pv { box-shadow: inset 0 0 40px rgba(255,255,255,.08); }
/* En móvil, el desenfoque de la cabecera atraparía la barra de pestañas fija: se sustituye por fondo sólido */
@media (max-width: 760px) {
  .site-header { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: var(--bg) !important; }
  .tabs { background: var(--bg); }
}

/* =========================================================
   Profesionales, instalación y notificaciones
   ========================================================= */
.pros { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.pro { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; padding: .8rem .5rem; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); transition: border-color .15s, box-shadow .15s, transform .1s; }
.pro:hover { transform: translateY(-2px); }
.pro.on { border-color: var(--pro, var(--primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pro, var(--primary)) 30%, transparent); }
.pro img, .pro-ini { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.pro-ini { display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; color: #fff; background: var(--pro, var(--primary)); }
.pro-ini.any { background: var(--surface-2); color: var(--accent); border: 2px dashed var(--border); }
.pro b { font-size: .92rem; } .pro small { color: var(--muted); font-size: .72rem; line-height: 1.25; }
.pro-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; }
.pro-tag::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--pro, var(--accent)); }
.pro-grid { display: grid; gap: .8rem; margin-top: 1rem; }
.pro-card { display: flex; gap: .9rem; align-items: center; padding: .8rem; border: 1px solid var(--border); border-left: 5px solid var(--pro); border-radius: var(--radius); background: var(--surface-2); flex-wrap: wrap; }
.pro-card.off { opacity: .6; }
.pro-card img, .pro-card .pro-ini { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--pro); }
.svc-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .2rem .8rem; }
.install-hero { display: flex; gap: .9rem; align-items: center; }
.install-hero img { border-radius: 14px; box-shadow: var(--shadow); }
.install-steps { counter-reset: st; list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .6rem; }
.install-steps li { counter-increment: st; display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: start; background: var(--surface-2); border-radius: var(--radius); padding: .6rem .7rem; }
.install-steps li::before { content: counter(st); width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 800; }
.install-banner { position: fixed; left: .8rem; right: .8rem; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 70; display: flex; gap: .7rem; align-items: center;
  padding: .7rem .8rem; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0,0,0,.25); animation: slideUp .35s ease; }
.install-banner img { border-radius: 10px; }
@keyframes slideUp { from { transform: translateY(120%); opacity: 0; } }
@media (min-width: 761px) { .install-banner { left: auto; width: 380px; bottom: 1.2rem; } }
.install-btn span { display: inline; }
@media (max-width: 480px) { .install-btn span { display: none; } }
.notif-inline { margin-top: .6rem; width: 100%; }
.admin-side #side-push, .admin-side #side-inst { font-weight: 600; }
.warn-text { color: var(--warn) !important; font-weight: 600; }
.dot.avail { background: var(--ok); opacity: .55; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.on { animation: livePulse 2.4s infinite; }

/* =========================================================
   Superficies que deben ser SIEMPRE opacas (menús, ventanas, barras)
   En los temas translúcidos (IA, Diseño web, Holograma, Futurista) el color
   de superficie es semitransparente: se pinta encima del fondo sólido del tema.
   ========================================================= */
.admin-side { background: linear-gradient(var(--bg-band), var(--bg-band)), linear-gradient(var(--surface), var(--surface)), var(--bg); }
.admin-topbar { background: linear-gradient(var(--surface), var(--surface)), var(--bg); }
.modal, .install-banner, .conv-list { background: linear-gradient(var(--surface), var(--surface)), var(--bg); }
.side-scrim { display: none; }
@media (max-width: 900px) {
  .admin-side { z-index: 90; width: min(300px, 85vw); padding-top: calc(1rem + env(safe-area-inset-top)); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); box-shadow: 8px 0 40px rgba(0,0,0,.25); }
  .admin-side:not(.open) { visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .admin-side.open { visibility: visible; transition: transform .2s; }
  .side-scrim { position: fixed; inset: 0; z-index: 85; background: rgba(8,10,20,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .side-scrim.show { display: block; }
  .admin-topbar { padding-top: calc(.6rem + env(safe-area-inset-top)); }
  body.no-scroll { overflow: hidden; }
}
.bulk-bar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .7rem; }
.bulk-bar .switch { margin: 0; }
table.data td:first-child, table.data th:first-child { width: 2rem; }
/* Vista previa del icono de la app */
.icon-previews { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: 1rem; border-radius: var(--radius); background: var(--surface-2); }
.ip-tab { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; min-width: 200px; background: #fff; color: #222; border-radius: 8px 8px 0 0; font: 13px system-ui, sans-serif; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.ip-tab span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ip-tab i { font-style: normal; opacity: .5; font-size: 11px; }
.ip-task { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; background: #202020; color: #fff; border-radius: 6px; font: 13px "Segoe UI", system-ui, sans-serif; }
.ip-home { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .6rem; border-radius: 14px; background: linear-gradient(135deg, #3b5bdb, #9c36b5); }
.ip-home img { border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.ip-home small { color: #fff; font: 11px system-ui, sans-serif; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.radio-line { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: .3rem 0; cursor: pointer; }
.radio-line input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }

/* =========================================================
   Profesiones añadidas: óptica, podología, logopedia, osteopatía, consulta médica,
   autoescuela, lavado de coches, peluquería canina, seguros, servicio técnico, bodas y viajes
   ========================================================= */
[data-theme="optica"] {
  --bg: #f4f8fb; --bg-band: #0b3d5c; --on-band: #ffffff; --surface: #ffffff; --surface-2: #edf4f9;
  --text: #0c2233; --muted: #4f6577; --primary: #0b6fa4; --on-primary: #ffffff; --accent: #f2b134;
  --border: #d5e3ee; --radius: 12px; --radius-lg: 18px; --shadow: 0 4px 18px rgba(11,61,92,.08);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 700;
  --ok: #1f9d6b; --warn: #d99000; --danger: #c0392b; --focus: #f2b134;
  --free-bg: #e2f2ec; --busy-bg: repeating-linear-gradient(45deg, #eef3f7 0 6px, #e3ebf1 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #0c2233;
}
[data-theme="optica"] .hero { background-image: radial-gradient(circle at 82% 50%, transparent 0 70px, rgba(255,255,255,.12) 71px 76px, transparent 77px), radial-gradient(circle at 66% 50%, transparent 0 70px, rgba(255,255,255,.12) 71px 76px, transparent 77px); }

[data-theme="podologia"] {
  --bg: #f3f9f7; --bg-band: #2a7f72; --on-band: #ffffff; --surface: #ffffff; --surface-2: #eaf5f2;
  --text: #13302b; --muted: #557069; --primary: #2a7f72; --on-primary: #ffffff; --accent: #f08a5d;
  --border: #d3e8e2; --radius: 14px; --radius-lg: 20px; --shadow: 0 3px 14px rgba(42,127,114,.10);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 700;
  --ok: #2a7f72; --warn: #d9822b; --danger: #c2453d; --focus: #f08a5d;
  --free-bg: #dff1ec; --busy-bg: repeating-linear-gradient(45deg, #eef4f2 0 6px, #e2ece9 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #fff;
}

[data-theme="logopeda"] {
  --bg: #fff8f1; --bg-band: #2e86ab; --on-band: #ffffff; --surface: #ffffff; --surface-2: #fff1e4;
  --text: #2b1d17; --muted: #75604f; --primary: #e4572e; --on-primary: #ffffff; --accent: #2e86ab;
  --border: #f3dfcc; --radius: 18px; --radius-lg: 26px; --shadow: 0 4px 0 #f3dfcc;
  --font-body: "Trebuchet MS", "Nunito", system-ui, sans-serif; --font-head: "Trebuchet MS", "Nunito", system-ui, sans-serif; --head-weight: 800;
  --ok: #2a9d8f; --warn: #e9a23b; --danger: #d64045; --focus: #2e86ab;
  --free-bg: #e3f4ef; --busy-bg: repeating-linear-gradient(45deg, #fbeadb 0 6px, #f5dfcb 6px 12px);
  --bg-pattern: radial-gradient(circle, rgba(228,87,46,.06) 6px, transparent 6.5px) 0 0 / 46px 46px;
}

[data-theme="osteopata"] {
  --bg: #f5f2ec; --bg-band: #46584a; --on-band: #f5f2ec; --surface: #fffdf8; --surface-2: #efebe2;
  --text: #1f241f; --muted: #636b62; --primary: #46584a; --on-primary: #ffffff; --accent: #c7a26b;
  --border: #e2dccf; --radius: 10px; --radius-lg: 16px; --shadow: 0 2px 12px rgba(31,36,31,.07);
  --font-head: "Palatino Linotype", Palatino, Georgia, serif; --head-weight: 400; --head-spacing: .02em;
  --ok: #557a5c; --warn: #b8863b; --danger: #a8483c; --focus: #c7a26b;
  --free-bg: #e5ece3; --busy-bg: repeating-linear-gradient(45deg, #efebe2 0 6px, #e6e1d5 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #1f241f;
}

[data-theme="medico"] {
  --bg: #f3f7fb; --bg-band: #1565c0; --on-band: #ffffff; --surface: #ffffff; --surface-2: #ebf2f9;
  --text: #0d2238; --muted: #4c6277; --primary: #1565c0; --on-primary: #ffffff; --accent: #00a3a3;
  --border: #d4e1ee; --radius: 10px; --radius-lg: 14px; --shadow: 0 2px 10px rgba(13,34,56,.07);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 600;
  --ok: #00897b; --warn: #c77700; --danger: #c62828; --focus: #00a3a3;
  --free-bg: #e0f3f2; --busy-bg: repeating-linear-gradient(45deg, #edf2f7 0 6px, #e2e9f1 6px 12px);
  --hero-btn-bg: #ffffff; --hero-btn-fg: #1565c0;
}

[data-theme="autoescuela"] {
  --bg: #fffdf3; --bg-band: #1d1d1b; --on-band: #ffffff; --surface: #ffffff; --surface-2: #fff7d6;
  --text: #1d1d1b; --muted: #5f5d55; --primary: #f5c400; --on-primary: #1d1d1b; --accent: #d62828;
  --border: #1d1d1b; --border-w: 2px; --radius: 6px; --radius-lg: 8px; --shadow: 4px 4px 0 #1d1d1b;
  --font-head: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; --head-weight: 900; --head-transform: uppercase; --head-spacing: .02em;
  --ok: #2b9348; --warn: #f5c400; --danger: #d62828; --focus: #d62828;
  --free-bg: #e7f5e6; --busy-bg: repeating-linear-gradient(45deg, #fff4c2 0 6px, #ffe98a 6px 12px);
}
[data-theme="autoescuela"] .hero { border-bottom: 14px solid #3a3a37; box-shadow: inset 0 -7px 0 -5px #3a3a37; position: relative; }
[data-theme="autoescuela"] .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 3px; background: repeating-linear-gradient(90deg, #fff 0 40px, transparent 40px 80px); }

[data-theme="lavadero"] {
  --bg: #eef8ff; --bg-band: #0077b6; --on-band: #ffffff; --surface: #ffffff; --surface-2: #e2f3fc;
  --text: #062a3a; --muted: #4b6b7c; --primary: #0096c7; --on-primary: #ffffff; --accent: #48cae4;
  --border: #cfe9f6; --radius: 16px; --radius-lg: 22px; --shadow: 0 6px 22px rgba(0,119,182,.12);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.01em;
  --ok: #06a77d; --warn: #f4a259; --danger: #e63946; --focus: #48cae4;
  --free-bg: #dff5ef; --busy-bg: repeating-linear-gradient(45deg, #e6f1f8 0 6px, #d8e9f3 6px 12px);
  --hero-btn-bg: #ffffff; --hero-btn-fg: #0077b6;
}
[data-theme="lavadero"] .hero { background-image: radial-gradient(circle at 80% 30%, rgba(255,255,255,.22) 0 18px, transparent 19px), radial-gradient(circle at 88% 62%, rgba(255,255,255,.16) 0 30px, transparent 31px), radial-gradient(circle at 70% 75%, rgba(255,255,255,.12) 0 12px, transparent 13px), radial-gradient(circle at 93% 20%, rgba(255,255,255,.18) 0 9px, transparent 10px); }

[data-theme="canina"] {
  --bg: #fff6fa; --bg-band: #ff7aa2; --on-band: #ffffff; --surface: #ffffff; --surface-2: #ffeef5;
  --text: #32202a; --muted: #7a5d6b; --primary: #e85d8e; --on-primary: #ffffff; --accent: #6cc4a1;
  --border: #f6d6e3; --radius: 20px; --radius-lg: 28px; --shadow: 0 5px 0 #f6d6e3;
  --font-body: "Trebuchet MS", "Nunito", system-ui, sans-serif; --font-head: "Trebuchet MS", "Nunito", system-ui, sans-serif; --head-weight: 800;
  --ok: #3fae84; --warn: #f0a04b; --danger: #d64550; --focus: #6cc4a1;
  --free-bg: #e2f6ee; --busy-bg: repeating-linear-gradient(45deg, #fdeaf1 0 6px, #f9dce7 6px 12px);
  --bg-pattern: radial-gradient(circle, rgba(232,93,142,.07) 3px, transparent 3.5px) 0 0 / 30px 30px;
  --hero-btn-bg: #ffffff; --hero-btn-fg: #e85d8e;
}

[data-theme="seguros"] {
  --bg: #f4f6f9; --bg-band: #12355b; --on-band: #ffffff; --surface: #ffffff; --surface-2: #edf1f6;
  --text: #101c2c; --muted: #536176; --primary: #12355b; --on-primary: #ffffff; --accent: #2fbf71;
  --border: #d7dee8; --radius: 8px; --radius-lg: 12px; --shadow: 0 2px 10px rgba(16,28,44,.07);
  --font-head: "Segoe UI", "Helvetica Neue", sans-serif; --head-weight: 700;
  --ok: #2fbf71; --warn: #e0a100; --danger: #c0392b; --focus: #2fbf71;
  --free-bg: #e2f5ea; --busy-bg: repeating-linear-gradient(45deg, #eef1f5 0 6px, #e3e8ee 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #fff;
}

[data-theme="tecnico"] {
  --bg: #0f1419; --bg-band: #070a0d; --on-band: #e6edf3; --surface: #161d24; --surface-2: #1d262f;
  --text: #e6edf3; --muted: #8a99a8; --primary: #00c2ff; --on-primary: #021018; --accent: #ffb703;
  --border: #2a3540; --radius: 8px; --radius-lg: 10px; --shadow: 0 0 0 1px #2a3540;
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 700; --head-spacing: -.01em;
  --ok: #3ddc97; --warn: #ffb703; --danger: #ff5a5f; --focus: #ffb703;
  --free-bg: rgba(61,220,151,.12); --busy-bg: repeating-linear-gradient(45deg, #161d24 0 6px, #1d262f 6px 12px);
  --bg-pattern: linear-gradient(rgba(0,194,255,.04) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(0,194,255,.04) 1px, transparent 1px) 0 0 / 22px 22px;
}

[data-theme="eventos"] {
  --bg: #fbf7f4; --bg-band: #2b2024; --on-band: #fbf1ec; --surface: #ffffff; --surface-2: #f6eee9;
  --text: #2b2024; --muted: #7d6a70; --primary: #b76e79; --on-primary: #ffffff; --accent: #d4af37;
  --border: #ecdcd5; --radius: 4px; --radius-lg: 6px; --shadow: 0 6px 24px rgba(43,32,36,.08);
  --font-head: Didot, "Bodoni MT", "Bodoni 72", Georgia, serif; --head-weight: 400; --head-spacing: .04em;
  --ok: #6a994e; --warn: #c9952b; --danger: #b23a48; --focus: #d4af37;
  --free-bg: #edf3e7; --busy-bg: repeating-linear-gradient(45deg, #f6eee9 0 6px, #efe3dc 6px 12px);
}
[data-theme="eventos"] .hero h1 { font-style: italic; }
[data-theme="eventos"] .hero .tagline::before, [data-theme="eventos"] .hero .tagline::after { content: " ✦ "; color: var(--accent); }

[data-theme="viajes"] {
  --bg: #f0f9fb; --bg-band: #006d77; --on-band: #ffffff; --surface: #ffffff; --surface-2: #e5f4f6;
  --text: #12303a; --muted: #4f6d76; --primary: #e76f51; --on-primary: #ffffff; --accent: #2a9d8f;
  --border: #cfe8ec; --radius: 16px; --radius-lg: 22px; --shadow: 0 6px 22px rgba(0,109,119,.10);
  --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.02em;
  --ok: #2a9d8f; --warn: #f4a261; --danger: #d1495b; --focus: #f4a261;
  --free-bg: #dff3ee; --busy-bg: repeating-linear-gradient(45deg, #e8f2f4 0 6px, #dbe9ec 6px 12px);
}
[data-theme="viajes"] .hero { background-image: linear-gradient(160deg, transparent 55%, rgba(255,255,255,.08) 55% 60%, transparent 60%), radial-gradient(circle at 85% 25%, #f4a26155 0 60px, transparent 61px); }

/* =========================================================
   Modo demo: «Simula tu web y pruébala»
   ========================================================= */
.demo-sim { position: relative; }
.demo-sim::before { content: ""; position: absolute; inset: 1rem -.5rem; z-index: -1; border-radius: calc(var(--radius-lg) + 8px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), color-mix(in srgb, var(--accent) 12%, transparent)); border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent); }
.demo-head { text-align: center; max-width: 640px; margin: 0 auto 1.2rem; }
.demo-head p { color: var(--muted); }
.demo-kicker { display: inline-block; padding: .25rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--primary); color: var(--on-primary); margin-bottom: .6rem; }
.demo-search { max-width: 420px; margin: 0 auto 1rem; }
.demo-search input { border-radius: 999px; padding: .65rem 1rem; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .55rem; max-height: 340px; overflow-y: auto; padding: .3rem; }
.demo-prof { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .4rem; cursor: pointer; text-align: center; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; border-top: 4px solid var(--c); transition: transform .12s, box-shadow .15s; }
.demo-prof:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.demo-prof .ico { font-size: 1.6rem; line-height: 1; }
.demo-prof b { font-size: .82rem; line-height: 1.2; }
.demo-prof.on { outline: 3px solid var(--c); outline-offset: 1px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.demo-styles { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; margin-top: 1rem; }
.demo-actions { justify-content: center; margin-top: 1.2rem; }
.demo-bar { position: sticky; top: 64px; z-index: 29; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--accent))); color: var(--on-primary); font-size: .9rem; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.demo-bar .container { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .45rem 0; }
.demo-bar .btn { background: rgba(255,255,255,.18); color: inherit; border-color: transparent; }
.demo-bar .btn-primary { background: var(--on-primary); color: var(--primary); }
.demo-fab { position: fixed; left: 1rem; bottom: 1.2rem; z-index: 60; display: inline-flex; gap: .4rem; align-items: center; padding: .7rem 1rem; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--on-primary); background: var(--primary); box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 45%, transparent); animation: fabIn .5s ease .8s both; }
@keyframes fabIn { from { transform: translateY(150%); } }
body:has(.install-banner) .demo-fab, body:has(.modal-back) .demo-fab { display: none; }
@media (max-width: 760px) {
  .demo-bar { top: 64px; font-size: .82rem; } .hide-sm { display: none; }
  .demo-fab { bottom: calc(86px + env(safe-area-inset-bottom)); left: .8rem; padding: .6rem .9rem; }
  .demo-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-height: 300px; }
}
.demo-ok { display: flex; gap: .9rem; align-items: center; padding: .9rem; border-radius: var(--radius); background: var(--free-bg); margin-bottom: .8rem; }
.demo-ok-ico { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 900; font-size: 1.3rem; animation: pop .45s ease; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.demo-list { list-style: none; padding: 0; display: grid; gap: .45rem; }

/* Tarjeta animada «Reserva online» (portadas sin imagen) */
.hx-booking { display: grid; place-items: center; }
.bk-card { width: min(340px, 100%); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 22px; padding: 1.1rem; box-shadow: 0 25px 60px rgba(0,0,0,.18); transform: rotate(-2deg); animation: floaty2 7s ease-in-out infinite; }
@keyframes floaty2 { 50% { transform: rotate(-1deg) translateY(-8px); } }
.bk-head { display: flex; gap: .7rem; align-items: center; margin-bottom: .9rem; }
.bk-head small { display: block; color: var(--muted); }
.bk-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.bk-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin-bottom: .8rem; }
.bk-days span { text-align: center; padding: .35rem 0; border-radius: 10px; background: var(--surface-2); line-height: 1.1; }
.bk-days small { display: block; font-size: .65rem; color: var(--muted); }
.bk-days .on { background: var(--primary); color: var(--on-primary); } .bk-days .on small { color: inherit; opacity: .8; }
.bk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.bk-slots i { font-style: normal; font-weight: 700; font-size: .85rem; text-align: center; padding: .45rem 0; border-radius: 10px; background: var(--free-bg); border: 1px solid var(--border); }
.bk-slots i.off { background: var(--busy-bg); color: var(--muted); text-decoration: line-through; }
.bk-slots i.pick { animation: pick 5s ease-in-out infinite; }
@keyframes pick { 0%, 25% { background: var(--free-bg); color: var(--text); } 35%, 100% { background: var(--primary); color: var(--on-primary); transform: scale(1.06); } }
.bk-ok { margin-top: .8rem; padding: .55rem .7rem; border-radius: 12px; background: var(--ok); color: #fff; font-weight: 700; font-size: .85rem; text-align: center; animation: okIn 5s ease-in-out infinite; }
@keyframes okIn { 0%, 40% { opacity: 0; transform: translateY(8px); } 50%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bk-card, .bk-slots i.pick, .bk-ok, .demo-fab { animation: none !important; } }

/* =========================================================
   Iconos vectoriales
   ========================================================= */
.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; stroke-width: 1.8; }
.ic-sm { width: .95em; height: .95em; }
.ic-ok { color: var(--ok); } .ic-bad { color: var(--danger); } .ic-warn { color: var(--warn); }
.ic-txt { font-size: 1.1em; }
.btn .ic { width: 1.1em; height: 1.1em; }
.btn-icon .ic { width: 1.25em; height: 1.25em; }
.admin-side nav button .ic { width: 1.2rem; height: 1.2rem; opacity: .85; }
.admin-side nav button[aria-current="page"] .ic { opacity: 1; }
.contact-list li { align-items: center; }
.contact-list .ic { color: var(--primary); width: 1.25rem; height: 1.25rem; }
.service .meta span { display: inline-flex; align-items: center; gap: .3rem; }
.service .ph.empty .ic { width: 3rem; height: 3rem; color: var(--primary); opacity: .8; stroke-width: 1.4; }
.chip .ic { width: 1rem; height: 1rem; margin-right: .15rem; }
.hero-badge .ic { color: var(--primary); }
.demo-prof .ico { color: var(--c); } .demo-prof .ico .ic { width: 1.8rem; height: 1.8rem; stroke-width: 1.6; }
.demo-kicker .ic, .demo-bar .ic { width: 1rem; height: 1rem; }
.demo-fab .ic { width: 1.15rem; height: 1.15rem; }
.demo-list li { display: flex; gap: .6rem; align-items: flex-start; }
.demo-list li > .ic { color: var(--primary); width: 1.3rem; height: 1.3rem; margin-top: .1rem; }
.demo-ok-ico .ic { width: 1.4rem; height: 1.4rem; stroke-width: 2.6; }
.bk-ico .ic { width: 1.6rem; height: 1.6rem; color: var(--primary); }
.bk-ok .ic { width: 1rem; height: 1rem; stroke-width: 2.6; }
.hx-orbit .core .ic { width: 42%; height: 42%; color: #fff; stroke-width: 1.6; }
.pro-ini.any .ic { width: 1.6rem; height: 1.6rem; }
.theme-card .pv .ico .ic { width: 1.5rem; height: 1.5rem; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .4rem; }
.icon-grid .btn { padding: .6rem; } .icon-grid .btn .ic { width: 1.4rem; height: 1.4rem; }
.icon-grid .btn[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }
.icon-pick .btn .ic { width: 1.3rem; height: 1.3rem; }
.checklist li > span .ic { width: 1.1rem; height: 1.1rem; stroke-width: 2.4; }
.checklist li.ok > span { color: var(--ok); } .checklist li.ko > span { color: var(--danger); }
.install-btn .ic, .account-btn .ic { width: 1.1rem; height: 1.1rem; }
.call-overlay .controls .ic { width: 1.3rem; height: 1.3rem; }
.ip-tab i .ic { width: .8rem; height: .8rem; }

/* =====================================================================
   ESTRUCTURAS DE PÁGINA (data-layout) — solo web pública (body.site)
   Cambian forma y composición; los colores los pone el tema.
   ===================================================================== */
.hero-extra { display: none; }
.hx-tile { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; text-decoration: none; color: var(--text); background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); }
.hx-tile > span .ic { width: 1.6rem; height: 1.6rem; color: var(--primary); }
.hx-tile b { font-family: var(--font-head); } .hx-tile small { color: var(--muted); }

/* ---------- Centrada ---------- */
@media (min-width: 761px) {
  [data-layout="centrado"] body.site .site-header .container { flex-direction: column; gap: .2rem; padding: .9rem 0 .5rem; position: relative; }
  [data-layout="centrado"] body.site .brand { font-size: 1.5rem; }
  [data-layout="centrado"] body.site .tabs { margin: 0; }
  [data-layout="centrado"] body.site .account-btn { position: absolute; right: 0; top: 1rem; }
  [data-layout="centrado"] body.site .install-btn { position: absolute; left: 0; top: 1rem; }
  [data-layout="centrado"] body.site .demo-bar { top: 112px; }
}
[data-layout="centrado"] body.site .hero .container { grid-template-columns: 1fr; text-align: center; justify-items: center; }
[data-layout="centrado"] body.site .hero h1, [data-layout="centrado"] body.site .hero p.tagline { margin-inline: auto; }
[data-layout="centrado"] body.site .hero .row { justify-content: center; }
[data-layout="centrado"] body.site .hero .hx { justify-self: center; max-width: 380px; }
[data-layout="centrado"] body.site .section > h2 { text-align: center; }
[data-layout="centrado"] body.site .about { grid-template-columns: 1fr; max-width: 760px; }
[data-layout="centrado"] body.site .chips { justify-content: center; }

/* ---------- Menú lateral ---------- */
@media (min-width: 1000px) {
  [data-layout="lateral"] body.site { padding-left: 260px; }
  [data-layout="lateral"] body.site .site-header { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; border-bottom: 0; border-right: var(--border-w, 1px) solid var(--border); z-index: 40; }
  [data-layout="lateral"] body.site .site-header .container { flex-direction: column; align-items: stretch; width: auto; height: 100%; padding: 1.6rem 1.1rem; gap: 1.4rem; }
  [data-layout="lateral"] body.site .brand { font-size: 1.35rem; flex-direction: column; align-items: flex-start; }
  [data-layout="lateral"] body.site .brand img { height: 56px; }
  [data-layout="lateral"] body.site .tabs { flex-direction: column; margin: 0; gap: .3rem; }
  [data-layout="lateral"] body.site .tab { justify-content: flex-start; padding: .8rem 1rem; font-size: 1.02rem; }
  [data-layout="lateral"] body.site .tab svg { width: 1.3rem; height: 1.3rem; }
  [data-layout="lateral"] body.site .account-btn { margin: auto 0 0; }
  [data-layout="lateral"] body.site .install-btn { order: 9; }
  [data-layout="lateral"] body.site .demo-bar { top: 0; }
  [data-layout="lateral"] body.site .demo-fab { left: 280px; }
}

/* ---------- Compacta ---------- */
[data-layout="compacta"] body.site .site-header .container, [data-layout="compacta"] body.site main .container, [data-layout="compacta"] body.site .site-footer .container { width: min(860px, 100% - 2rem); }
[data-layout="compacta"] body.site .site-header .container { min-height: 54px; }
[data-layout="compacta"] body.site .hero { padding: 1.8rem 0 1.4rem; background: var(--surface); color: var(--text); border-bottom: var(--border-w, 1px) solid var(--border); }
[data-layout="compacta"] body.site .hero .container { grid-template-columns: 1fr; }
[data-layout="compacta"] body.site .hero .hx, [data-layout="compacta"] body.site .hero .hero-img { display: none; }
[data-layout="compacta"] body.site .hero h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); max-width: none; background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
[data-layout="compacta"] body.site .hero .btn-outline { color: var(--text); }
[data-layout="compacta"] body.site .section { padding: 1.4rem 0; }
[data-layout="compacta"] body.site .about { grid-template-columns: 1fr; }
[data-layout="compacta"] body.site .services { grid-template-columns: 1fr; gap: .6rem; }
[data-layout="compacta"] body.site .service { flex-direction: row; align-items: stretch; }
[data-layout="compacta"] body.site .service .ph { width: 110px; aspect-ratio: auto; min-height: 100%; }
[data-layout="compacta"] body.site .service .ph.empty .ic { width: 2rem; height: 2rem; }
[data-layout="compacta"] body.site .service .body { padding: .8rem 1rem; }
[data-layout="compacta"] body.site .marquee, [data-layout="compacta"] body.site .demo-sim::before { display: none; }

/* ---------- Mosaico (bento) ---------- */
[data-layout="bento"] body.site .hero { background: transparent; color: var(--text); padding: 1.4rem 0 .6rem; }
[data-layout="bento"] body.site .hero .container { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); gap: 1rem; align-items: stretch; }
[data-layout="bento"] body.site .hero-text { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.4rem, 3vw, 2.4rem); border-radius: 30px; background: var(--primary); color: var(--on-primary); }
[data-layout="bento"] body.site .hero-text h1 { background: none; -webkit-text-fill-color: currentColor; color: inherit; }
[data-layout="bento"] body.site .hero-text .btn-primary { background: var(--on-primary); color: var(--primary); border-color: var(--on-primary); }
[data-layout="bento"] body.site .hero-text .btn-outline { color: var(--on-primary); }
[data-layout="bento"] body.site .hero .hx, [data-layout="bento"] body.site .hero .hero-img { grid-column: span 2; max-width: none; justify-self: stretch; border-radius: 30px; background: var(--surface-2); padding: 1rem; display: grid; place-items: center; overflow: hidden; }
[data-layout="bento"] body.site .hero .hx-browser, [data-layout="bento"] body.site .hero .hx-terminal { padding: 0; }
[data-layout="bento"] body.site .hero .bk-card { transform: none; animation: none; }
[data-layout="bento"] body.site .hero-extra { display: contents; }
[data-layout="bento"] body.site .hx-tile { border-radius: 26px; justify-content: flex-end; }
[data-layout="bento"] body.site .hx-tile-phone { display: none; }
[data-layout="bento"] body.site .services { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
[data-layout="bento"] body.site .service { border-radius: 26px; }
@media (min-width: 761px) { [data-layout="bento"] body.site .services .service:first-child { grid-column: span 2; } }
[data-layout="bento"] body.site .card { border-radius: 26px; }
@media (max-width: 760px) {
  [data-layout="bento"] body.site .hero .container { grid-template-columns: 1fr 1fr; }
  [data-layout="bento"] body.site .hero-text, [data-layout="bento"] body.site .hero .hx { grid-column: span 2; grid-row: auto; }
}

/* ---------- Revista ---------- */
[data-layout="revista"] body.site .site-header { border-bottom: 2px solid var(--text); }
[data-layout="revista"] body.site .brand { font-size: 1.55rem; letter-spacing: -.02em; }
[data-layout="revista"] body.site .hero { background: var(--bg); color: var(--text); padding: clamp(2rem, 6vw, 4rem) 0 2rem; border-bottom: 1px solid var(--text); }
[data-layout="revista"] body.site .hero .container { grid-template-columns: 1.7fr 1fr; align-items: end; gap: 2.5rem; }
[data-layout="revista"] body.site .hero h1 { font-size: clamp(3rem, 9vw, 7.5rem); line-height: .88; max-width: none; letter-spacing: -.045em; text-transform: none; background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
[data-layout="revista"] body.site .hero p.tagline { font-size: 1.25rem; font-style: italic; border-left: 3px solid var(--primary); padding-left: 1rem; }
[data-layout="revista"] body.site .hero .btn-outline { color: var(--text); }
[data-layout="revista"] body.site .hero .hx, [data-layout="revista"] body.site .hero .hero-img { display: none; }
[data-layout="revista"] body.site .hero-extra { display: grid; align-self: stretch; align-content: end; border-left: 1px solid var(--text); padding-left: 1.5rem; }
[data-layout="revista"] body.site .hx-tile { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: .9rem 0; }
[data-layout="revista"] body.site .section > h2 { font-size: clamp(2rem, 5vw, 3.4rem); border-bottom: 1px solid var(--text); padding-bottom: .4rem; letter-spacing: -.03em; }
[data-layout="revista"] body.site .services { grid-template-columns: 1fr; gap: 0; counter-reset: svc; }
[data-layout="revista"] body.site .service { flex-direction: row; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; background: none; counter-increment: svc; }
[data-layout="revista"] body.site .service::before { content: counter(svc, decimal-leading-zero); font-family: var(--font-head); font-size: 2.4rem; line-height: 1; color: var(--primary); padding: 1rem 1.4rem 0 0; }
[data-layout="revista"] body.site .service .ph { display: none; }
[data-layout="revista"] body.site .service .body { padding: 1rem 0; }
[data-layout="revista"] body.site .card { box-shadow: none; border-radius: 0; border-left: 0; border-right: 0; background: none; }
@media (max-width: 760px) { [data-layout="revista"] body.site .hero .container { grid-template-columns: 1fr; } [data-layout="revista"] body.site .hero-extra { border-left: 0; padding-left: 0; } }

/* ---------- Menú flotante ---------- */
[data-layout="flotante"] body.site .site-header { position: fixed; top: 12px; left: 0; right: 0; background: none; border: 0; pointer-events: none; }
[data-layout="flotante"] body.site .site-header .container { pointer-events: auto; width: max-content; max-width: calc(100% - 1.6rem); margin: 0 auto; min-height: 0; gap: .8rem; padding: .35rem .45rem .35rem 1.2rem;
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 12px 34px rgba(0,0,0,.14); }
[data-layout="flotante"] body.site .tab, [data-layout="flotante"] body.site .account-btn { border-radius: 999px; }
[data-layout="flotante"] body.site .hero { min-height: 86vh; display: flex; align-items: center; padding-top: 6rem; margin: 0 .7rem; border-radius: 0 0 44px 44px; }
[data-layout="flotante"] body.site .hero .container { width: min(1120px, 100% - 2rem); }
[data-layout="flotante"] body.site #view-citas > .container, [data-layout="flotante"] body.site #view-contacto > .container { padding-top: 5.5rem; }
[data-layout="flotante"] body.site .card, [data-layout="flotante"] body.site .service { border-radius: 26px; }
[data-layout="flotante"] body.site .demo-bar { position: fixed; top: auto; bottom: 1rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); border-radius: 999px; z-index: 45; }
[data-layout="flotante"] body.site .demo-bar .container { width: auto; padding: .35rem .6rem .35rem 1rem; }
@media (max-width: 760px) {
  [data-layout="flotante"] body.site .tabs { left: .8rem; right: .8rem; bottom: calc(.8rem + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-radius: 999px; padding: .25rem; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
  [data-layout="flotante"] body.site .hero { margin: 0; border-radius: 0 0 30px 30px; }
  [data-layout="flotante"] body.site .demo-bar { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* ---------- Relieve suave (neumorfismo) ---------- */
[data-layout="suave"] body.site { --nm-hi: color-mix(in srgb, var(--bg) 55%, #ffffff); --nm-lo: color-mix(in srgb, var(--bg) 78%, #000000); background: var(--bg); background-image: none; }
[data-layout="suave"] body.site :is(.card, .service, .cal-day, .slot, .chip, .pro, .demo-prof, .hx-tile, .chat, .hero-text) { background: var(--bg); border: 0; border-radius: 22px; box-shadow: 7px 7px 16px var(--nm-lo), -7px -7px 16px var(--nm-hi); }
[data-layout="suave"] body.site :is(.btn, .tab, input, select, textarea) { border: 0; border-radius: 16px; background: var(--bg); box-shadow: 4px 4px 10px var(--nm-lo), -4px -4px 10px var(--nm-hi); color: var(--text); }
[data-layout="suave"] body.site :is(input, select, textarea) { box-shadow: inset 3px 3px 7px var(--nm-lo), inset -3px -3px 7px var(--nm-hi); }
[data-layout="suave"] body.site .btn-primary { background: var(--primary); color: var(--on-primary); }
[data-layout="suave"] body.site :is(.btn, .tab, .chip, .slot):active, [data-layout="suave"] body.site :is(.tab[aria-selected="true"], .chip[aria-pressed="true"], .cal-day.selected, .pro.on) { box-shadow: inset 4px 4px 10px var(--nm-lo), inset -4px -4px 10px var(--nm-hi); }
[data-layout="suave"] body.site .site-header { background: var(--bg); border: 0; box-shadow: 0 6px 16px var(--nm-lo); }
[data-layout="suave"] body.site .hero { background: var(--bg); color: var(--text); padding: 2.5rem 0; }
[data-layout="suave"] body.site .hero-text { padding: 2.2rem; }
[data-layout="suave"] body.site .hero h1 { background: none; -webkit-text-fill-color: currentColor; color: var(--primary); }
[data-layout="suave"] body.site .hero .btn-outline { color: var(--text); }
[data-layout="suave"] body.site .cal-day.selected { color: var(--primary); }

/* ---------- Brutalista ---------- */
[data-layout="brutalista"] body.site { --radius: 0; --radius-lg: 0; --brut: var(--text); }
[data-layout="brutalista"] body.site h1, [data-layout="brutalista"] body.site h2, [data-layout="brutalista"] body.site .brand { font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; }
[data-layout="brutalista"] body.site .site-header { border-bottom: 4px solid var(--brut); }
[data-layout="brutalista"] body.site :is(.card, .service, .btn, .cal-day, .slot, .chip, .tab[aria-selected="true"], input, select, textarea, .pro, .demo-prof, .hx-tile, .chat, .bk-card) { border: 3px solid var(--brut) !important; border-radius: 0 !important; box-shadow: 6px 6px 0 var(--brut) !important; }
[data-layout="brutalista"] body.site :is(.btn, .slot, .chip, .demo-prof):hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--brut) !important; }
[data-layout="brutalista"] body.site .hero { border-bottom: 4px solid var(--brut); }
[data-layout="brutalista"] body.site .hero h1 { font-size: clamp(2.8rem, 10vw, 8rem); line-height: .85; max-width: none; }
[data-layout="brutalista"] body.site .hero .hx { transform: rotate(3deg); }
[data-layout="brutalista"] body.site .section > h2 { display: inline-block; background: var(--primary); color: var(--on-primary); padding: .25rem .7rem; border: 3px solid var(--brut); box-shadow: 6px 6px 0 var(--brut); }
[data-layout="brutalista"] body.site .services .service:nth-child(odd) { transform: rotate(-.8deg); }
[data-layout="brutalista"] body.site .services .service:nth-child(even) { transform: rotate(.8deg); }
[data-layout="brutalista"] body.site .service .price { background: var(--accent); color: #000; padding: 0 .4rem; }

/* ---------- Escritorio retro (ventanas de los 90) ---------- */
[data-layout="ventanas"] body.site { --radius: 0; --radius-lg: 0; --win-hi: #ffffff; --win-lo: #6b6b6b; --font-body: Tahoma, "MS Sans Serif", "Segoe UI", Verdana, sans-serif; --font-head: Tahoma, "MS Sans Serif", "Segoe UI", Verdana, sans-serif;
  background: color-mix(in srgb, var(--accent) 75%, #000); background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 4px 4px; }
[data-layout="ventanas"] body.site :is(.card, .service, .chat, .hero-text, .bk-card, .modal) { position: relative; background: var(--surface); border: 2px solid; border-color: var(--win-hi) var(--win-lo) var(--win-lo) var(--win-hi); box-shadow: 2px 2px 0 #000; border-radius: 0; padding-top: 0; }
[data-layout="ventanas"] body.site :is(.card, .service, .hero-text)::before { content: "_   ▢   ✕"; display: block; margin: 0 -1.25rem .9rem; padding: 0 .5rem; height: 24px; line-height: 24px; text-align: right; font: bold 12px/24px Tahoma, Verdana, sans-serif; color: #fff; letter-spacing: .1em; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #fff)); }
[data-layout="ventanas"] body.site .service::before { margin: 0; }
[data-layout="ventanas"] body.site .hero-text::before { margin: 0 -2rem 1.2rem; }
[data-layout="ventanas"] body.site :is(.btn, .tab, .chip, .slot, .cal-day, input, select, textarea) { border-radius: 0; border: 2px solid; border-color: var(--win-hi) var(--win-lo) var(--win-lo) var(--win-hi); box-shadow: 1px 1px 0 #000; }
[data-layout="ventanas"] body.site :is(.btn:active, .tab[aria-selected="true"], .chip[aria-pressed="true"], .cal-day.selected) { border-color: var(--win-lo) var(--win-hi) var(--win-hi) var(--win-lo); }
[data-layout="ventanas"] body.site .site-header { background: var(--surface-2); border-bottom: 2px solid var(--win-lo); box-shadow: inset 0 -2px 0 var(--win-hi); }
[data-layout="ventanas"] body.site .hero { background: transparent; color: var(--text); padding: 2rem 0; }
[data-layout="ventanas"] body.site .hero-text { padding: 0 2rem 1.6rem; }
[data-layout="ventanas"] body.site .hero h1 { background: none; -webkit-text-fill-color: currentColor; color: var(--text); text-transform: none; letter-spacing: 0; }
[data-layout="ventanas"] body.site .hero .btn-outline { color: var(--text); }
[data-layout="ventanas"] body.site .hero-extra { display: flex; gap: 1rem; grid-column: 1 / -1; flex-wrap: wrap; }
[data-layout="ventanas"] body.site .hx-tile { background: none; border: 0; color: #fff; align-items: center; text-align: center; width: 104px; padding: .4rem; text-shadow: 1px 1px 0 #000; }
[data-layout="ventanas"] body.site .hx-tile > span { background: var(--surface); padding: .5rem; border: 2px solid; border-color: var(--win-hi) var(--win-lo) var(--win-lo) var(--win-hi); }
[data-layout="ventanas"] body.site .hx-tile small { color: #f0f0f0; font-size: .7rem; }
[data-layout="ventanas"] body.site .section > h2, [data-layout="ventanas"] body.site .site-footer { color: #fff; text-shadow: 1px 1px 0 #000; }

/* ---------- Terminal ---------- */
[data-layout="terminal"] body.site { --font-body: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace; --font-head: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace; --radius: 0; --radius-lg: 0; font-size: 15px; }
[data-layout="terminal"] body.site h1, [data-layout="terminal"] body.site h2, [data-layout="terminal"] body.site h3 { text-transform: none; letter-spacing: 0; font-weight: 700; }
[data-layout="terminal"] body.site .hero h1 { background: none; -webkit-text-fill-color: currentColor; }
[data-layout="terminal"] body.site .hero h1::before { content: "> "; color: var(--primary); }
[data-layout="terminal"] body.site .hero h1::after { content: "_"; color: var(--primary); animation: blink 1s steps(1) infinite; }
[data-layout="terminal"] body.site .section > h2::before, [data-layout="terminal"] body.site .card > h3::before { content: "## "; color: var(--primary); }
[data-layout="terminal"] body.site .service h3::before { content: "$ "; color: var(--primary); }
[data-layout="terminal"] body.site :is(.card, .service, .chat, .hx-tile) { background: transparent; border: 1px dashed var(--muted); box-shadow: none; border-radius: 0; }
[data-layout="terminal"] body.site .service .ph { display: none; }
[data-layout="terminal"] body.site :is(.btn, .tab, .chip, input, select, textarea, .slot, .cal-day) { border-radius: 0; box-shadow: none; }
[data-layout="terminal"] body.site .hero .btn::before { content: "[ "; } [data-layout="terminal"] body.site .hero .btn::after { content: " ]"; }
[data-layout="terminal"] body.site .tab::before { content: "./"; opacity: .6; }
[data-layout="terminal"] body.site .tab svg { display: none; }
[data-layout="terminal"] body.site .hero { background: transparent; color: var(--text); border-bottom: 1px dashed var(--muted); padding: 2.4rem 0; }
[data-layout="terminal"] body.site .hero .btn-outline { color: var(--text); }
[data-layout="terminal"] body.site .hero .hx:not(.hx-terminal) { display: none; }
[data-layout="terminal"] body.site .site-header { border-bottom: 1px dashed var(--muted); }

/* ---------- Collage ---------- */
[data-layout="collage"] body.site { background-image: radial-gradient(color-mix(in srgb, var(--text) 12%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }
[data-layout="collage"] body.site :is(.card, .service) { position: relative; border: 0; border-radius: 3px; box-shadow: 0 10px 24px rgba(0,0,0,.14); transform: rotate(var(--r, -1deg)); overflow: visible; }
[data-layout="collage"] body.site .service { overflow: visible; }
[data-layout="collage"] body.site .service .ph { border-radius: 3px 3px 0 0; }
[data-layout="collage"] body.site :is(.card, .service)::after { content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%) rotate(-4deg); background: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,.4)); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
[data-layout="collage"] body.site .services .service:nth-child(3n+1) { --r: -2deg; } [data-layout="collage"] body.site .services .service:nth-child(3n+2) { --r: 1.6deg; } [data-layout="collage"] body.site .services .service:nth-child(3n) { --r: -.6deg; }
[data-layout="collage"] body.site .about .card:nth-child(2) { --r: 1.5deg; }
[data-layout="collage"] body.site .hero { background: transparent; color: var(--text); padding: 3rem 0 2rem; }
[data-layout="collage"] body.site .hero-text { background: var(--surface); padding: 2rem 2.2rem; transform: rotate(-1.5deg); box-shadow: 0 14px 34px rgba(0,0,0,.16); position: relative; }
[data-layout="collage"] body.site .hero h1 { display: inline; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--accent) 55%, transparent) 58%); -webkit-text-fill-color: currentColor; color: var(--text); line-height: 1.25; }
[data-layout="collage"] body.site .hero .btn-outline { color: var(--text); }
[data-layout="collage"] body.site .hero .hx { transform: rotate(3deg); }
[data-layout="collage"] body.site .hero-extra { display: flex; gap: 1rem; flex-wrap: wrap; grid-column: 1 / -1; }
[data-layout="collage"] body.site .hx-tile { background: #fff6a8; color: #3a3320; border: 0; border-radius: 2px; width: 190px; box-shadow: 0 8px 18px rgba(0,0,0,.15); transform: rotate(-2.5deg); }
[data-layout="collage"] body.site .hx-tile:nth-child(2) { background: #c8f1e4; transform: rotate(2deg); }
[data-layout="collage"] body.site .hx-tile:nth-child(3) { background: #ffd6e4; transform: rotate(-1deg); }
[data-layout="collage"] body.site .hx-tile small { color: #5a5440; } [data-layout="collage"] body.site .hx-tile > span .ic { color: #3a3320; }
@media (prefers-reduced-motion: reduce) { [data-layout] body.site * { transition: none !important; } }
/* Panel: estructuras y visitas */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.layout-card { display: flex; flex-direction: column; gap: .35rem; text-align: left; padding: .7rem; cursor: pointer; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--border); border-radius: 12px; }
.layout-card[aria-pressed="true"] { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 28%, transparent); }
.layout-card small { color: var(--muted); line-height: 1.3; }
.layout-thumb { width: 100%; aspect-ratio: 100 / 64; color: var(--primary); background: var(--surface-2); border-radius: 8px; padding: 6px; }
.stat-link { text-decoration: none; color: inherit; }
.live-pill { display: inline-block; background: var(--ok); color: #fff; border-radius: 999px; padding: 0 .45rem; font-weight: 700; }
.trend { font-weight: 700; font-size: .8rem; } .trend.up { color: var(--ok); } .trend.down { color: var(--danger); }
.vchart-wrap { overflow-x: auto; margin-top: .8rem; } .vchart { width: 100%; min-width: 520px; height: 220px; }
.vchart .bv, i.lg.bv { fill: color-mix(in srgb, var(--primary) 35%, transparent); background: color-mix(in srgb, var(--primary) 35%, transparent); }
.vchart .bu, i.lg.bu { fill: var(--primary); background: var(--primary); }
.vchart .vlab { font-size: 11px; fill: var(--muted); }
i.lg { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: -1px; margin-left: .6rem; }
.hbars { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.hbars li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars li i { height: .7rem; border-radius: 1rem; background: var(--primary); min-width: 3px; }
.hours-heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hours-heat div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hours-heat i { width: 100%; height: 34px; border-radius: 4px; background: var(--primary); }
.hours-heat small { font-size: .62rem; color: var(--muted); }
/* Revista: el titular gigante no debe estrechar la columna lateral */
[data-layout="revista"] body.site .hero .container { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); }
[data-layout="revista"] body.site .hero-text { min-width: 0; }
[data-layout="revista"] body.site .hero h1 { font-size: clamp(2.6rem, 7.5vw, 6.4rem); overflow-wrap: anywhere; }
[data-layout="brutalista"] body.site .hero h1 { overflow-wrap: anywhere; }
@media (max-width: 760px) { [data-layout="revista"] body.site .hero .container { grid-template-columns: 1fr; } }
.grid-2 > .card + .card, .grid-2 > .card { margin-top: 0; }
[data-layout="collage"] body.site .hero-badge, [data-layout="terminal"] body.site .hero-badge { display: flex; width: max-content; }

/* =========================================================
   Hostelería: restaurante, cafetería, bar de tapas, pizzería, pastelería, catering
   ========================================================= */
[data-theme="restaurante"] {
  --bg: #faf6f0; --bg-band: #2a1d18; --on-band: #f7efe4; --surface: #fffdf9; --surface-2: #f4ece1;
  --text: #2a1d18; --muted: #7a6558; --primary: #9c2f2f; --on-primary: #fff8ef; --accent: #c9a227;
  --border: #e8dccb; --radius: 6px; --radius-lg: 10px; --shadow: 0 4px 18px rgba(42,29,24,.08);
  --font-head: Georgia, "Times New Roman", serif; --head-weight: 400; --head-spacing: .01em;
  --ok: #4f7d3a; --warn: #c9822b; --danger: #b3261e; --focus: #c9a227;
  --free-bg: #eef1e1; --busy-bg: repeating-linear-gradient(45deg, #f4ece1 0 6px, #ebe0d0 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #2a1d18;
}
[data-theme="restaurante"] .hero h1 { font-style: italic; }
[data-theme="restaurante"] .hero { background-image: radial-gradient(circle at 85% 30%, rgba(201,162,39,.16) 0 120px, transparent 121px); }
[data-theme="restaurante"] .service .price { font-family: Georgia, serif; font-style: italic; }
[data-theme="cafeteria"] {
  --bg: #fbf6ef; --bg-band: #6f4e37; --on-band: #fff8ee; --surface: #fffdf9; --surface-2: #f6ecdf;
  --text: #2d2118; --muted: #7d6858; --primary: #6f4e37; --on-primary: #fff8ee; --accent: #e9a03b;
  --border: #ead9c4; --radius: 16px; --radius-lg: 22px; --shadow: 0 4px 16px rgba(111,78,55,.10);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.01em;
  --ok: #5d8a46; --warn: #e9a03b; --danger: #c0392b; --focus: #e9a03b;
  --free-bg: #eef3e3; --busy-bg: repeating-linear-gradient(45deg, #f6ecdf 0 6px, #eedfcc 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #2d2118;
}
[data-theme="tapas"] {
  --bg: #fff8ec; --bg-band: #c0392b; --on-band: #fffaf0; --surface: #ffffff; --surface-2: #fff0d9;
  --text: #2b1a12; --muted: #6f5644; --primary: #c0392b; --on-primary: #ffffff; --accent: #f1c40f;
  --border: #2b1a12; --border-w: 2px; --radius: 4px; --radius-lg: 6px; --shadow: 4px 4px 0 #2b1a12;
  --font-head: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; --head-weight: 900; --head-transform: uppercase; --head-spacing: .01em;
  --ok: #2e8b57; --warn: #e67e22; --danger: #c0392b; --focus: #f1c40f;
  --free-bg: #e8f5e6; --busy-bg: repeating-linear-gradient(45deg, #fff0d9 0 6px, #ffe4b8 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #2b1a12;
}
[data-theme="tapas"] .hero { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 28px, transparent 28px 56px); border-bottom: 8px solid var(--accent); }
[data-theme="pizzeria"] {
  --bg: #fffaf2; --bg-band: #c8102e; --on-band: #ffffff; --surface: #ffffff; --surface-2: #fdf1e3;
  --text: #2b1b14; --muted: #6c5649; --primary: #c8102e; --on-primary: #ffffff; --accent: #008c45;
  --border: #f1dfcb; --radius: 14px; --radius-lg: 20px; --shadow: 0 5px 18px rgba(200,16,46,.10);
  --font-body: "Trebuchet MS", "Segoe UI", sans-serif; --font-head: "Trebuchet MS", "Segoe UI", sans-serif; --head-weight: 800;
  --ok: #008c45; --warn: #e08a00; --danger: #c8102e; --focus: #008c45;
  --free-bg: #e2f4e9; --busy-bg: repeating-linear-gradient(45deg, #fdf1e3 0 6px, #f6e2cc 6px 12px);
  --hero-btn-bg: #ffffff; --hero-btn-fg: #c8102e;
}
[data-theme="pizzeria"] .hero { border-bottom: 10px solid; border-image: linear-gradient(90deg, #008c45 0 33.3%, #ffffff 33.3% 66.6%, #c8102e 66.6%) 10; }
[data-theme="pasteleria"] {
  --bg: #fff7f2; --bg-band: #f6e3d6; --on-band: #3a2618; --surface: #ffffff; --surface-2: #fdeee6;
  --text: #3a2618; --muted: #85695a; --primary: #b5651d; --on-primary: #ffffff; --accent: #e8a0bf;
  --border: #f1dccf; --radius: 20px; --radius-lg: 28px; --shadow: 0 6px 22px rgba(181,101,29,.10);
  --font-head: "Palatino Linotype", Palatino, Georgia, serif; --head-weight: 700; --head-spacing: .01em;
  --ok: #6a9b5a; --warn: #d08a3c; --danger: #c0455a; --focus: #e8a0bf;
  --free-bg: #eef5e7; --busy-bg: repeating-linear-gradient(45deg, #fdeee6 0 6px, #f8e0d4 6px 12px);
  --bg-pattern: radial-gradient(circle, rgba(232,160,191,.12) 4px, transparent 4.5px) 0 0 / 38px 38px;
}
[data-theme="catering"] {
  --bg: #f7f7f4; --bg-band: #2d4a3e; --on-band: #f3f1ea; --surface: #ffffff; --surface-2: #efeee8;
  --text: #1c2622; --muted: #5f6b65; --primary: #2d4a3e; --on-primary: #ffffff; --accent: #d4a24c;
  --border: #deddd4; --radius: 6px; --radius-lg: 10px; --shadow: 0 3px 14px rgba(28,38,34,.07);
  --font-head: "Segoe UI", "Helvetica Neue", sans-serif; --head-weight: 300; --head-spacing: .04em; --head-transform: uppercase;
  --ok: #3f7d5b; --warn: #c08a2c; --danger: #b3412f; --focus: #d4a24c;
  --free-bg: #e5efe8; --busy-bg: repeating-linear-gradient(45deg, #efeee8 0 6px, #e5e4dc 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #1c2622;
}

/* =========================================================
   Alérgenos, dietas y alergias (web y panel)
   ========================================================= */
.allergens { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.al-ic { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: color-mix(in srgb, var(--warn) 75%, var(--text)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.al-ic .ic { width: 1.1rem; height: 1.1rem; stroke-width: 1.7; }
.allergens.sm .al-ic { width: 1.4rem; height: 1.4rem; } .allergens.sm .al-ic .ic { width: .85rem; height: .85rem; }
.diets { display: flex; flex-wrap: wrap; gap: .3rem; }
.diet-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: color-mix(in srgb, var(--ok) 80%, var(--text)); }
.diet-badge .ic { width: .9rem; height: .9rem; }
.diet-badge.diet-picante { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: color-mix(in srgb, var(--danger) 80%, var(--text)); }
.service.is-unsafe { opacity: .55; }
.service.is-unsafe .ph { filter: grayscale(.8); }
.unsafe { font-size: .8rem; font-weight: 700; color: var(--danger); display: flex; gap: .3rem; align-items: center; }
.menu-tools { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.menu-tools .chip { display: inline-flex; align-items: center; gap: .3rem; }
.allergy-pill { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; padding: .18rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: color-mix(in srgb, var(--danger) 13%, var(--surface)); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.allergy-box { margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.allergy-box summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.allergy-box summary .ic { color: var(--warn); }
.allergy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .4rem; margin: .8rem 0; }
.allergy-grid.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.allergy-opt { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-weight: 500; margin: 0; }
.allergy-opt input { width: auto; flex: none; accent-color: var(--danger); }
.allergy-opt > .ic { width: 1.4rem; height: 1.4rem; color: color-mix(in srgb, var(--warn) 75%, var(--text)); flex: none; }
.allergy-opt span { display: flex; flex-direction: column; line-height: 1.15; } .allergy-opt small { color: var(--muted); font-size: .7rem; font-weight: 400; }
.allergy-opt:has(input:checked) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.shake { animation: shake .4s; } @keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.chart-wrap { overflow-x: auto; }
.al-chart { border-collapse: collapse; width: 100%; font-size: .85rem; }
.al-chart caption { text-align: left; font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .6rem; }
.al-chart th, .al-chart td { border: 1px solid var(--border); padding: .35rem; text-align: center; }
.al-chart thead th { vertical-align: bottom; font-size: .65rem; font-weight: 600; min-width: 46px; }
.al-chart thead th span .ic { width: 1.3rem; height: 1.3rem; color: color-mix(in srgb, var(--warn) 75%, var(--text)); display: block; margin: 0 auto .2rem; }
.al-chart tbody th { text-align: left; font-weight: 500; white-space: nowrap; }
.al-chart tr.cat th { background: var(--surface-2); font-weight: 700; }
.al-chart td.yes { color: var(--danger); font-weight: 900; background: color-mix(in srgb, var(--danger) 7%, transparent); }

/* Datos adicionales al reservar */
.extra-fields { margin-top: 1rem; padding: .8rem 1rem .2rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.req { color: var(--danger); }
.xsum { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.xsum b { color: var(--text); font-weight: 600; }
.xf-row { display: grid; grid-template-columns: 2fr 1.1fr 2fr auto auto; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.xf-row .switch { margin: 0; white-space: nowrap; }
@media (max-width: 760px) { .xf-row { grid-template-columns: 1fr 1fr; } }

/* Fitosanitaria y agroalimentaria */
[data-theme="fitosanitaria"] {
  --bg: #f3f7ef; --bg-band: #2f5d34; --on-band: #f3f8ee; --surface: #ffffff; --surface-2: #eaf2e3;
  --text: #1c2a17; --muted: #586a51; --primary: #3a7d2c; --on-primary: #ffffff; --accent: #e3b23c;
  --border: #d5e3cb; --radius: 10px; --radius-lg: 14px; --shadow: 0 3px 14px rgba(47,93,52,.09);
  --font-head: "Segoe UI", system-ui, sans-serif; --head-weight: 800; --head-spacing: -.01em;
  --ok: #3a7d2c; --warn: #d98e04; --danger: #b8432f; --focus: #e3b23c;
  --free-bg: #e2f0d9; --busy-bg: repeating-linear-gradient(45deg, #edf2e8 0 6px, #e1eadb 6px 12px);
  --hero-btn-bg: var(--accent); --hero-btn-fg: #1c2a17;
}
/* Surcos de cultivo en la portada */
[data-theme="fitosanitaria"] .hero { background-image: repeating-linear-gradient(-12deg, rgba(255,255,255,.06) 0 14px, transparent 14px 34px); border-bottom: 6px solid #6b4f2a; }
[data-theme="agroalimentaria"] {
  --bg: #fbf8ef; --bg-band: #1f4e3d; --on-band: #fbf6ea; --surface: #ffffff; --surface-2: #f5efdf;
  --text: #24261c; --muted: #66685a; --primary: #e07a2e; --on-primary: #ffffff; --accent: #4f8a3c;
  --border: #e9e0c9; --radius: 8px; --radius-lg: 12px; --shadow: 0 3px 14px rgba(36,38,28,.08);
  --font-head: "Segoe UI", "Helvetica Neue", sans-serif; --head-weight: 800;
  --ok: #4f8a3c; --warn: #e0a02e; --danger: #c0392b; --focus: #e07a2e;
  --free-bg: #e7f1dd; --busy-bg: repeating-linear-gradient(45deg, #f5efdf 0 6px, #ece3cc 6px 12px);
  --hero-btn-bg: var(--primary); --hero-btn-fg: #fff;
}
/* Cajas de fruta apiladas en la portada */
[data-theme="agroalimentaria"] .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.05) 2px, transparent 2px), linear-gradient(rgba(255,255,255,.05) 2px, transparent 2px); background-size: 46px 30px; border-bottom: 6px solid var(--primary); }
.xf-row [data-k="options"].hidden { display: block !important; visibility: hidden; }
@media (max-width: 760px) { .xf-row [data-k="options"].hidden { display: none !important; } }

/* Legal, puesta en marcha y crédito */
.legal-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; margin: .4rem 0; }
.legal-links a { color: var(--muted); }
.brand-credit { font-size: .78rem; opacity: .8; }
.legal-page article { max-width: 820px; margin: 0 auto; line-height: 1.7; }
.legal-page h2 { font-size: 1.2rem; margin-top: 1.6rem; }
.legal-form textarea { font-size: .85rem; line-height: 1.5; min-height: 14rem; }
.onboarding { border-left: 5px solid var(--accent); }
.ob-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.ob-list li { display: flex; align-items: center; gap: .6rem; padding: .35rem .2rem; border-bottom: 1px dashed var(--border); }
.ob-list li span { flex: 1; } .ob-list li .ic { color: var(--warn); } .ob-list li.ok { color: var(--muted); } .ob-list li.ok .ic { color: var(--ok); }
/* Panel del profesional */
.dim { opacity: .45; pointer-events: none; }
.pro-hello { border-left: 5px solid var(--primary); }
.perm-list { list-style: none; padding: 0; display: grid; gap: .45rem; } .perm-list li { display: flex; gap: .5rem; align-items: flex-start; }
.svc-adv { margin-top: .4rem; padding: .7rem 1rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.svc-adv summary { cursor: pointer; font-weight: 700; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.req-line { display: flex; gap: .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.attention-card { border-left: 5px solid var(--warn); }
.hours-edit .hours-row { display: grid; grid-template-columns: 7rem 1fr auto; gap: .6rem; align-items: start; padding: .55rem 0; border-bottom: 1px dashed var(--border); }
.hours-edit .hours-row b { padding-top: .45rem; }
.hours-edit .range { flex-wrap: nowrap; } .hours-edit .range input { min-width: 0; }
@media (max-width: 600px) { .hours-edit .hours-row { grid-template-columns: 1fr auto; } .hours-edit .hours-row .ranges { grid-column: 1 / -1; grid-row: 2; } .hours-edit .range input { width: 6.6rem; } }
.hours-edit .range input { width: 8.4rem; }
@media (max-width: 600px) { .hours-edit .range input { width: 7.2rem; } }
/* Galería de paletas y vista previa */
.pal-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .pal-layout { grid-template-columns: 1fr; } }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; max-height: 470px; overflow-y: auto; padding: .2rem; }
.pal-sw { display: flex; flex-direction: column; gap: .3rem; padding: .45rem; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.pal-sw b { font-size: .78rem; line-height: 1.2; } .pal-sw small { font-size: .65rem; color: var(--muted); }
.pal-sw .sw { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 5px; border-radius: 7px; height: 42px; border: 1px solid rgba(0,0,0,.08); }
.pal-sw .sw i { border-radius: 4px; } .pal-sw .sw i:first-child { grid-column: 1 / -1; }
.pal-sw .sw-none { display: grid; place-items: center; height: 42px; border-radius: 7px; background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); font-size: .75rem; color: var(--muted); }
.pal-sw[aria-pressed="true"] { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 28%, transparent); }
.pal-preview { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); }
.pp-band { background: var(--bg-band); color: var(--on-band); padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); }
.pp-band span { font-size: .8rem; opacity: .9; }
.pp-body { padding: 1rem; } .pp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; }
.pp-card b { font-family: var(--font-head); } .pp-card p { margin: .3rem 0; color: var(--text); } .pp-card small { color: var(--muted); }
.pp-btn { display: inline-block; margin-top: .6rem; padding: .45rem 1rem; border-radius: var(--radius); background: var(--primary); color: var(--on-primary); font-weight: 700; }
.pp-acc { display: inline-block; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); margin-top: .6rem; }
.pal-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem; margin: .7rem 0; }
.pal-color { display: flex; align-items: center; gap: .5rem; font-size: .82rem; margin: 0; padding: .3rem; border-radius: 8px; }
.pal-color input { width: 2.2rem; height: 2rem; padding: 0; border-radius: 6px; flex: none; }
.pal-color.custom { background: var(--surface-2); font-weight: 700; }
#pal-edit { margin-top: .8rem; } #pal-edit summary { cursor: pointer; font-weight: 700; display: flex; gap: .4rem; align-items: center; }

/* =========================================================
   Pedidos online
   ========================================================= */
.orders-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .orders-layout { grid-template-columns: 1fr; } }
.ocat { display: flex; align-items: center; gap: .5rem; margin: 1.4rem 0 .6rem; }
.ocat .ic { color: var(--primary); }
.oitem { display: flex; gap: .8rem; align-items: center; padding: .75rem; margin-bottom: .5rem; background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius); }
.oitem.in-cart { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent); }
.oitem img, .oimg { width: 64px; height: 64px; border-radius: calc(var(--radius) * .8); object-fit: cover; flex: none; }
.oimg { display: grid; place-items: center; background: var(--surface-2); color: var(--primary); } .oimg .ic { width: 1.6rem; height: 1.6rem; }
.oprice { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex: none; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.stepper button { width: 2.2rem; height: 2.2rem; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.stepper button:hover { background: var(--primary); color: var(--on-primary); }
.stepper span { min-width: 2rem; text-align: center; font-weight: 700; }
.cart { position: sticky; top: 84px; background: var(--surface); border: var(--border-w, 1px) solid var(--border); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow); }
.cart h3 { display: flex; gap: .4rem; align-items: center; margin-top: 0; }
.cart-lines { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .35rem; }
.cart-lines li { display: flex; justify-content: space-between; gap: .6rem; font-size: .92rem; }
.cart-total { display: flex; justify-content: space-between; padding: .45rem 0; border-top: 1px dashed var(--border); }
.cart-total.big { font-size: 1.15rem; }
.cart-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 55; display: none; align-items: center; gap: .5rem; padding: .75rem 1.2rem; border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary); font: inherit; box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: pointer; }
@media (max-width: 900px) { .cart-bar { display: inline-flex; } }
.order-track { border-left: 5px solid var(--primary); margin-bottom: 1rem; }
.otrack { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: .8rem 0; counter-reset: s; }
.otrack li { position: relative; text-align: center; font-size: .75rem; color: var(--muted); padding-top: 1.6rem; }
.otrack li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--border); font-weight: 700; }
.otrack li.done { color: var(--text); font-weight: 700; } .otrack li.done::before { background: var(--ok); border-color: var(--ok); color: #fff; content: "✓"; }
/* Tablero del panel */
.oboard { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; }
@media (max-width: 900px) { .oboard { grid-template-columns: 1fr; } }
.ocol { background: var(--surface-2); border-radius: var(--radius-lg); padding: .7rem; min-height: 120px; }
.ocol h3 { margin: .2rem .2rem .7rem; font-size: 1rem; display: flex; justify-content: space-between; }
.ocard { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--warn); border-radius: var(--radius); padding: .7rem .8rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.ocard.st-preparing { border-left-color: var(--primary); } .ocard.st-ready { border-left-color: var(--ok); }
.olines { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .15rem; } .olines i { color: var(--muted); }
.ocard select, .ocard input[type=time] { width: auto; padding: .3rem .5rem; font-size: .85rem; margin-top: .4rem; }
.badge.info { background: color-mix(in srgb, var(--primary) 15%, var(--surface)); color: var(--primary); }
.cart-bar { white-space: nowrap; max-width: calc(100% - 2rem); }
body:has(.cart-bar) .demo-fab { display: none; }
