/* ══════════════════════════════════════════════════════
   IBERFIT V7 · Frontend Premium — Design System
   Arquitecto: IBERFIT Team Senior
   ══════════════════════════════════════════════════════ */

/* ─── TOKENS ──────────────────────────────────────── */
:root {
  /* Brand */
  --green:         #1F3D2B;
  --green-dark:    #102018;
  --green-mid:     #2A5239;
  --green-light:   #3A6E4A;
  --gold:          #B8973A;
  --gold-light:    #F2E5B8;
  --gold-muted:    #D4AD60;
  --gold-subtle:   rgba(184,151,58,.12);
  --cream:         #F7F4EE;
  --cream-2:       #EDE9DF;
  --cream-3:       #E2DDD4;
  --white:         #FFFDF8;
  --ink:           #0F1E14;
  --muted:         #5C6960;
  --muted-light:   #94A09A;

  /* Semantic */
  --ok:      #2F6B45;
  --ok-bg:   rgba(47,107,69,.08);
  --ok-brd:  rgba(47,107,69,.16);
  --warn:    #8A6720;
  --warn-bg: #FFF8E8;
  --warn-brd:rgba(184,151,58,.24);
  --danger:  #8F2F2F;
  --err-bg:  #FFF0ED;
  --err-brd: rgba(143,47,47,.22);

  /* Surfaces */
  --line:    rgba(31,61,43,.10);
  --line-2:  rgba(31,61,43,.06);
  --scrim:   rgba(16,32,24,.55);

  /* Shadows */
  --sh-lg:   0 24px 64px rgba(16,32,24,.20);
  --sh-md:   0 6px 24px rgba(16,32,24,.09);
  --sh-sm:   0 2px 8px  rgba(16,32,24,.06);
  --sh-card: 0 1px 3px rgba(16,32,24,.06),0 4px 16px rgba(16,32,24,.05);

  /* Motion */
  --ease:    cubic-bezier(.22,.68,0,1.1);
  --ease-in: cubic-bezier(.4,0,1,1);
  --dur:     200ms;
  --dur-lg:  340ms;

  /* Layout */
  --app-max: 1280px;
  --sidebar: 240px;
  --header-h: 64px;
  --nav-h: 64px;
  --content-pad: 24px;
}

/* ─── RESET ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: linear-gradient(155deg, #243829 0%, #101f16 40%, #07100b 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1,h2,h3,h4,p { margin: 0; }
img { display: block; }
.hidden { display: none !important; }

/* ─── TYPOGRAPHY SCALE ────────────────────────────── */
.t-display {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.05;
}
.t-heading { font-size: 20px; font-weight: 700; letter-spacing: -.04em; line-height: 1.2; }
.t-title   { font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.t-body    { font-size: 14px; line-height: 1.6; color: var(--muted); }
.t-caption { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); }
.t-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

/* ─── NOSCRIPT ────────────────────────────────────── */
.noscript {
  margin: 20px; padding: 20px;
  border-radius: 18px;
  background: var(--cream);
}

/* ══════════════════════════════════════════════════
   ACCESS / LOGIN SCREEN
   ══════════════════════════════════════════════════ */
.access-screen {
  min-height: 100svh;
  display: flex;
  align-items: stretch;
}

/* LEFT PANEL — brand identity */
.access-brand {
  display: none; /* mobile: hidden */
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(165deg, var(--green-mid) 0%, var(--green-dark) 60%, #07100b 100%);
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
}

.access-brand::before {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,151,58,.16) 0%, transparent 68%);
  pointer-events: none;
}

.access-brand::after {
  content: "";
  position: absolute;
  bottom: 0; left: 44px; right: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,151,58,.35), transparent);
}

.brand-identity {
  position: relative; z-index: 1;
}

.brand-iso {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--green), #0e1a12);
  border: 1px solid rgba(184,151,58,.38);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

.brand-iso img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-identity h1 {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -.06em;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 12px;
}

.brand-identity .brand-subtitle {
  font-size: 14px;
  color: rgba(247,244,238,.65);
  line-height: 1.65;
  max-width: 320px;
}

.brand-pillars {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-pillar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.brand-pillar svg {
  width: 18px; height: 18px;
  stroke: var(--gold-muted);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.brand-pillar span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(247,244,238,.78);
}

/* RIGHT PANEL — login form */
.access-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--cream);
  min-height: 100svh;
}

/* Mobile brand header (only on small screens) */
.mobile-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 420px;
}

