﻿/* ===========================================================
   Simulador Licencia Tipo B y F — hoja de estilos
   Mobile first. Sin dependencias externas.
   =========================================================== */

:root {
  --blue-900: #062a63;
  --blue-800: #0a3f8f;
  --blue-700: #0d4fa8;
  --blue-600: #1565c0;
  --blue-500: #1f7ae0;
  --blue-400: #3f97f0;
  --green: #00b856;
  --green-soft: #e6f8ee;
  --red: #e53935;
  --red-soft: #fdecea;
  --pink: #ec2a72;
  --pink-2: #ff4f8b;
  --orange: #ef7d16;
  --orange-2: #ffa63d;
  --ink: #16202f;
  --ink-2: #33415a;
  --muted: #71809a;
  --line: #e5eaf2;
  --bg: #f1f4f9;
  --card: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 38, 72, .07), 0 1px 2px rgba(16, 38, 72, .05);
  --shadow: 0 6px 18px rgba(16, 38, 72, .09), 0 2px 6px rgba(16, 38, 72, .05);
  --shadow-lg: 0 18px 40px rgba(10, 40, 90, .18);
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-synthesis: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { font-size: 15px; line-height: 1.45; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }

#app {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 560px) {
  body { background: #dfe5ee; }
  #app {
    min-height: 100dvh;
    box-shadow: 0 0 0 1px rgba(16, 38, 72, .06), 0 24px 60px rgba(16, 38, 72, .14);
  }
}

