@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400;500&display=swap');

/* ════════════════════════════════════════════════════════════════
   NUTRIÓLOGO BETO · Sistema de diseño compartido (TEMA OSCURO)
   Combina con index.html: navy profundo, acento azul #6DC2F3 y
   tipografía Barlow / Barlow Condensed.
   TODO color/tipografía vive aquí en :root.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* ── Superficies (navy) ── */
  --navy:        #111C2E;   /* fondo de página */
  --navy-mid:    #1A2844;   /* tarjetas, paneles, sidebar */
  --navy-light:  #243356;   /* inputs, hover, superficies elevadas */
  --navy-deep:   #0E1726;   /* días deshabilitados, fondos hundidos */

  /* ── Acento (azul de marca) ── */
  --azul:        #6DC2F3;
  --azul-deep:   #3A9BD5;
  --azul-pale:   #C5E7FA;

  /* ── Texto ── */
  --blanco:      #FFFFFF;
  --texto:       #E6EEF8;   /* texto principal */
  --texto-soft:  #C8D4E8;   /* secundario */
  --texto-faint: #8A9AB8;   /* placeholders, metadatos */

  /* ── Líneas / sombras ── */
  --line:        rgba(109,194,243,0.13);
  --line-strong: rgba(109,194,243,0.30);
  --shadow-sm:   0 1px 2px rgba(0,0,0,.25);
  --shadow-md:   0 8px 28px rgba(0,0,0,.30);
  --shadow-lg:   0 22px 60px rgba(0,0,0,.45);

  /* ── Estados (brillantes para leer sobre oscuro) ── */
  --ok:    #43C9A0;  --ok-bg:   rgba(67,201,160,0.14);
  --warn:  #F0C24B;  --warn-bg: rgba(240,194,75,0.14);
  --bad:   #FF6B6B;  --bad-bg:  rgba(255,107,107,0.14);

  /* ── Tipografía ── */
  --serif: 'Barlow Condensed', sans-serif;   /* títulos */
  --sans:  'Barlow', sans-serif;             /* cuerpo */

  /* ── Medidas ── */
  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1080px;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--navy);
  color: var(--texto);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--azul); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; color: var(--blanco); line-height: 1.15; letter-spacing: .005em; }

/* ─── Layout ─── */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.muted   { color: var(--texto-soft); }
.faint   { color: var(--texto-faint); }
.center  { text-align: center; }
.hidden  { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   BOTONES
   ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: .8rem 1.7rem; border: 1px solid transparent; border-radius: var(--radius-sm);
  text-decoration: none; transition: transform .12s ease, background .18s ease, box-shadow .18s ease, opacity .18s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; }

.btn-primary { background: var(--azul); color: var(--navy); }
.btn-primary:hover { background: var(--azul-pale); box-shadow: var(--shadow-md); }

.btn-sage { background: var(--azul-deep); color: #fff; }
.btn-sage:hover { filter: brightness(1.1); }

.btn-ghost { background: transparent; color: var(--texto); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--navy-light); border-color: var(--azul); }

.btn-ok   { background: var(--ok);  color: #06231B; }
.btn-ok:hover { filter: brightness(1.08); }
.btn-bad  { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-bad:hover { background: var(--bad-bg); }

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: .5rem .9rem; font-size: .82rem; }

/* ════════════════════════════════════════════════════════════════
   FORMULARIOS
   ════════════════════════════════════════════════════════════════ */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block; font-family: var(--serif); font-size: .82rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--azul); margin-bottom: .45rem;
}
.field input, .field select {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--blanco);
  background: var(--navy-light); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .8rem .95rem; transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: var(--texto-faint); }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(109,194,243,.22);
}

/* ════════════════════════════════════════════════════════════════
   TARJETAS
   ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--navy-mid); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm);
}

/* ════════════════════════════════════════════════════════════════
   STEPPER (3 pasos del agendado)
   ════════════════════════════════════════════════════════════════ */
.stepper { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin: 0 auto 2.5rem; max-width: 560px; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step::after {
  content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px;
  background: var(--line-strong); z-index: 0;
}
.step:last-child::after { display: none; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-mid); border: 2px solid var(--line-strong); color: var(--texto-faint);
  font-family: var(--serif); font-weight: 700; font-size: 1rem; position: relative; z-index: 1; transition: all .25s;
}
.step-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-faint); margin-top: .5rem; text-align: center; font-weight: 600; }
.step.active .step-num { background: var(--azul); border-color: var(--azul); color: var(--navy); box-shadow: 0 0 0 4px rgba(109,194,243,.18); }
.step.active .step-label { color: var(--azul); }
.step.done .step-num { background: var(--azul); border-color: var(--azul); color: var(--navy); }
.step.done::after { background: var(--azul); }
.step.done .step-label { color: var(--azul-pale); }

