/* ===== OnlyFlans · diseño negro + rojo (capa sobre style.css) ===== */
:root {
  --bg: #070708;
  --bg-2: #0e0e10;
  --card: rgba(255, 255, 255, 0.035);
  --card-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.10);
  --text-2: rgba(255, 255, 255, 0.70);
  --text-3: rgba(255, 255, 255, 0.45);
  --red: #e50914;
  --red-2: #ff2635;
  --red-dark: #9d0610;
  --red-soft: rgba(229, 9, 20, 0.16);
  --orange: var(--red);
  --orange-2: var(--red-2);
  --orange-soft: var(--red-soft);
  --radius: 18px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --s-entrenamiento: #e50914;
  --s-masaje: #ff6b6b;
  --s-nutricion: #3ddc97;
  --s-entrevista_personal: #9aa4b2;
  --s-entrevista_online: #c9a2ff;
  --s-rutina: #ffc145;
}

body {
  background:
    radial-gradient(900px 500px at 105% -10%, rgba(229, 9, 20, 0.16), transparent 60%),
    radial-gradient(700px 500px at -15% 30%, rgba(229, 9, 20, 0.07), transparent 60%),
    linear-gradient(180deg, #0c0c0e, #050506);
  background-attachment: fixed;
}

/* Tipografía estilo cartel: pesada, compacta, con palabra destacada en rojo cursiva */
h1, h2, .section-title, .card h3 { font-weight: 800; letter-spacing: -0.035em; }
h1 { font-size: 32px; line-height: 1.02; }
h1 em, h2 em, .accent-word { font-style: italic; color: var(--red); font-weight: 900; }
.eyebrow { color: var(--text-2); letter-spacing: 0.32em; font-size: 11px; font-weight: 600; }
.eyebrow b { color: var(--red); font-weight: 600; }

/* Cabecera con logo */
.topbar {
  background: linear-gradient(180deg, rgba(5, 5, 6, 0.95), rgba(5, 5, 6, 0.7));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 40px; width: auto; mix-blend-mode: lighten; flex: none; }
.brand .titles { min-width: 0; }
.brand h1 { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .brand img { height: 32px; } .brand h1 { font-size: 21px; } }

/* Botones */
.primary-btn, .icon-btn.accent {
  background: linear-gradient(180deg, var(--red-2), var(--red) 55%, var(--red-dark));
  box-shadow: 0 10px 28px rgba(229, 9, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fff;
}
.primary-btn { border-radius: 12px; font-weight: 700; }
.secondary-btn { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 12px; }
.secondary-btn:hover { border-color: rgba(255, 255, 255, 0.28); }
.link-btn { color: var(--red-2); }
.pill { background: var(--red-soft); color: #ff8088; }

/* Tarjetas */
.card, .client-card, .tarifa, .appt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.avatar { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; }
.stat b.accent, .client-total b { color: var(--red-2); }

/* Calendario */
.day.selected { background: var(--red); }
.day.today .num { color: var(--red-2); }
.day.closed .num { opacity: 0.35; }
.day.custom::after { content: ""; position: absolute; top: 5px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .7; }
.day { position: relative; }

/* Menú inferior */
.tabbar { background: rgba(12, 12, 14, 0.82); border-color: rgba(255, 255, 255, 0.10); }
.tabbar button.on, .tabbar a.on { color: var(--red-2); }
.tabbar.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tabbar.cols-6 { grid-template-columns: repeat(6, 1fr); width: min(600px, calc(100% - 16px)); padding: 6px; }
.tabbar.cols-6 button span { font-size: 10px; }

/* Chips de horas (disponibilidad y reservas) */
.horas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.hora-chip {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--text-3);
  border-radius: 10px; padding: 8px 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center;
}
.hora-chip.on { background: var(--red-soft); border-color: rgba(229, 9, 20, 0.6); color: #fff; }
.hora-chip.busy { text-decoration: line-through; opacity: .55; }
.hora-chip.media { font-size: 11px; }
.dispo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dispo-head small { color: var(--text-3); }
.semana-row { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; margin-bottom: 10px; }
.semana-row > b { padding-top: 8px; color: var(--text-2); }

/* Tarjetas de servicio con foto (como en el diseño) */
.svc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.svc-card {
  position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); min-height: 112px;
  padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; text-align: left;
  background: #111 var(--img) center / cover no-repeat; color: #fff; font: inherit;
}
.svc-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.85)); }
.svc-card > * { position: relative; }
.svc-card b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.svc-card small { color: var(--text-2); font-size: 12px; }
.svc-card.on { border-color: var(--red); box-shadow: 0 0 0 2px var(--red), 0 14px 30px rgba(229, 9, 20, 0.3); }