/* ---------- screens ---------- */
.screen {
  position: relative;
  display: none;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
.screen.active { display: flex; }

.scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* =========================================================
   LOGIN
   ========================================================= */
#scr-login {
  background: linear-gradient(165deg, #2b84e6 0%, #1565c0 38%, #0b3f8f 100%);
  color: #fff;
  justify-content: center;
  padding: calc(24px + var(--safe-t)) 22px calc(24px + var(--safe-b));
}
.login-wrap { width: 100%; max-width: 380px; margin: 0 auto; }

.brand { text-align: center; margin-bottom: 26px; }
.brand-badge {
  width: 76px; height: 76px; margin: 0 auto 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
.brand h1 { font-size: 26px; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.4px; }
.brand p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .82); }

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.login-card h2 { margin: 0 0 4px; font-size: 17px; }
.login-card .hint { margin: 0 0 16px; font-size: 13px; color: var(--muted); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #f7f9fc;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--blue-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 122, 224, .12);
}
.field input.invalid { border-color: var(--red); background: var(--red-soft); }
.err { color: var(--red); font-size: 12.5px; margin: 6px 0 0; display: none; }
.err.show { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .12s, box-shadow .12s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn:disabled, .btn[disabled] { opacity: .42; pointer-events: none; }
.btn-primary {
  width: 100%;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 8px 20px rgba(21, 101, 192, .28);
}
.btn-primary:disabled { opacity: .55; box-shadow: none; }
.btn-ghost { background: #eef3fa; color: var(--blue-700); }
.btn-line { border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); }
.btn-danger { background: var(--red-soft); color: #b71c1c; }
.btn-block { width: 100%; }

.profiles { margin-top: 22px; }
.profiles h3 {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72); margin: 0 0 10px; font-weight: 700;
}
.profile-chip {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  text-align: left;
  transition: background .15s;
}
.profile-chip:active { background: rgba(255, 255, 255, .22); }
.profile-chip .pc-name { font-weight: 600; font-size: 14px; }
.profile-chip .pc-mail { font-size: 12px; color: rgba(255, 255, 255, .75); }
.profile-chip .avatar { width: 38px; height: 38px; font-size: 14px; }

.avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #ffffff, #d8e6f7);
  color: var(--blue-700);
  font-weight: 800;
  font-size: 20px;
  flex: none;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   HOME
   ========================================================= */
.hero {
  position: relative;
  padding: calc(8px + var(--safe-t)) 16px 16px;
  background: linear-gradient(160deg, #2f8ceb 0%, #1a6cd0 45%, #0b4695 100%);
  color: #fff;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 26px rgba(11, 70, 149, .25);
  flex: none;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  transition: background .15s;
}
.icon-btn:active { background: rgba(255, 255, 255, .16); }
.hero-user { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.hero-user .avatar { width: 68px; height: 68px; font-size: 22px; }
.hero-hello { font-size: 25px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.hero-sub { font-size: 12.5px; color: rgba(255, 255, 255, .8); margin-top: 3px; }

.stats-row { display: flex; gap: 8px; margin-top: 13px; }
.stat-pill {
  flex: 1 1 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .2);
  font-weight: 700;
  font-size: 15px;
}
.stat-pill svg { flex: none; opacity: .95; }
.stat-pill span { font-variant-numeric: tabular-nums; }

/* summary cards */
.cards { padding: 14px 14px 0; display: grid; gap: 10px; }
.sum-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 14px 0;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform .12s;
  overflow: hidden;
}
.sum-card:active { transform: scale(.99); }
.sum-card h3 { margin: 0 0 4px; font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.sum-meta { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; }
.sum-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  flex: none;
}
.sum-bar {
  grid-column: 1 / -1;
  height: 8px;
  background: #edf0f5;
  overflow: hidden;
  display: flex;
  margin: 13px -14px 0;
}
.sum-bar i { display: block; height: 100%; transition: width .5s ease; }
.sum-bar .ok { background: linear-gradient(90deg, #00c463, #00a854); }
.sum-bar .bad { background: linear-gradient(90deg, #ff6b9d, #ec2a72); }

/* action tiles */
.tiles {
  padding: 12px 14px 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 0.86;
  border-radius: 18px;
  padding: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .14s, box-shadow .14s;
}
.tile:active { transform: scale(.975); }
.tile .tile-ico {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  width: 100%;
  opacity: .96;
}
.tile h4 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.15; letter-spacing: -.2px; }
.tile small { font-size: 11.5px; opacity: .85; margin-top: 3px; }
.tile[data-tile="exam"] { background: linear-gradient(160deg, #4aa8f7, #1565c0 62%, #0d4fa8); }
.tile[data-tile="practice"] { background: linear-gradient(160deg, #1b6ec8, #0e4a91 70%); }
.tile[data-tile="wrong"] { background: linear-gradient(160deg, #ff4f8b, #e01f68 70%); }
.tile[data-tile="marked"] { background: linear-gradient(160deg, #ffab4a, #f07d0e 70%); }
.tile .badge-count {
  position: absolute;
  top: 10px; right: 10px;
  min-width: 26px; height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .22);
  font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.tile .badge-count:empty { display: none; }
.tile .wave {
  position: absolute;
  left: 0; right: 0;
  bottom: 58px;
  height: 18px;
  opacity: .35;
}

.home-foot { padding: 4px 16px calc(22px + var(--safe-b)); text-align: center; }
.home-foot p { margin: 0; font-size: 11.5px; color: var(--muted); }

/* =========================================================
   APP BAR (quiz / stats / history)
   ========================================================= */
.appbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + var(--safe-t)) 8px 8px;
  background: linear-gradient(160deg, #2b84e6, #0d4fa8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(11, 70, 149, .2);
  z-index: 2;
}
.appbar h2 { flex: 1 1 auto; margin: 0; font-size: 16px; font-weight: 700; text-align: center; letter-spacing: -.1px; }
.appbar .spacer { width: 44px; flex: none; }
.appbar .icon-btn { color: #fff; }

.chip-timer {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-weight: 800; font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.chip-timer.warn { background: #ffe9a8; color: #7a4c00; }
.chip-timer.danger { background: #ffd0d0; color: #96111a; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .62; } }

/* =========================================================
   QUIZ
   ========================================================= */
#scr-quiz .quiz-progress {
  flex: none;
  height: 4px;
  background: #e2e8f2;
  position: relative;
}
#scr-quiz .quiz-progress i {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #3f97f0, #0d4fa8);
  transition: width .3s ease;
}
.quiz-body { padding: 14px 14px calc(16px + var(--safe-b)); }
.q-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.q-chip {
  font-size: 11.5px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8eef8;
  color: var(--blue-700);
}
.q-chip.alt { background: #fdeff4; color: #b3175a; }
.q-chip.ghost { background: #eef1f6; color: var(--muted); }

.q-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.q-img {
  display: block;
  max-width: 100%;
  max-height: 210px;
  margin: 2px auto 14px;
  border-radius: 12px;
}
.q-img.tall { max-height: 260px; }
.q-text {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -.15px;
  color: var(--ink);
}

.opts { display: grid; gap: 10px; margin-top: 14px; }
.opt {
  display: grid;
  grid-template-columns: 34px 1fr 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1.7px solid var(--line);
  background: #fff;
  text-align: left;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink-2);
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
}
.opt:active { transform: scale(.99); }
.opt .letter {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #eef2f8;
  color: var(--ink-2);
  font-weight: 800;
  font-size: 14px;
  flex: none;
  transition: background .15s, color .15s;
}
.opt .mark-ico { opacity: 0; transition: opacity .15s; }
.opt.selected { border-color: var(--blue-500); background: #f2f8ff; box-shadow: 0 0 0 3px rgba(31, 122, 224, .1); }
.opt.selected .letter { background: var(--blue-600); color: #fff; }
.opt.selected .mark-ico { opacity: 1; color: var(--blue-600); }
.opt.correct { border-color: var(--green); background: var(--green-soft); }
.opt.correct .letter { background: var(--green); color: #fff; }
.opt.correct .mark-ico { opacity: 1; color: var(--green); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.wrong .letter { background: var(--red); color: #fff; }
.opt.wrong .mark-ico { opacity: 1; color: var(--red); }
.opts.locked .opt { cursor: default; }
.opts.locked .opt:not(.correct):not(.wrong) { opacity: .68; }

.feedback {
  margin-top: 14px;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 13.5px;
  display: none;
}
.feedback.show { display: block; animation: rise .18s ease; }
.feedback.ok { background: var(--green-soft); color: #0a6b3c; border: 1px solid #b7ebce; }
.feedback.bad { background: var(--red-soft); color: #94211d; border: 1px solid #f6c5c2; }
.feedback strong { font-weight: 800; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

.quiz-actions {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.quiz-actions .btn { flex: 1 1 0; }
.quiz-actions .btn-icon { flex: 0 0 52px; padding: 0; }

/* question navigator (exam) */
.qnav {
  display: none;
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  max-height: 168px;
  overflow-y: auto;
}
.qnav.open { display: block; }
.qnav h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qnav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 7px; }
.qnav-grid button {
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
}
.qnav-grid button.answered { background: #e8f1fd; border-color: #b9d5f7; color: var(--blue-700); }
.qnav-grid button.marked { border-color: var(--orange); box-shadow: inset 0 0 0 1.5px var(--orange); }
.qnav-grid button.current { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* =========================================================
   RESULT
   ========================================================= */
.result-hero {
  flex: none;
  background: linear-gradient(160deg, #2b84e6, #0b4695);
  color: #fff;
  padding: 16px 20px 26px;
  text-align: center;
  border-radius: 0 0 26px 26px;
}
.result-hero.fail { background: linear-gradient(160deg, #ff6b6b, #b3121b); }
.result-hero.practice { background: linear-gradient(160deg, #35b06a, #0d6b3d); }
.donut { width: 148px; height: 148px; margin: 4px auto 10px; position: relative; }
.donut svg { transform: rotate(-90deg); }
.donut .val {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 34px; font-weight: 800;
  letter-spacing: -1px;
}
.donut .val small { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0; opacity: .8; margin-top: -4px; }
.result-hero h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.3px; }
.result-hero p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.result-meta {
  display: flex; justify-content: center; gap: 22px;
  margin-top: 14px;
}
.result-meta div { text-align: center; }
.result-meta b { display: block; font-size: 18px; }
.result-meta span { font-size: 11.5px; opacity: .82; }

.review-list { padding: 14px; display: grid; gap: 8px; }
.review-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  background: #fff;
  border-radius: 13px;
  padding: 10px 12px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.review-item .rv-ico {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
}
.review-item.ok .rv-ico { background: var(--green-soft); color: var(--green); }
.review-item.bad .rv-ico { background: var(--red-soft); color: var(--red); }
.review-item.skip .rv-ico { background: #eef1f6; color: var(--muted); }
.review-item p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-item span { font-size: 11.5px; color: var(--muted); }
.review-item .chev { color: #b9c3d3; }

/* =========================================================
   STATS / HISTORY
   ========================================================= */
.pad { padding: 14px 14px calc(22px + var(--safe-b)); }
.sect-title { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; margin: 18px 2px 8px; }
.sect-title:first-child { margin-top: 2px; }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.kpi b { display: block; font-size: 24px; letter-spacing: -.6px; line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.green b { color: var(--green); }
.kpi.red b { color: var(--red); }
.kpi.blue b { color: var(--blue-600); }

.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.row-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 0; }
.row-item h4 { margin: 0 0 3px; font-size: 14px; font-weight: 700; }
.row-item p { margin: 0; font-size: 12px; color: var(--muted); }
.row-item b { font-size: 15px; font-variant-numeric: tabular-nums; }
.row-item b.ok { color: var(--green); }
.row-item b.bad { color: var(--red); }

.mini-bar { height: 7px; border-radius: 999px; background: #edf0f5; overflow: hidden; margin-top: 8px; }
.mini-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3f97f0, #0d4fa8); }

.empty {
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
}
.empty svg { opacity: .5; margin-bottom: 10px; }
.empty p { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.empty span { font-size: 12.5px; }

/* =========================================================
   DRAWER
   ========================================================= */
#overlay {
  position: fixed; inset: 0;
  background: rgba(8, 22, 45, .48);
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
  z-index: 40;
}
#overlay.show { opacity: 1; pointer-events: auto; }

#drawer {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: min(302px, 84vw);
  background: #fff;
  z-index: 50;
  transform: translateX(-102%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 34px rgba(8, 22, 45, .18);
}
#drawer.show { transform: none; }
.drawer-head {
  background: linear-gradient(160deg, #2b84e6, #0d4fa8);
  color: #fff;
  padding: calc(22px + var(--safe-t)) 18px 20px;
}
.drawer-head .avatar { width: 56px; height: 56px; font-size: 18px; margin-bottom: 12px; }
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.drawer-head p { margin: 2px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .8); word-break: break-all; }
.drawer-nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 0; }
.drawer-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: left;
}
.drawer-item:active { background: #f1f5fb; }
.drawer-item svg { color: var(--blue-600); flex: none; }
.drawer-item.danger, .drawer-item.danger svg { color: var(--red); }
.drawer-sep { height: 1px; background: var(--line); margin: 8px 0; }
.drawer-foot { padding: 12px 18px calc(16px + var(--safe-b)); font-size: 11.5px; color: var(--muted); }

/* =========================================================
   SETUP SHEET (elegir práctica)
   ========================================================= */
.sheet-wrap {
  position: fixed; inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 22, 45, .48);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.sheet-wrap.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(18px + var(--safe-b));
  transform: translateY(14px);
  transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  max-height: 88dvh;
  overflow-y: auto;
}
.sheet-wrap.show .sheet { transform: none; }
.sheet .grab { width: 42px; height: 4px; border-radius: 999px; background: #dfe5ee; margin: 6px auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.2px; }
.sheet > p { margin: 0 0 14px; font-size: 13px; color: var(--muted); }

.opt-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1.7px solid var(--line);
  background: #fff;
  margin-bottom: 9px;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.opt-row.sel { border-color: var(--blue-500); background: #f2f8ff; }
.opt-row .or-ico {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: #edf3fb;
  color: var(--blue-700);
}
.opt-row.sel .or-ico { background: var(--blue-600); color: #fff; }
.opt-row h4 { margin: 0 0 2px; font-size: 14.5px; }
.opt-row p { margin: 0; font-size: 12px; color: var(--muted); }
.opt-row .radio {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  border: 2px solid #ccd6e4;
  display: grid; place-items: center;
}
.opt-row.sel .radio { border-color: var(--blue-600); }
.opt-row.sel .radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-600);
}

.seg {
  display: flex;
  background: #eef2f8;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
}
.seg button {
  flex: 1 1 0;
  height: 38px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.seg button.on { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }

/* =========================================================
   TOAST
   ========================================================= */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + var(--safe-b));
  transform: translate(-50%, 14px);
  background: #17233a;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 90;
  max-width: 86vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* misc */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