/* paneles de paso */
.paso { display: none; animation: fade .35s ease; }
.paso.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.paso-titulo { font-size: 1.9rem; margin-bottom: .35rem; }
.paso-sub { color: var(--texto-soft); margin-bottom: 1.8rem; }
.paso-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }

/* ════════════════════════════════════════════════════════════════
   TARJETAS DE TIPO DE CONSULTA (paso 1)
   ════════════════════════════════════════════════════════════════ */
.tipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.tipo-card {
  text-align: left; background: var(--navy-mid); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; transition: all .2s; position: relative;
}
.tipo-card:hover { border-color: var(--azul); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tipo-card.selected { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(109,194,243,.18); }
.tipo-card.selected::after {
  content: '✓'; position: absolute; top: 1rem; right: 1rem;
  width: 26px; height: 26px; border-radius: 50%; background: var(--azul); color: var(--navy);
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}
.tipo-card .tipo-nombre { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--blanco); margin-bottom: .35rem; }
.tipo-card .tipo-detalle { font-size: .85rem; color: var(--texto-soft); margin-bottom: 1rem; min-height: 2.4em; }
.tipo-card .tipo-precio { font-family: var(--serif); font-size: 2.2rem; font-weight: 800; color: var(--azul); }
.tipo-card .tipo-precio small { font-size: .8rem; font-weight: 400; color: var(--texto-faint); }

/* ════════════════════════════════════════════════════════════════
   CALENDARIO (paso 2 + admin mini-calendario)
   ════════════════════════════════════════════════════════════════ */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cal-mes { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--blanco); text-transform: capitalize; }
.cal-nav { background: var(--navy-light); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.1rem; color: var(--azul); }
.cal-nav:hover { background: var(--navy); border-color: var(--azul); }
.cal-nav[disabled] { opacity: .3; pointer-events: none; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-faint); padding: .4rem 0; }
.cal-day {
  aspect-ratio: 1; border: 1px solid var(--line); background: var(--navy-mid); border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--texto); display: grid; place-items: center; position: relative; transition: all .15s;
}
.cal-day.empty { border: none; background: transparent; pointer-events: none; }
.cal-day.disponible { cursor: pointer; border-color: var(--azul); color: var(--azul-pale); font-weight: 700; }
.cal-day.disponible:hover { background: var(--navy-light); }
.cal-day.bloqueado, .cal-day.pasado, .cal-day.no-disp { color: var(--texto-faint); background: var(--navy-deep); cursor: not-allowed; }
.cal-day.bloqueado { text-decoration: line-through; }
.cal-day.seleccionado { background: var(--azul); color: var(--navy); border-color: var(--azul); font-weight: 700; }
.cal-day.hoy::before { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--azul); }
.cal-day.seleccionado.hoy::before { background: var(--navy); }
.cal-day.tiene-citas { box-shadow: inset 0 0 0 2px var(--azul); font-weight: 700; color: var(--azul-pale); }

/* ════════════════════════════════════════════════════════════════
   SLOTS DE HORARIO (paso 2)
   ════════════════════════════════════════════════════════════════ */
.slots-wrap { margin-top: 1.6rem; }
.slots-titulo { font-family: var(--serif); font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--azul); margin-bottom: .8rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; }
.slot {
  background: var(--navy-mid); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .65rem 0; font-size: .95rem; font-weight: 600; color: var(--texto); transition: all .15s;
}
.slot:hover { border-color: var(--azul); background: var(--navy-light); }
.slot.selected { background: var(--azul); color: var(--navy); border-color: var(--azul); font-weight: 700; }
.slot[disabled] { opacity: .35; pointer-events: none; text-decoration: line-through; }

/* ════════════════════════════════════════════════════════════════
   RESUMEN DE CITA (paso 3 / pago)
   ════════════════════════════════════════════════════════════════ */