.mobile-brand-iso {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--green), var(--green-dark));
  border: 1px solid rgba(184,151,58,.30);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.mobile-brand-iso img {
  width: 38px; height: 38px;
  object-fit: contain;
}

.mobile-brand-text strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mobile-brand-text span {
  font-size: 11px;
  color: var(--muted-light);
  font-weight: 600;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 32px 28px;
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--green);
  margin-bottom: 6px;
}

.login-card > p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.field {
  margin-bottom: 16px;
}

.field:last-of-type { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--green);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  border: 1.5px solid rgba(31,61,43,.16);
  background: var(--cream);
  border-radius: 12px;
  padding: 13px 16px;
  outline: none;
  color: var(--ink);
  font-size: 15px;
  transition: border-color var(--dur), box-shadow var(--dur);
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31,61,43,.08);
  background: var(--white);
}

.field input::placeholder { color: var(--muted-light); }

.login-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-box {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--warn-bg);
  border: 1px solid var(--warn-brd);
  color: var(--warn);
  margin-top: 12px;
}

.status-box.error {
  background: var(--err-bg);
  border-color: var(--err-brd);
  color: var(--danger);
}

.status-box.success {
  background: var(--ok-bg);
  border-color: var(--ok-brd);
  color: var(--ok);
}

/* ─── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background var(--dur),
              opacity var(--dur);
  border: 0;
  cursor: pointer;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }

.btn-primary {
  background: var(--green);
  color: var(--cream);
  box-shadow: 0 3px 14px rgba(16,32,24,.20);
}
.btn-primary:hover { box-shadow: 0 5px 20px rgba(16,32,24,.28); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: rgba(31,61,43,.22); color: var(--green); }

.btn-link {
  background: transparent;
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
}
.btn-link:hover { color: var(--green); }

/* WhatsApp button */
.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #062A14;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur);
  width: 100%;
}
.btn-wa:hover { box-shadow: 0 4px 16px rgba(37,211,102,.32); }
.btn-wa:active { transform: scale(.97); }
.btn-wa svg { width: 18px; height: 18px; fill: #062A14; flex-shrink: 0; }

.btn-full { width: 100%; }

/* ══════════════════════════════════════════════════
   APP SHELL (authenticated)
   ══════════════════════════════════════════════════ */
.client-app {
  min-height: 100svh;
  background: var(--cream);
  max-width: var(--app-max);
  margin: 0 auto;
  box-shadow: var(--sh-lg);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ─── HEADER (mobile + tablet) ────────────────────── */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(247,244,238,.96);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.header-iso {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--green), var(--green-dark));
  border: 1px solid rgba(184,151,58,.28);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.header-iso img {
  width: 30px; height: 30px;
  object-fit: contain;
}

.header-brand strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  line-height: 1;
}

.header-brand .header-screen {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-light);
  margin-top: 3px;
  letter-spacing: .03em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.private-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(184,151,58,.09);
  border: 1px solid rgba(184,151,58,.22);
  border-radius: 999px;
  padding: 5px 10px;
}

.modality-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 10px;
}

.modality-badge.PRESENCIAL {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-brd);
}
.modality-badge.HIBRIDO {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-brd);
}
.modality-badge.ONLINE {
  color: #1a5c8a;
  background: rgba(26,92,138,.08);
  border: 1px solid rgba(26,92,138,.18);
}

/* ─── APP BODY ────────────────────────────────────── */
.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ─── SIDEBAR (desktop only) ──────────────────────── */
.app-sidebar {
  display: none; /* shown via @media desktop */
}

/* ─── MAIN CONTENT ────────────────────────────────── */
.app-main {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}

#screenContainer {
  padding: 20px 16px calc(var(--nav-h) + 20px);
}

/* ─── BOTTOM NAV (mobile + tablet) ───────────────── */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(var(--app-max), 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(247,244,238,.97);
  border-top: 1px solid var(--line-2);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
  padding: 9px 4px 7px;
  min-height: 52px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted-light);
  transition: color var(--dur), background var(--dur);
  position: relative;
}

.nav-btn .nav-ic {
  width: 22px; height: 22px;
  display: grid; place-items: center;
}

.nav-btn .nav-ic svg {
  width: 22px; height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--dur);
}

.nav-btn .nav-ic.ic-wa svg {
  fill: currentColor;
  stroke: none;
}

.nav-btn.active {
  color: var(--green);
  background: rgba(31,61,43,.07);
}

