/* =====================================================================
   BCN SURF SCHOOL — Sistema de diseño de la PWA
   Misma piel que la web nueva: paleta mediterránea clara + Montserrat/Inter.
   Organización en tarjetas (como el dashboard). Una sola fuente de
   verdad: todas las pantallas enlazan este archivo.
   ===================================================================== */
@import url('fonts/poppins.css');

:root {
  --turq: #5DCCB8;
  --turq-bright: #7DD9C6;
  --turq-deep: #4AB9A1;
  --navy: #3D6577;
  --ink: #0c2e3b;            /* titulares y anclas oscuras */
  --bg: #F5F1EB;             /* fondo arena */
  --bg-soft: #EDE5D8;
  --card: #FFFFFF;
  --text: #2E2E2E;
  --text-dim: #6B6B6B;
  --line: rgba(74, 124, 143, 0.16);
  --line-strong: rgba(74, 124, 143, 0.28);
  --shadow: 0 14px 34px -24px rgba(61, 101, 119, 0.45);
  --shadow-lg: 0 24px 50px -28px rgba(61, 101, 119, 0.50);
  --danger: #d8542f;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 50px;
  /* Tipografía de marca (misma pareja que la web de marketing):
     Montserrat 800 para titulares, Inter para texto. Las páginas que enlazan
     esta piel deben cargar ambas desde Google Fonts (display=swap). */
  --font-head: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font: var(--font-body); /* alias legado (configuracion.html y otros) */
}

* { box-sizing: border-box; }

body.app {
  margin: 0; padding: 0; min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(93, 204, 184, 0.14), transparent 60%),
    radial-gradient(100% 60% at 90% 110%, rgba(46, 139, 126, 0.12), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; }
.app h1, .app h2, .app h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.app a { color: inherit; text-decoration: none; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--turq-deep); }
.section-eyebrow { display: block; margin: 20px 6px 9px; }

/* ---------- Layout ---------- */
.app-wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 16px max(env(safe-area-inset-bottom, 24px), 24px); }
.app-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: max(env(safe-area-inset-top, 12px), 12px) 16px 12px;
  background: rgba(245, 241, 235, 0.82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.app-topbar .app-title { font-size: 19px; font-weight: 800; color: var(--ink); }

/* ---------- Botones ---------- */
.btn-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none; font-size: 16px; box-shadow: var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 13px; padding: 14px 18px;
  font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .12s, filter .15s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--turq); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.03); }
.btn-ghost { background: rgba(61, 101, 119, 0.08); color: var(--navy); border: 1px solid rgba(61, 101, 119, 0.16); }
.btn-danger { background: rgba(216, 84, 47, 0.10); color: var(--danger); border: 1px solid rgba(216, 84, 47, 0.22); }
.btn-block { width: 100%; }

/* ---------- Botones de marca (mismo CTA que la web de marketing) ----------
   .btn-brand      → pill turquesa, texto tinta, flecha opcional:
                       <button class="btn-brand">Reservar <span class="arrow">→</span></button>
   .btn-brand-sec  → variante secundaria transparente con borde navy.       */
.btn-brand,
.btn-brand-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: var(--radius-pill); padding: 15px 28px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  line-height: 1.2; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s, filter .15s, background .15s, box-shadow .15s;
}
.btn-brand { background: var(--turq); color: var(--ink); border: none; box-shadow: var(--shadow); }
.btn-brand:hover { filter: brightness(1.05); box-shadow: var(--shadow-lg); }
.btn-brand:active { transform: scale(.985); }
.btn-brand .arrow { font-weight: 700; transition: transform .15s; }
.btn-brand:hover .arrow { transform: translateX(3px); }
.btn-brand:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; filter: none; }
.btn-brand-sec { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-brand-sec:hover { background: rgba(61, 101, 119, 0.08); }
.btn-brand-sec:active { transform: scale(.985); }

/* ---------- Tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }

/* ---------- Filas de lista (Mi cuenta) ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); cursor: pointer; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > i.lead { color: var(--navy); font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 14px; font-weight: 600; color: var(--text); }
.list-row .lr-sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.list-row > i.chev { color: #9bbac4; font-size: 13px; }

/* ---------- Campos de formulario ---------- */
.campo { margin-bottom: 14px; }
.campo label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.campo input, .campo select, .campo textarea {
  width: 100%; box-sizing: border-box; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 13px;
  color: var(--text); font-family: var(--font); font-size: 14px; outline: none; transition: border-color .2s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--turq); }
.campo select option { background: #fff; color: var(--text); }
.campo input[type="range"] { padding: 0; border: none; background: transparent; accent-color: var(--turq); }
.dual-field { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Toggle ---------- */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row label { font-size: 13px; color: var(--text); font-weight: 500; }
.toggle-switch {
  appearance: none; -webkit-appearance: none; width: 44px; height: 24px; flex-shrink: 0;
  border-radius: 12px; background: rgba(61, 101, 119, 0.20); cursor: pointer; position: relative; transition: background .2s;
}
.toggle-switch:checked { background: var(--turq); }
.toggle-switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle-switch:checked::after { transform: translateX(20px); }

/* ---------- Pastillas / badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); }
.badge-turq { background: rgba(93, 204, 184, 0.18); color: var(--turq-deep); }
.badge-warn { background: rgba(216, 84, 47, 0.12); color: var(--danger); }

/* ---------- Segmented control (pestañas) ---------- */
.segmented { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px; box-shadow: var(--shadow); }
.segmented .seg { flex: 1; padding: 9px 8px; border-radius: var(--radius-pill); text-align: center; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-dim); -webkit-tap-highlight-color: transparent; transition: all .2s; }
.segmented .seg.active { background: var(--turq); color: var(--ink); }

/* ---------- Hoja inferior (bottom sheet) + X de cerrar ---------- */
.sheet-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(12, 46, 59, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); border-radius: 24px 24px 0 0; width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: sheetUp .3s cubic-bezier(.16, 1, .3, 1); padding-bottom: max(env(safe-area-inset-bottom, 20px), 20px); }
.sheet-grab { width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 9px auto 0; }
.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--card); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.btn-x { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: rgba(61, 101, 119, 0.10); border: 1px solid rgba(61, 101, 119, 0.14); color: var(--navy); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
.btn-x:hover { background: rgba(61, 101, 119, 0.16); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------- Toast ---------- */
#toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: all .25s; max-width: 320px; text-align: center; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--turq-deep); color: var(--ink); }

/* ---------- Loader ---------- */
.app-loader { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(245, 241, 235, 0.7); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.app-loader.show { display: flex; }
.app-loader .wave-bar { width: 6px; height: 34px; margin: 0 3px; border-radius: 10px; background: var(--turq-deep); animation: appwave 1.2s infinite ease-in-out; }
.app-loader .wave-bar:nth-child(2) { animation-delay: .1s; }
.app-loader .wave-bar:nth-child(3) { animation-delay: .2s; }
.app-loader .wave-bar:nth-child(4) { animation-delay: .3s; }
.app-loader .wave-bar:nth-child(5) { animation-delay: .4s; }
@keyframes appwave { 0%, 100% { transform: scaleY(.4); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }

.hidden { display: none !important; }