.resumen { background: var(--navy-light); border: 1px solid var(--line-strong); color: var(--texto); border-radius: var(--radius); padding: 1.5rem; }
.resumen h3 { color: var(--blanco); font-size: 1.2rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.resumen-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .92rem; }
.resumen-row span:first-child { color: var(--azul); }
.resumen-row.total { margin-top: .8rem; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.5rem; font-weight: 800; }
.resumen-row.total span:first-child { color: var(--blanco); }
.resumen-row.total span:last-child { color: var(--azul); }

/* ════════════════════════════════════════════════════════════════
   BADGES DE ESTADO
   ════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .02em; padding: .28rem .7rem; border-radius: 999px; text-transform: capitalize;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.confirmada      { background: var(--ok-bg);   color: var(--ok); }
.badge.pendiente_pago  { background: var(--warn-bg); color: var(--warn); }
.badge.reservado_temp  { background: rgba(109,194,243,.14); color: var(--azul); }
.badge.cancelada       { background: var(--bad-bg);  color: var(--bad); }

/* ════════════════════════════════════════════════════════════════
   ALERTAS (errores y éxitos — siempre visibles al usuario)
   ════════════════════════════════════════════════════════════════ */
.alert { border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .92rem; margin: 1rem 0; border: 1px solid transparent; display: flex; gap: .6rem; align-items: flex-start; }
.alert strong { font-weight: 700; color: inherit; }
.alert.error   { background: var(--bad-bg);  color: var(--bad);  border-color: rgba(255,107,107,.30); }
.alert.success { background: var(--ok-bg);   color: var(--ok);   border-color: rgba(67,201,160,.30); }
.alert.info    { background: rgba(109,194,243,.12); color: var(--azul-pale); border-color: rgba(109,194,243,.30); }

/* ════════════════════════════════════════════════════════════════
   LOADING (spinner + skeleton)
   ════════════════════════════════════════════════════════════════ */
.loader { display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--line-strong); border-top-color: var(--azul); border-radius: 50%; animation: spin .7s linear infinite; }
.loader.lg { width: 34px; height: 34px; border-width: 3px; }
.loading-box { display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 2.5rem; color: var(--texto-soft); font-size: .9rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--navy-mid) 25%, var(--navy-light) 50%, var(--navy-mid) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--texto-faint); font-size: .92rem; }

/* ════════════════════════════════════════════════════════════════
   AVATAR (iniciales)
   ════════════════════════════════════════════════════════════════ */
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--azul); color: var(--navy); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: .85rem; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   BARRA SUPERIOR (páginas públicas: agendar)
   ════════════════════════════════════════════════════════════════ */
.topbar { background: rgba(17,28,46,0.9); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--serif); font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blanco); text-decoration: none; line-height: 1; }
.brand small { display: block; font-family: var(--sans); font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: var(--azul); font-weight: 500; margin-top: 3px; }
.topbar a.back { font-family: var(--serif); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-soft); text-decoration: none; }
.topbar a.back:hover { color: var(--azul); }

/* ════════════════════════════════════════════════════════════════
   TABLAS
   ════════════════════════════════════════════════════════════════ */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-family: var(--serif); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-faint); padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.tabla td { padding: .85rem .8rem; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; color: var(--texto); }
.tabla tr:last-child td { border-bottom: none; }
.tabla tr:hover td { background: var(--navy-light); }
.td-user { display: flex; align-items: center; gap: .7rem; }
.td-user .nm { font-weight: 600; color: var(--blanco); }
.td-user .em { font-size: .76rem; color: var(--texto-faint); }
.td-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* ════════════════════════════════════════════════════════════════
   PANEL ADMIN: layout sidebar + main
   ════════════════════════════════════════════════════════════════ */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
/* El backdrop solo existe en móvil; en escritorio NO debe ocupar celda del grid */
.sidebar-backdrop { display: none; }