.nav-btn.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  border-radius: 999px;
  background: var(--gold);
}

/* ══════════════════════════════════════════════════
   SCREEN COMPONENTS
   ══════════════════════════════════════════════════ */

/* ─── HERO ────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, var(--green-mid) 0%, var(--green-dark) 100%);
  color: var(--cream);
  border-radius: 20px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero::before {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,151,58,.18) 0%, transparent 68%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero .eyebrow {
  color: var(--gold-light);
  margin-bottom: 6px;
}

.hero h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -.045em;
  color: var(--cream);
  line-height: 1.1;
}

.hero .hero-sub {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(247,244,238,.72);
  line-height: 1.6;
}

/* ─── CARDS ───────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: var(--sh-card);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -.025em;
  margin-bottom: 8px;
}

.card-body {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.card-body + .card-body { margin-top: 6px; }
.card-body b { color: var(--ink); font-weight: 600; }

/* ─── SECTION LABEL ───────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin: 20px 0 8px;
}

/* ─── METRIC CARDS ────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 13px;
  box-shadow: var(--sh-card);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-val {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1;
  color: var(--ink);
}

.metric-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .03em;
}

.metric-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  margin-top: 4px;
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-brd);
}

/* ─── SESSION CARDS ───────────────────────────────── */
.session-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: var(--sh-card);
}

.session-card + .session-card { margin-top: 10px; }

.session-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -.025em;
  margin-bottom: 5px;
}

.session-obj {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.session-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}

.pill-default { color: var(--green); background: rgba(31,61,43,.07); border: 1px solid rgba(31,61,43,.12); }
.pill-pub     { color: var(--ok);    background: var(--ok-bg);        border: 1px solid var(--ok-brd); }
.pill-dur     { color: var(--warn);  background: var(--warn-bg);       border: 1px solid var(--warn-brd); }
.pill-type    { color: #1a5c8a;      background: rgba(26,92,138,.07);  border: 1px solid rgba(26,92,138,.16); }
.pill-pres    { color: var(--ok);    background: var(--ok-bg);         border: 1px solid var(--ok-brd); }
.pill-online  { color: #1a5c8a;      background: rgba(26,92,138,.07);  border: 1px solid rgba(26,92,138,.16); }

/* ─── MODALITY BANNER ─────────────────────────────── */
.modality-banner {
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modality-banner.PRESENCIAL {
  background: var(--ok-bg);
  border: 1px solid var(--ok-brd);
}
.modality-banner.HIBRIDO {
  background: var(--warn-bg);
  border: 1px solid var(--warn-brd);
}
.modality-banner.ONLINE {
  background: rgba(26,92,138,.07);
  border: 1px solid rgba(26,92,138,.16);
}

.modality-banner svg {
  width: 18px; height: 18px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.modality-banner.PRESENCIAL svg { stroke: var(--ok); }
.modality-banner.HIBRIDO    svg { stroke: var(--warn); }
.modality-banner.ONLINE     svg { stroke: #1a5c8a; }

.modality-banner span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.modality-banner.PRESENCIAL span { color: var(--ok); }
.modality-banner.HIBRIDO    span { color: var(--warn); }
.modality-banner.ONLINE     span { color: #1a5c8a; }

/* ─── FORM ELEMENTS ───────────────────────────────── */
.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--green);
  margin-bottom: 7px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1.5px solid rgba(31,61,43,.16);
  background: var(--cream);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  color: var(--ink);
  font-size: 15px;
  transition: border-color var(--dur), box-shadow var(--dur);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31,61,43,.08);
  background: var(--white);
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted-light); }

.form-field textarea { min-height: 80px; resize: vertical; }

.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* RPE slider */
.rpe-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rpe-row input[type="range"] {
  flex: 1;
  height: 4px;
  border: 0;
  border-radius: 999px;
  accent-color: var(--green);
  background: var(--cream-3);
  padding: 0;
  cursor: pointer;
}

.rpe-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  min-width: 28px;
  text-align: right;
  letter-spacing: -.04em;
}

/* ─── TREND CHART ─────────────────────────────────── */
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 48px;
  margin: 12px 0 6px;
}

.trend-bars span {
  flex: 1;
  background: linear-gradient(to top, var(--green), var(--green-mid));
  border-radius: 4px 4px 0 0;
  opacity: .6;
  transition: opacity var(--dur);
}

.trend-bars span:last-child { opacity: 1; }