/* Desplegable de horas al tocar un día */
.desplegable {
  overflow: hidden; max-height: 0; opacity: 0; transition: max-height .35s ease, opacity .25s ease, margin .25s;
}
.desplegable.open { max-height: 520px; opacity: 1; margin-top: 14px; }
.desplegable .card { border-color: rgba(229, 9, 20, 0.45); }
.desplegable select { font-size: 18px; font-weight: 700; }

/* Planes y dietas */
.plan { margin-bottom: 12px; }
.plan h3 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.plan .desc { color: var(--text-2); margin: 0 0 10px; white-space: pre-line; }
.bloque { border-top: 1px solid var(--line); padding: 10px 0; }
.bloque b { display: block; color: var(--red-2); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.bloque p { margin: 0; white-space: pre-line; line-height: 1.5; }
.bloque-edit { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; background: rgba(255,255,255,.02); }
.bloque-edit .row { display: flex; gap: 8px; }
.bloque-edit .row input { flex: 1; }
.bloque-edit textarea { width: 100%; margin-top: 8px; min-height: 90px; }
.plan-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; cursor: pointer; background: rgba(255,255,255,.03); }
.plan-item .info { flex: 1; min-width: 0; }
.plan-item .info b { display: block; }
.plan-item .info small { color: var(--text-3); }
.plan-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-2); flex: none; }
.plan-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Tarifas para el cliente */
.tarifa-opcion { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); margin-bottom: 10px; cursor: pointer; width: 100%; text-align: left; font: inherit; color: inherit; }
.tarifa-opcion .info { flex: 1; }
.tarifa-opcion .info b { display: block; font-size: 16px; }
.tarifa-opcion .info small { color: var(--text-2); }
.tarifa-opcion .precio { text-align: right; }
.tarifa-opcion .precio b { font-size: 22px; font-weight: 800; }
.tarifa-opcion .precio small { display: block; color: var(--text-3); font-size: 12px; }
.tarifa-opcion.on { border-color: var(--red); background: var(--red-soft); }
.tarifa-opcion .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.tarifa-opcion.on .check { border-color: var(--red); background: radial-gradient(circle, var(--red) 45%, transparent 50%); }

/* ===== Portada de acceso (login / registro) como el diseño ===== */
body.auth { display: block; padding: 0; min-height: 100vh; }
main.auth-hero { max-width: none; margin: 0; }
.auth-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  padding: 40px clamp(16px, 5vw, 80px); background: #070708;
}
/* Foto a la derecha, fundida con el negro como en el diseño */
.auth-hero::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 62%;
  background: url("img/hero.c5f0a5ec041e.jpg") 22% center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}
