/* Programa de Referidos – Escuela ESME
   Mobile-first (360–430 px), luego tablet y escritorio. Estilo sobrio. */

:root {
  --navy: #1B2358;
  --navy-700: #151c48;
  --blue: #1F73C9;
  --blue-light: #DCEBFA;
  --white: #FFFFFF;
  --gray-text: #5B6475;
  --gray-line: #E3E7EE;
  --bg-soft: #F6F8FB;
  --text: #1C2233;
  --success: #1E8E5A;
  --warning: #B7791F;
  --error: #C0392B;
  --radius: 10px;
  --radius-sm: 8px;
  --tabbar-h: 64px;
  --font: Inter, Montserrat, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text);
  background: var(--white); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
.muted { color: var(--gray-text); }
.small { font-size: .9rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Encabezado ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; height: 60px; padding: 0 1.25rem; background: var(--bg-soft); border-bottom: 1px solid var(--gray-line);
}
.brand { display: flex; align-items: center; gap: .625rem; text-decoration: none; color: var(--navy); min-height: 48px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: .95rem; }
.brand__text span { font-size: .78rem; color: var(--gray-text); }
.topbar__right { display: flex; align-items: center; gap: .5rem; }

/* ---------- Estructura ---------- */
.layout { display: block; }
.main { outline: none; min-height: calc(100vh - 60px); }
.page { max-width: 640px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.page--wide { max-width: 1120px; }
.has-tabbar .page { padding-bottom: calc(var(--tabbar-h) + 2rem + env(safe-area-inset-bottom)); }
.page-head { margin-bottom: 1.25rem; }
.page-head p { color: var(--gray-text); margin: 0; }
.section { margin-top: 2rem; }
.section > h2 { margin-bottom: .75rem; }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row--between { justify-content: space-between; }
.back { display: inline-flex; align-items: center; gap: .25rem; min-height: 44px; text-decoration: none; font-weight: 500; margin: -.25rem 0 .5rem -.25rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.25rem;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; width: 100%;
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-700); }
.btn--secondary { background: var(--white); color: var(--navy); border-color: #C9D1DF; }
.btn--secondary:hover { border-color: var(--navy); }
.btn--ghost { background: transparent; color: var(--blue); width: auto; padding: .5rem .75rem; }
.btn--danger { background: var(--white); color: var(--error); border-color: #E8B4AE; }
.btn--sm { min-height: 44px; padding: .5rem .875rem; font-size: .95rem; width: auto; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-group { display: grid; gap: .625rem; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Tarjetas ---------- */
.card { border: 1px solid var(--gray-line); border-radius: var(--radius); padding: 1.125rem; background: var(--white); }
.card--soft { background: var(--blue-light); border-color: transparent; }
.card--link { display: block; text-decoration: none; color: inherit; }
.card--link:hover { border-color: #C9D1DF; }
.card__title { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.code-label { font-size: .85rem; color: var(--gray-text); margin-bottom: .125rem; }
.code-value { font-size: 1.6rem; font-weight: 700; color: var(--navy); letter-spacing: .04em; margin-bottom: .5rem; }
.link-box {
  background: var(--white); border: 1px solid var(--gray-line); border-radius: var(--radius-sm); padding: .625rem .75rem;
  font-size: .9rem; color: var(--gray-text); word-break: break-all; margin-bottom: 1rem;
}

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stat { border: 1px solid var(--gray-line); border-radius: var(--radius); padding: .875rem .625rem; }
.stat__value { font-size: 1.15rem; font-weight: 700; color: var(--navy); line-height: 1.2; word-break: break-word; }
.stat__label { font-size: .8rem; color: var(--gray-text); margin-top: .25rem; line-height: 1.3; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .625rem; }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 1rem 2.75rem; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--blue-light); color: var(--navy); font-weight: 700; display: grid; place-items: center; font-size: .95rem;
}
.steps li:last-child { padding-bottom: 0; }
.steps strong { display: block; color: var(--navy); }
.steps span { color: var(--gray-text); font-size: .95rem; }

/* ---------- Lista de cursos ---------- */
.course { display: block; text-decoration: none; color: inherit; border: 1px solid var(--gray-line); border-radius: var(--radius); padding: 1rem; }
.course:hover { border-color: #C9D1DF; }
.course__name { font-weight: 650; color: var(--navy); margin-bottom: .125rem; }
.course__meta { color: var(--gray-text); font-size: .9rem; margin-bottom: .5rem; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; }
.price__now { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.price__old { color: var(--gray-text); text-decoration: line-through; font-size: .95rem; }
.price--lg .price__now { font-size: 1.6rem; }
.promo-note { font-size: .875rem; color: var(--warning); margin-top: .25rem; font-weight: 500; }

/* ---------- Insignias ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; line-height: 1.4; white-space: nowrap; }
.badge--neutral { background: #EEF1F5; color: var(--gray-text); }
.badge--info { background: var(--blue-light); color: #154F8C; }
.badge--success { background: #E2F3EA; color: #176E46; }
.badge--warning { background: #FBF0DD; color: #8A5A14; }
.badge--error { background: #F8E3E0; color: #9B2C20; }
.badge--promo { background: var(--navy); color: var(--white); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1.125rem; }
.field { display: grid; gap: .375rem; }
.field label, .field legend { font-weight: 600; font-size: .95rem; color: var(--text); }
.hint { font-size: .875rem; color: var(--gray-text); margin: -.125rem 0 .125rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .8rem; font: inherit; font-size: 16px; color: var(--text);
  background: var(--white); border: 1px solid #C9D1DF; border-radius: var(--radius-sm); appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6475' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 18px; padding-right: 2.5rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-light); outline-offset: 0; }
[aria-invalid=true] { border-color: var(--error) !important; }
.field-error { color: var(--error); font-size: .875rem; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: grid; gap: .5rem; }
.choice {
  display: flex; align-items: flex-start; gap: .75rem; min-height: 48px; padding: .75rem .875rem; border: 1px solid #C9D1DF;
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 400 !important;
}
.choice:has(input:checked) { border-color: var(--navy); background: #F3F6FC; }
.choice input { width: 20px; height: 20px; margin: .125rem 0 0; accent-color: var(--navy); flex: none; }
.choice small { display: block; color: var(--gray-text); font-size: .85rem; }
.check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 400 !important; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--navy); flex: none; }
.input-row { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem; }
.form-foot { text-align: center; color: var(--gray-text); font-size: .95rem; }
.searchbar { position: relative; }
.searchbar .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--gray-text); pointer-events: none; }
.searchbar input { padding-left: 2.6rem; }

/* ---------- Filtros tipo pestaña ---------- */
.chips { display: flex; gap: .625rem; overflow-x: auto; padding-top: .125rem; padding-bottom: .25rem; margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; scrollbar-width: none; }
.stack > .chips { margin-top: 1rem; }
.stack > .chips + * { margin-top: 1.25rem; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: .45rem .9rem; border-radius: 999px; border: 1px solid #C9D1DF; background: var(--white);
  font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- Avisos ---------- */
.notice { border-radius: var(--radius-sm); padding: .875rem 1rem; font-size: .95rem; border: 1px solid; }
.notice--error { background: #FDF3F2; border-color: #F0C7C2; color: #8E271C; }
.notice--warning { background: #FDF7EC; border-color: #EED7AE; color: #6F4810; }
.notice--info { background: #F2F7FD; border-color: #CFE1F6; color: #1A4C80; }
.notice--success { background: #F0F8F4; border-color: #C3E3D2; color: #155C3B; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--gray-text); border: 1px dashed var(--gray-line); border-radius: var(--radius); }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.item { border: 1px solid var(--gray-line); border-radius: var(--radius); padding: .875rem 1rem; }
.item__top { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.item__name { font-weight: 600; color: var(--navy); }
.item__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--gray-text); margin-right: .4rem; }
.item__meta { color: var(--gray-text); font-size: .9rem; }
.item__badges { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; }
.item__amount { font-weight: 700; color: var(--navy); white-space: nowrap; }
a.item { display: block; text-decoration: none; color: inherit; }
a.item:hover { border-color: #C9D1DF; }
dl.data { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: .5rem .75rem; margin: 0; font-size: .95rem; }
dl.data dt { color: var(--gray-text); }
dl.data dd { margin: 0; word-break: break-word; }

/* ---------- Tablas responsivas (tarjetas en móvil) ---------- */
.rtable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rtable thead { display: none; }
.rtable tr { display: block; border: 1px solid var(--gray-line); border-radius: var(--radius); padding: .625rem .875rem; margin-bottom: .625rem; }
.rtable td { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; text-align: right; }
.rtable td::before { content: attr(data-label); color: var(--gray-text); text-align: left; font-size: .875rem; }
.rtable td.rtable__main { display: block; text-align: left; font-weight: 600; color: var(--navy); padding-bottom: .4rem; }
.rtable td.rtable__main::before { display: none; }
.rtable tfoot td { font-weight: 700; }

/* ---------- Video y pensum ---------- */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0F1430; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.description p { color: var(--text); }

/* ---------- Navegación inferior (referidor) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(var(--tabs, 4), 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--white); border-top: 1px solid var(--gray-line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; text-decoration: none;
  color: var(--gray-text); font-size: .75rem; font-weight: 500; min-height: 48px;
}
.tabbar a[aria-current=page] { color: var(--navy); font-weight: 650; }
.tabbar a[aria-current=page] .icon { stroke-width: 2.2; }
.tabbar .icon { width: 24px; height: 24px; }

/* ---------- Navegación de administración ---------- */
.sidenav { background: var(--white); border-bottom: 1px solid var(--gray-line); position: sticky; top: 60px; z-index: 15; }
.sidenav ul { list-style: none; margin: 0; padding: .5rem 1rem; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.sidenav ul::-webkit-scrollbar { display: none; }
.sidenav a {
  display: flex; align-items: center; min-height: 44px; padding: .5rem .85rem; border-radius: var(--radius-sm); white-space: nowrap;
  text-decoration: none; color: var(--gray-text); font-weight: 500; font-size: .95rem;
}
.sidenav a[aria-current=page] { background: var(--blue-light); color: var(--navy); font-weight: 650; }
.nav-count { margin-left: .4rem; font-size: .75rem; background: var(--warning); color: #fff; border-radius: 999px; padding: 0 .45rem; }

/* ---------- Diálogo ---------- */
.modal { border: 0; border-radius: 14px 14px 0 0; padding: 0; width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; }
.modal::backdrop { background: rgba(15, 20, 48, .45); }
.modal__body { padding: 1.25rem 1rem 1.5rem; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }

/* ---------- Aviso breve ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 1rem + env(safe-area-inset-bottom)); transform: translate(-50%, 1rem);
  background: var(--navy); color: #fff; padding: .75rem 1.1rem; border-radius: var(--radius-sm); font-size: .95rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 2rem);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Páginas de acceso ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: 1.75rem 1rem 2.5rem; }
.auth h1 { margin-bottom: .25rem; }
.auth .lead { color: var(--gray-text); margin-bottom: 1.5rem; }
.referred-by { font-size: .9rem; color: var(--gray-text); border-left: 3px solid var(--blue); padding-left: .625rem; margin-bottom: 1.25rem; }
.legal { font-size: .95rem; }
.legal h2 { margin-top: 1.5rem; }
.history { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.history li { padding: .625rem 0; border-bottom: 1px solid var(--gray-line); }
.history li:last-child { border-bottom: 0; }
.history time { color: var(--gray-text); font-size: .82rem; display: block; }
.divider { height: 1px; background: var(--gray-line); margin: 1.5rem 0; border: 0; }
.video-rows { display: grid; gap: .75rem; }
.video-row { display: grid; gap: .5rem; border: 1px solid var(--gray-line); border-radius: var(--radius-sm); padding: .75rem; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .page { padding: 2rem 1.5rem 3rem; }
  h1 { font-size: 1.75rem; }
  .btn-group--row { grid-template-columns: 1fr 1fr; }
  .stat__value { font-size: 1.35rem; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .modal { border-radius: 14px; margin: auto; max-width: 520px; }
  .modal__body { padding: 1.5rem; }
  .form--2 { grid-template-columns: 1fr 1fr; }
  .form--2 > .span-2 { grid-column: span 2; }
  .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
}

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
  .topbar { padding: 0 clamp(1.5rem, 3vw, 2.75rem); gap: 1.5rem; justify-content: flex-start; }
  .topbar__right { margin-left: 0; }
  .has-sidenav .topbar__right { margin-left: auto; }

  /* Menú del referidor: barra horizontal alineada a la derecha */
  .tabbar {
    position: static; height: auto; padding: 0; margin-left: auto; margin-right: 0;
    display: flex; align-items: center; gap: .25rem;
    background: transparent; border-top: 0;
  }
  .tabbar a {
    flex-direction: row; gap: .4rem; min-height: 40px; padding: .5rem .85rem;
    border-radius: var(--radius-sm); font-size: .95rem;
  }
  .tabbar a:hover { background: var(--white); color: var(--navy); }
  .tabbar a[aria-current=page] { background: var(--blue-light); color: var(--navy); font-weight: 650; }
  .tabbar .icon { width: 18px; height: 18px; }
  .has-tabbar .page { padding-bottom: 3rem; }

  .has-sidenav .layout { display: grid; grid-template-columns: 232px 1fr; }
  .has-sidenav .sidenav { position: sticky; top: 60px; height: calc(100vh - 60px); border-bottom: 0; border-right: 1px solid var(--gray-line); }
  .has-sidenav .sidenav ul { flex-direction: column; padding: 1rem .75rem; overflow: visible; }
  .btn { width: auto; }
  .btn-group { display: flex; flex-wrap: wrap; }
  .btn--block { width: 100%; }
  .auth .btn, .form > .btn, .form .btn--submit { width: 100%; }
  .rtable thead { display: table-header-group; }
  .rtable tr { display: table-row; border: 0; border-radius: 0; padding: 0; margin: 0; }
  .rtable th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--gray-text); padding: .625rem .75rem; border-bottom: 1px solid var(--gray-line); white-space: nowrap; }
  .rtable td { display: table-cell; text-align: left; padding: .75rem; border-bottom: 1px solid var(--gray-line); vertical-align: top; }
  .rtable td::before { display: none; }
  .rtable td.rtable__main { display: table-cell; padding-bottom: .75rem; }
  .rtable .num { text-align: right; white-space: nowrap; }
  .rtable tbody tr:hover { background: var(--bg-soft); }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
  .grid-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.5rem; align-items: start; }
  .toast { bottom: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Utilidades (sin estilos en línea por la política de seguridad) ---------- */
.mt { margin-top: .875rem; }
.mt-sm { margin-top: .5rem; }
.mt-xs { margin-top: .375rem; }
.mb-sm { margin-bottom: .5rem; }
.mb-0 { margin-bottom: 0; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.w-auto { width: auto; }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; min-height: 160px; white-space: pre; }
details summary { cursor: pointer; color: var(--blue); font-weight: 500; min-height: 32px; }
details ol { padding-left: 1.25rem; margin: .5rem 0; }
.policies { border: 1px solid var(--gray-line); border-radius: var(--radius-sm); padding: .75rem .875rem; }
.policies summary { min-height: 40px; display: flex; align-items: center; }
.policies p { margin: .5rem 0 0; }

/* ---------- Cursos: buscador y vista mosaico / lista ---------- */
.toolbar { display: flex; gap: .5rem; align-items: center; }
.toolbar .searchbar { flex: 1; }
.segmented { display: inline-flex; border: 1px solid #C9D1DF; border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.segmented button {
  width: 48px; height: 48px; display: grid; place-items: center; background: var(--white); border: 0; color: var(--gray-text); cursor: pointer;
}
.segmented button + button { border-left: 1px solid #C9D1DF; }
.segmented button[aria-pressed=true] { background: var(--navy); color: var(--white); }
#results { margin-top: .75rem; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem; min-height: 132px; height: 100%;
  padding: 2.25rem .875rem .875rem; border: 1px solid var(--gray-line); border-radius: var(--radius); background: var(--white);
  text-decoration: none; color: inherit;
}
.tile:hover { border-color: #C9D1DF; }
.tile__badge { position: absolute; top: .625rem; left: .75rem; }
.tile__name { font-weight: 650; color: var(--navy); line-height: 1.25; margin-bottom: auto; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.tile__price { font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-top: .5rem; }
.tile__old { color: var(--gray-text); text-decoration: line-through; font-size: .85rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Interruptor ---------- */
.toggle-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: .625rem; min-height: 48px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--text); }
.switch__track { width: 48px; height: 28px; border-radius: 999px; background: #C9D1DF; position: relative; transition: background-color .15s; flex: none; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch[aria-checked=true] .switch__track { background: var(--success); }
.switch[aria-checked=true] .switch__thumb { transform: translateX(20px); }
.switch__label { font-weight: 600; font-size: .95rem; }