.trend-vals {
  font-size: 11px;
  color: var(--muted-light);
  font-weight: 600;
  letter-spacing: .02em;
}

/* ─── CHANNEL CARD ────────────────────────────────── */
.channel-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: var(--sh-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

/* ─── CHECK-IN CARD ───────────────────────────────── */
.checkin-card {
  background: linear-gradient(180deg, var(--white) 0%, #FFF8E8 100%);
  border: 1px solid var(--warn-brd);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: var(--sh-card);
}

.checkin-intro {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.58;
  margin-bottom: 16px;
}

.checkin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

/* ─── SCREEN ANIMATION ────────────────────────────── */
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen-enter { animation: screenIn 260ms var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET (≥ 680px)
   ══════════════════════════════════════════════════ */
@media (min-width: 680px) {
  .access-screen { justify-content: center; }
  .access-brand { display: none; }
  .access-form-wrap { flex: 0 1 520px; padding: 48px 44px; }
  .mobile-brand-header { display: flex; }

  #screenContainer { padding: 24px 22px calc(var(--nav-h) + 24px); }

  .metrics-grid { grid-template-columns: repeat(4, 1fr); }

  .screen-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 14px;
    align-items: start;
  }
  .screen-grid > .hero,
  .screen-grid > .section-label,
  .screen-grid > .modality-banner,
  .screen-grid > .metrics-grid { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — DESKTOP (≥ 1080px)
   Two-panel layout: sidebar + content
   ══════════════════════════════════════════════════ */
@media (min-width: 1080px) {
  .access-screen { justify-content: stretch; }
  .access-brand { display: flex; flex: 1; }
  .access-form-wrap { flex: 0 0 500px; max-width: none; padding: 60px 56px; }
  .mobile-brand-header { display: none; }

  /* Margin app card */
  .client-app {
    min-height: calc(100svh - 32px);
    margin: 16px auto;
    border-radius: 28px;
    overflow: hidden;
  }

  /* Hide mobile header, show sidebar */
  .app-header { display: none; }
  .bottom-nav { display: none; }

  /* App body = sidebar + main */
  .app-body { flex: 1; }

  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--green-dark) 0%, #07100b 100%);
    border-right: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    height: 100svh;
    overflow-y: auto;
  }

  .sidebar-brand {
    padding: 28px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
  }

  .sidebar-iso {
    width: 44px; height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--green-mid), var(--green-dark));
    border: 1px solid rgba(184,151,58,.32);
    display: grid; place-items: center;
    overflow: hidden;
    margin-bottom: 14px;
  }

  .sidebar-iso img {
    width: 34px; height: 34px;
    object-fit: contain;
  }

  .sidebar-brand strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--cream);
    line-height: 1;
    margin-bottom: 4px;
  }

  .sidebar-brand span {
    font-size: 11px;
    color: rgba(247,244,238,.45);
    font-weight: 600;
  }

  .sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .sidebar-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(247,244,238,.55);
    transition: color var(--dur), background var(--dur);
    text-align: left;
    width: 100%;
  }

  .sidebar-btn svg {
    width: 18px; height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    opacity: .7;
    transition: opacity var(--dur);
  }

  .sidebar-btn.ic-wa svg {
    fill: currentColor;
    stroke: none;
  }

  .sidebar-btn:hover {
    color: rgba(247,244,238,.85);
    background: rgba(255,255,255,.06);
  }

  .sidebar-btn.active {
    color: var(--cream);
    background: rgba(184,151,58,.14);
    border-left: 2px solid var(--gold);
    padding-left: 12px;
  }

  .sidebar-btn.active svg { opacity: 1; }

  .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
  }

  .sidebar-badge {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(184,151,58,.7);
    margin-bottom: 4px;
  }

  .sidebar-client {
    font-size: 12px;
    font-weight: 600;
    color: rgba(247,244,238,.6);
  }

  #screenContainer { padding: 32px 28px 40px; }

  .screen-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
    align-items: start;
  }
  .screen-grid > .hero,
  .screen-grid > .section-label,
  .screen-grid > .modality-banner,
  .screen-grid > .metrics-grid { grid-column: 1 / -1; }
}

/* ──────────────────────────────────────────────────
   MOBILE EDGE CASES
   ────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .access-form-wrap { padding: 24px 16px; }
  .login-card { padding: 24px 20px; border-radius: 20px; }
  .form-2col { grid-template-columns: 1fr; }
  .checkin-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .hero h2 { font-size: 20px; }
}