.sidebar { background: var(--navy-mid); color: var(--texto); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); }
.sidebar-logo { padding: 1.6rem 1.5rem; border-bottom: 1px solid var(--line); }
.sidebar-nav { flex: 1; padding: 1rem .8rem; display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: var(--radius-sm);
  color: var(--texto-soft); font-family: var(--serif); font-size: 1rem; letter-spacing: .03em; font-weight: 600; text-decoration: none; border: none; background: none;
  width: 100%; text-align: left; transition: all .15s; position: relative; text-transform: uppercase;
}
.nav-item:hover { background: rgba(109,194,243,.07); color: var(--blanco); }
.nav-item.active { background: var(--navy-light); color: var(--azul); }
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.nav-item .dot { position: absolute; right: 1rem; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: none; }
.nav-item .dot.show { display: block; box-shadow: 0 0 0 3px rgba(255,107,107,.2); }
.sidebar-foot { padding: 1rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .7rem; }
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who .nm { font-size: .85rem; font-weight: 600; color: var(--blanco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who .rl { font-size: .7rem; color: var(--texto-faint); }
.sidebar-foot .logout { background: rgba(109,194,243,.1); border: none; color: var(--azul); border-radius: var(--radius-sm); padding: .5rem .7rem; font-family: var(--serif); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-foot .logout:hover { background: rgba(109,194,243,.2); }

.main { padding: 2rem clamp(1.2rem, 3vw, 2.5rem); max-width: 1200px; }
.main-head { margin-bottom: 1.8rem; }
.main-head h1 { font-size: 2rem; }
.main-head p { color: var(--texto-soft); font-size: .92rem; }

.seccion { display: none; }
.seccion.active { display: block; animation: fade .3s ease; }

/* métricas */
.metricas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.8rem; }
.metric { background: var(--navy-mid); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.metric .label { font-family: var(--serif); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-faint); margin-bottom: .5rem; }
.metric .valor { font-family: var(--serif); font-size: 2.3rem; font-weight: 800; color: var(--azul); line-height: 1; }
.metric.alerta .valor { color: var(--bad); }
.metric .sub { font-size: .76rem; color: var(--texto-soft); margin-top: .4rem; }

/* rejilla del dashboard */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; align-items: start; }
.panel { background: var(--navy-mid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 1.2rem; }
.panel-body { padding: 1.1rem 1.3rem; }
.panel-body.flush { padding: .4rem .6rem; }

/* lista de pagos */
.pago-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.pago-row:last-child { border-bottom: none; }
.pago-row .nm { color: var(--blanco); }
.pago-row .pago-monto { margin-left: auto; font-family: var(--serif); font-weight: 800; font-size: 1.1rem; color: var(--ok); }

/* agenda semanal */
.semana { display: grid; gap: .8rem; }
.dia-bloque { background: var(--navy-mid); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dia-bloque > h4 { background: var(--navy-light); padding: .7rem 1.1rem; font-size: 1rem; text-transform: capitalize; border-bottom: 1px solid var(--line); color: var(--blanco); }
.cita-linea { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cita-linea:last-child { border-bottom: none; }
.cita-linea .hora { font-family: var(--serif); font-weight: 700; color: var(--azul); font-variant-numeric: tabular-nums; min-width: 52px; }

/* toggles de disponibilidad */
.disp-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.disp-row:last-child { border-bottom: none; }
.disp-row .dia-nombre { width: 110px; font-weight: 600; text-transform: capitalize; color: var(--blanco); }
.disp-row .horas { display: flex; align-items: center; gap: .5rem; }
.disp-row .horas input { width: 120px; padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-family: var(--sans); background: var(--navy-light); color: var(--blanco); }
.disp-row.off .horas { opacity: .35; pointer-events: none; }

/* switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: .2s; }
.switch .track::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--azul-deep); }
.switch input:checked + .track::before { transform: translateX(20px); }

/* ════════════════════════════════════════════════════════════════
   LOGIN
   ════════════════════════════════════════════════════════════════ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background:
  radial-gradient(1200px 600px at 50% -10%, rgba(109,194,243,0.16), transparent), var(--navy); }
.login-card { width: 100%; max-width: 400px; background: var(--navy-mid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2.2rem; }
.login-card .brand { text-align: center; display: block; margin-bottom: .3rem; font-size: 1.6rem; }
.login-card .login-sub { text-align: center; color: var(--texto-soft); font-size: .88rem; margin-bottom: 1.8rem; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 880px) {
  .tipos { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .metricas { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 248px; height: 100vh; z-index: 200;
    transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(8,14,24,.6); z-index: 150; display: none; }
  .sidebar-backdrop.show { display: block; }
  .menu-toggle { display: inline-grid !important; }
}
@media (min-width: 881px) { .menu-toggle { display: none; } }

@media (max-width: 520px) {
  .metricas { grid-template-columns: 1fr; }
  .paso-nav { flex-direction: column-reverse; }
  .paso-nav .btn { width: 100%; }
  .slots { grid-template-columns: repeat(3, 1fr); }
  .resumen-row { font-size: .86rem; }
}