.auth-hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(700px 500px at 85% 15%, rgba(229, 9, 20, .18), transparent 60%),
              linear-gradient(180deg, rgba(7,7,8,.15), rgba(7,7,8,.55));
}
.auth-hero .brand-big img { height: 64px; mix-blend-mode: lighten; }
.auth-hero .claim .eyebrow { margin: 34px 0 14px; display: block; }
.auth-hero .claim h1 { font-size: clamp(44px, 6vw, 76px); line-height: .95; letter-spacing: -0.045em; margin: 0 0 18px; }
.auth-hero .claim p { color: var(--text-2); font-size: 17px; line-height: 1.5; max-width: 470px; margin: 0; }
.auth-hero .servicios { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.auth-hero .servicios span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--text-2); background: rgba(0,0,0,.35); }
.auth-hero .auth-box { max-width: 400px; width: 100%; justify-self: end; text-align: left; }
.auth-box h2 { margin: 0 0 6px; font-size: 26px; }
.auth-card { background: rgba(10, 10, 12, 0.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.auth-foot { text-align: center; }
.auth-foot a, .auth-link { color: var(--red-2); }
@media (max-width: 860px) {
  .auth-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; align-content: start; }
  .auth-hero::before { width: 100%; height: 340px; bottom: auto; background-position: 30% top;
    -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent); mask-image: linear-gradient(180deg, #000 35%, transparent); }
  .auth-hero .claim .eyebrow { margin-top: 120px; }
  .auth-hero .auth-box { justify-self: stretch; max-width: none; }
  .auth-hero .claim h1 { font-size: 46px; }
}

/* Pequeños ajustes */
.contador .ring { background: conic-gradient(var(--red) calc(var(--p) * 1%), var(--card-strong) 0); }
.contador .ring b { background: #0e0e10; }
.hueco:hover { border-color: var(--red); }
.badge { background: var(--red); }
.toast { background: rgba(20, 20, 22, .95); border: 1px solid var(--line); }
.toast.error { border-color: rgba(229, 9, 20, .6); }
.mia .info b { text-transform: none; }
.mia .info b::first-letter { text-transform: uppercase; }
.badge[hidden] { display: none; }
.day.selected .num { color: #fff !important; }
.topbar .eyebrow { letter-spacing: 0.14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.desplegable h3::first-letter { text-transform: uppercase; }
.semana-row .horas-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 4px; }
.semana-row .hora-chip { font-size: 12px; padding: 6px 0; }
.bloque-edit input, .bloque-edit textarea {
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 10px 12px; font: inherit; font-size: 15px; outline: none;
}
.bloque-edit input:focus, .bloque-edit textarea:focus { border-color: rgba(229, 9, 20, .6); }
.bloque-edit .b-titulo { font-weight: 700; }

/* ===================================================== PANEL LATERAL (menú) */
.menu-btn { flex: none; margin-right: 4px; }
.topbar .brand { gap: 10px; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
  display: flex; flex-direction: column; gap: 4px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + var(--safe-b));
  background: var(--drawer-bg, #0c0c0e); border-right: 1px solid var(--line);
  box-shadow: 20px 0 50px rgba(0, 0, 0, .45);
  transform: translateX(-104%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.drawer-head img { height: 38px; mix-blend-mode: var(--logo-blend, lighten); }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.drawer-user b { display: block; font-size: 15px; }
.drawer-user small { color: var(--text-3); }
.drawer-sec { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin: 14px 8px 6px; font-weight: 700; }
.drawer-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px;
  background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none;
}
.drawer-item:hover { background: var(--card); }
.drawer-item.on { background: var(--red-soft); color: var(--red-2); }
.drawer-item svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drawer-item .grow { flex: 1; }
.drawer-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-foot form { margin: 0; }
.tema-row .switch { pointer-events: none; }

/* ===================================================== LOGROS */
.logro-hero { text-align: center; padding: 24px 16px; position: relative; overflow: hidden; }
.logro-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 50% 0%, rgba(229, 9, 20, .25), transparent 70%); pointer-events: none; }
.logro-hero > * { position: relative; }
.logro-hero .big { font-size: 44px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.logro-hero .big em { font-style: italic; color: var(--red); }
.logro-hero p { margin: 8px 0 0; color: var(--text-2); }
.insignias { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.insignia { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--card); text-align: center; }
.insignia .medalla {
  width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-strong); color: var(--text-3); font-size: 24px;
}
.insignia.ok .medalla { background: linear-gradient(160deg, #ff2635, #9d0610); color: #fff; box-shadow: 0 8px 22px rgba(229, 9, 20, .35); }
.insignia b { display: block; font-size: 14px; }
.insignia small { color: var(--text-3); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
.insignia .barra { height: 5px; border-radius: 3px; background: var(--card-strong); margin-top: 10px; overflow: hidden; }
.insignia .barra span { display: block; height: 100%; background: var(--red); }
.insignia:not(.ok) { opacity: .75; }

/* ===================================================== MODO DÍA */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f5;
  --bg-2: #ffffff;
  --petrol: #ffffff;
  --card: #ffffff;
  --card-strong: rgba(17, 17, 19, 0.07);
  --line: rgba(17, 17, 19, 0.11);
  --text: #111113;
  --text-2: rgba(17, 17, 19, 0.68);
  --text-3: rgba(17, 17, 19, 0.46);
  --red-2: #d80816;
  --red-soft: rgba(229, 9, 20, 0.09);
  --drawer-bg: #ffffff;
}
:root[data-theme="light"] body {
  color: var(--text);
  background: radial-gradient(900px 500px at 105% -10%, rgba(229, 9, 20, 0.08), transparent 60%), linear-gradient(180deg, #fafafa, #f1f1f2);
}
:root[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.86); border-bottom-color: var(--line); }
:root[data-theme="light"] .card, :root[data-theme="light"] .client-card, :root[data-theme="light"] .tarifa,
:root[data-theme="light"] .appt, :root[data-theme="light"] .plan-item, :root[data-theme="light"] .tarifa-opcion {
  background: #fff; box-shadow: 0 10px 30px rgba(17, 17, 19, 0.06);
}
:root[data-theme="light"] .tarifa-opcion.on { background: var(--red-soft); }
:root[data-theme="light"] .secondary-btn { color: var(--text); background: #fff; }
:root[data-theme="light"] .kv, :root[data-theme="light"] .day-chips label, :root[data-theme="light"] .svc-picker label,
:root[data-theme="light"] .select, :root[data-theme="light"] .field input, :root[data-theme="light"] .field select,
:root[data-theme="light"] .field textarea, :root[data-theme="light"] .bloque-edit input, :root[data-theme="light"] .bloque-edit textarea {
  background: #f6f6f7; color: var(--text);
}
:root[data-theme="light"] .svc-picker label { color: var(--text); }
:root[data-theme="light"] .tabbar { background: rgba(255, 255, 255, 0.9); border-color: var(--line); box-shadow: 0 14px 34px rgba(17, 17, 19, .12); }
:root[data-theme="light"] .sheet { background: #fff; box-shadow: 0 -10px 40px rgba(17, 17, 19, .15); }
:root[data-theme="light"] .sheet-grabber { background: rgba(17, 17, 19, .2); }
:root[data-theme="light"] .switch span { background: rgba(17, 17, 19, .16); }
:root[data-theme="light"] .switch input:checked + span { background: var(--red); }
:root[data-theme="light"] .toast { background: #111113; color: #fff; }
:root[data-theme="light"] .contador .ring b { background: #fff; }
:root[data-theme="light"] .hora-chip { background: #fff; }
:root[data-theme="light"] .hora-chip.on { color: var(--red-2); }
:root[data-theme="light"] .pill { color: var(--red-2); }
:root[data-theme="light"] .bloque-edit { background: #fafafa; }
:root[data-theme="light"] select option { background: #fff; color: var(--text); }
:root[data-theme="light"] .drawer { box-shadow: 20px 0 50px rgba(17, 17, 19, .15); }
/* En modo día el logo va sobre una placa oscura, con sus colores originales */
:root[data-theme="light"] .brand img, :root[data-theme="light"] .auth-hero .brand-big img,
:root[data-theme="light"] .drawer-head img { mix-blend-mode: normal; background: #121214; border-radius: 10px; padding: 3px 8px; box-sizing: content-box; }
:root[data-theme="light"] .auth-hero { background: #f4f4f5; }
:root[data-theme="light"] .auth-hero::after { background: linear-gradient(90deg, #f4f4f5 30%, rgba(244,244,245,.2) 60%, transparent); }
:root[data-theme="light"] .auth-card { background: rgba(255, 255, 255, .92); }
:root[data-theme="light"] .auth-hero .servicios span { background: rgba(255,255,255,.8); }
:root[data-theme="light"] .auth-err { color: #b00610; }
@media (max-width: 860px) { :root[data-theme="light"] .auth-hero::after { background: linear-gradient(180deg, transparent 0, rgba(244,244,245,.6) 200px, #f4f4f5 340px); } }
.svc-card small { color: rgba(255, 255, 255, .78); }
.svc-card b { color: #fff; }
.day.selected .num { opacity: 1 !important; }
.stat b.cap::first-letter { text-transform: uppercase; }
