/* ============================================================
   AUTH.CSS — Portal Médico  |  Professional Design System
   Concepto: Refinamiento bancario + profundidad quirúrgica
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand — azul clínico Delfos */
  --blue-900: #0a1526;    /* fondo panel de marca */
  --blue-800: #102138;
  --blue-700: #182d4c;
  --blue-600: #223d63;
  --blue-500: #2c4d80;
  --blue-400: #1f46b8;    /* azul primario — hover/gradiente */
  --blue-300: #2f5fe0;    /* azul primario — acción */
  --blue-200: #6f93ef;    /* azul claro — acentos/tags */
  --blue-100: #dde6fb;    /* tinte muy claro */
  --blue-50:  #f4f7fd;    /* fondo sutil */

  --green-500: #16a34a;
  --green-400: #22c55e;
  --green-100: #dcfce7;

  --red-500:   #dc2626;
  --red-100:   #fee2e2;

  --amber-400: #f59e0b;

  /* Neutrals — azul-grisáceo cálido */
  --ink-900: #0b1526;
  --ink-800: #142238;
  --ink-700: #1f3050;
  --ink-600: #33507c;
  --ink-400: #6b84a8;
  --ink-300: #98acc9;
  --ink-200: #cbd8ea;
  --ink-100: #e7eef8;
  --ink-50:  #f5f8fc;
  --white:   #ffffff;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;

  /* Spacing */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-3xl: 32px;

  /* Layout */
  --sidebar-w: 272px;
  --header-h:  70px;

  /* Effects */
  --glow-blue:  0 0 0 3px rgba(47,95,224,0.18);
  --shadow-sm:  0 1px 3px rgba(6,14,30,0.08), 0 1px 2px rgba(6,14,30,0.06);
  --shadow-md:  0 4px 16px rgba(6,14,30,0.1), 0 2px 6px rgba(6,14,30,0.06);
  --shadow-lg:  0 16px 48px rgba(6,14,30,0.14), 0 4px 16px rgba(6,14,30,0.08);
  --shadow-xl:  0 32px 80px rgba(6,14,30,0.22), 0 8px 24px rgba(6,14,30,0.1);

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--ink-50); color: var(--ink-800); line-height: 1.5; }
.hidden { display: none !important; }

/* ============================================================
   AUTH — Login / Recovery screens
   ============================================================ */
.auth-wrapper {
  display: flex;
  height: 100vh;           /* ocupa exactamente la pantalla, sin scroll */
  overflow: hidden;
  position: relative;
}

/* Ambient background — un único resplandor sobrio, sin blobs de color */
.auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.auth-bg-shape { position: absolute; border-radius: 50%; filter: blur(120px); }
.shape-1 { width: 900px; height: 900px; background: radial-gradient(circle, rgba(47,95,224,0.28) 0%, transparent 62%); top: -320px; left: -280px; animation: blob-a 26s ease-in-out infinite; }
.shape-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(47,95,224,0.12) 0%, transparent 60%); bottom: -180px; left: 30%; animation: blob-b 32s ease-in-out infinite; }
.shape-3 { display: none; }
@keyframes blob-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.05); } }
@keyframes blob-b { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px,-30px) scale(1.06); } }

/* ── Left branding panel ─────────────────────────────────── */
.auth-branding {
  flex: 1;
  background: linear-gradient(165deg, var(--blue-900) 0%, var(--blue-800) 50%, var(--blue-700) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 68px;
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
}

/* Fine dot-grid texture */
.auth-branding::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Vertical separator */
.auth-branding::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255,255,255,0.06) 15%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.06) 85%,
    transparent 100%);
}

/* Arco decorativo — geometría sutil, sin motivos deportivos */
.auth-branding .deco-arc {
  position: absolute;
  bottom: -220px;
  right: -220px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
.auth-branding .deco-arc::before {
  content: '';
  position: absolute;
  inset: 44px;
  border: 1px solid rgba(255,255,255,0.035);
  border-radius: 50%;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 56px;
  position: relative;
}

.brand-logo svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 6px 18px rgba(47,95,224,0.5));
}

.brand-copy {
  position: relative;
  margin-bottom: 0;
  max-width: 480px;
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(111,147,239,0.14);
  border: 1px solid rgba(111,147,239,0.28);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-200);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.brand-eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--blue-200);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(0.7); } }

.brand-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4vw, 4rem);
  color: var(--white);
  line-height: 1.18;
  font-weight: 400;
  margin-bottom: 0;
}

.brand-copy h1 em {
  font-style: italic;
  color: var(--blue-200);
}

.brand-copy p {
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 380px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  padding: 14px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-xl);
  transition: all 0.3s var(--smooth);
  cursor: default;
}

.brand-feature:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.92);
  transform: translateX(6px);
}

.bf-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, rgba(111,147,239,0.28), rgba(47,95,224,0.18));
  border: 1px solid rgba(111,147,239,0.3);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

/* ── Right auth panel ────────────────────────────────────── */
.auth-panel {
  width: 520px;
  min-width: 520px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 48px 28px;
}

.auth-panel-inner {
  width: 100%;
  max-width: 400px;
}

/* ── Login / Recovery form ───────────────────────────────── */
.auth-form {
  width: 100%;
  max-width: 400px;
  padding: 0;
  display: none;
  animation: form-enter 0.4s var(--smooth);
}
.auth-form.active { display: block; }
@keyframes form-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-header { margin-bottom: 40px; }

.form-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue-300);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--ink-900);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 10px;
}

.form-header p {
  color: var(--ink-400);
  font-size: 0.9rem;
  line-height: 1.65;
}

.form-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--ink-600);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.req { color: var(--red-500); }

.input-wrap { position: relative; display: flex; align-items: center; }

.input-icon {
  position: absolute;
  left: 15px;
  font-size: 0.9rem;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  opacity: 0.6;
}

.input-wrap input {
  width: 100%;
  padding: 14px 44px 14px 42px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--ink-900);
  background: var(--ink-50);
  transition: all 0.22s var(--smooth);
  outline: none;
}

.input-wrap input:hover { border-color: var(--ink-300); background: var(--white); }

.input-wrap input:focus {
  border-color: var(--blue-300);
  background: var(--white);
  box-shadow: var(--glow-blue);
}

.input-wrap input::placeholder { color: var(--ink-300); }

.toggle-pass {
  position: absolute;
  right: 13px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 5px;
  opacity: 0.45;
  transition: opacity 0.2s;
  color: var(--ink-600);
  border-radius: 6px;
}
.toggle-pass:hover { opacity: 1; background: var(--ink-100); }

.form-hint {
  font-size: 0.75rem;
  color: var(--ink-300);
  line-height: 1.5;
  margin-top: -3px;
  padding-left: 2px;
}

/* Buttons */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, var(--blue-300) 0%, var(--blue-400) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.24s var(--smooth);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 55%);
  pointer-events: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,48,135,0.45); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--white);
  color: var(--ink-500);
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--ink-300); color: var(--ink-800); background: var(--ink-50); }

/* Alerts */
.form-alert {
  padding: 13px 16px;
  border-radius: var(--r-md);
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-alert.error  { background: var(--red-100); color: #991b1b; border: 1px solid #fca5a5; }
.form-alert.success { background: var(--green-100); color: #14532d; border: 1px solid #86efac; }
.form-alert.hidden { display: none; }

.form-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.87rem;
  color: var(--ink-400);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: all 0.18s;
}
.link-btn:hover { color: var(--blue-300); background: var(--blue-50); }
.link-btn strong { color: var(--blue-300); font-weight: 600; }
.link-btn.muted { font-size: 0.81rem; opacity: 0.7; }
.link-btn.muted:hover { opacity: 1; }

/* ============================================================
   MODAL — Crear Cuenta
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 13, 31, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlay-in 0.25s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--white);
  border-radius: 28px;
  width: 100%;
  max-width: 800px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.35s var(--spring);
  overflow: hidden;
  border: 1px solid var(--ink-100);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px 24px;
  border-bottom: 1px solid var(--ink-100);
  background: linear-gradient(135deg, var(--ink-50) 0%, var(--white) 100%);
  flex-shrink: 0;
}

.modal-title-wrap { display: flex; align-items: center; gap: 18px; }

.modal-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--blue-300) 0%, var(--blue-400) 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(0, 88, 176, 0.35);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--ink-900);
  margin: 0 0 4px;
  line-height: 1.1;
}
.modal-header p { font-size: 0.84rem; color: var(--ink-400); margin: 0; }

.modal-close {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--ink-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-400);
  transition: all 0.2s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--red-100); border-color: #fca5a5; color: var(--red-500); transform: rotate(90deg); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-200) transparent;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 10px; }

.modal-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-400);
  margin-bottom: 22px;
}

.section-num {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--blue-300), var(--blue-400));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,48,135,0.3);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-200) 25%, var(--ink-200) 75%, transparent);
  margin: 28px 0;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 36px 24px;
  border-top: 1px solid var(--ink-100);
  background: var(--ink-50);
  flex-shrink: 0;
}

/* ============================================================
   DASHBOARD SHELL
   ============================================================ */
#dashboardWrapper { display: flex; min-height: 100vh; background: var(--ink-50); }
#dashboardWrapper.hidden { display: none !important; }
#authWrapper.hidden      { display: none !important; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--blue-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s var(--smooth);
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Sidebar inner gradient for depth */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,48,110,0.5) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(0,30,70,0.8) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 26px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo svg { filter: drop-shadow(0 3px 8px rgba(252,209,22,0.45)); }

.logo-text {
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  margin: 14px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-xl);
  backdrop-filter: blur(4px);
}

.su-avatar {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, rgba(252,209,22,0.45), rgba(0,64,140,0.4));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 1px solid rgba(252,209,22,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.su-info { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.su-name {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.su-cedula { color: rgba(255,255,255,0.3); font-size: 0.72rem; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 8px 12px 0; display: flex; flex-direction: column; gap: 2px; }

.nav-section-label {
  color: rgba(255,255,255,0.2);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-lg);
  color: rgba(180,200,230,0.65);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: all 0.18s var(--smooth);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
  letter-spacing: -0.01em;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(252,209,22,0.18), rgba(0,48,135,0.14));
  color: #fcd116;
  border-color: rgba(252,209,22,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.nav-item.soon {
  border-style: dashed;
}

.nav-soon-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.28);
  flex-shrink: 0;
}

.nav-icon { font-size: 1.05rem; flex-shrink: 0; }

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}

.logout-btn { color: rgba(255,255,255,0.35) !important; font-size: 0.85rem !important; }
.logout-btn:hover { color: #fca5a5 !important; background: rgba(239,68,68,0.12) !important; border-color: rgba(239,68,68,0.15) !important; }

/* ── Main content ────────────────────────────────────────── */
.dashboard-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 40px 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-100);
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  height: auto;
  box-shadow: 0 1px 0 var(--ink-100), 0 4px 20px rgba(6,14,30,0.05);
}

.dash-header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.dash-header-right {
  display: flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  margin-left: 16px;
}

.dash-header-left h1 {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 400;
  color: var(--ink-900);
  margin: 0;
  line-height: 1;
}
.dash-header-left p {
  color: var(--ink-300);
  font-size: 0.77rem;
  margin: 5px 0 0;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.corte-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  flex-wrap: wrap;
}

.corte-select-label {
  font-size: 0.78rem;
  color: var(--ink-500);
  font-weight: 700;
}

.corte-select {
  min-width: 220px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--ink-150);
  background: #fff;
  color: var(--ink-900);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  box-shadow: 0 8px 20px rgba(6, 14, 30, 0.06);
}

.corte-select:focus {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 4px rgba(58, 104, 255, 0.12);
}

.dash-user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ink-50);
  border: 1.5px solid var(--ink-200);
  padding: 8px 18px 8px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-800);
  transition: all 0.2s;
  cursor: default;
}
.dash-user-pill:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--blue-400); }

.module-content { display: none; padding: 36px 40px; flex: 1; position: relative; }
.module-content.active { display: block; animation: module-enter 0.3s var(--smooth); }

.soon-card {
  overflow: hidden;
}

.soon-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 22px;
  background: linear-gradient(150deg, #0a2347 0%, #071a33 60%, #020d1f 100%);
  color: var(--white);
}

.soon-ico {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.soon-hero h3 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  margin: 0 0 4px;
}

.soon-hero p {
  color: rgba(255,255,255,0.58);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.soon-body {
  padding: 22px 28px 28px;
}

.soon-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(252,209,22,0.15);
  color: #a07800;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
}

.soon-body p {
  color: var(--ink-400);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  max-width: 680px;
}

@media (max-width: 768px) {
  .nav-soon-badge {
    font-size: 0.58rem;
    padding: 3px 7px;
  }

  .soon-hero {
    padding: 20px 18px 16px;
    gap: 12px;
  }

  .soon-ico {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 1.25rem;
  }

  .soon-hero h3 {
    font-size: 1.25rem;
  }

  .soon-hero p {
    font-size: 0.84rem;
  }

  .soon-body {
    padding: 18px;
  }

  .soon-body p {
    font-size: 0.88rem;
  }
}
@keyframes module-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 15px; left: 15px;
  z-index: 200;
  background: var(--white);
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-md);
  width: 44px; height: 44px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--ink-700);
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sidebar-toggle:hover { background: var(--blue-300); border-color: var(--blue-300); color: var(--white); box-shadow: 0 6px 20px rgba(0,48,135,0.35); }

.mobile-magic-nav {
  display: none;
}

/* ============================================================
   CUSTOM SELECT DROPDOWN
   ============================================================ */
.custom-select-wrap { position: relative; width: 100%; }

.custom-select-trigger {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px 16px;
  background: var(--ink-50);
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.custom-select-trigger:hover { border-color: var(--ink-300); background: var(--white); }
.custom-select-wrap.cs-open .custom-select-trigger {
  border-color: var(--blue-300);
  background: var(--white);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--glow-blue);
}
.custom-select-wrap.cs-disabled .custom-select-trigger { opacity: 0.4; cursor: not-allowed; }

.cs-icon { font-size: 0.9rem; flex-shrink: 0; opacity: 0.6; }
.cs-value { flex: 1; font-size: 0.92rem; color: var(--ink-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-value.cs-selected { color: var(--ink-900); font-weight: 500; }
.cs-arrow { flex-shrink: 0; color: var(--ink-300); transition: transform 0.22s var(--smooth); }
.custom-select-wrap.cs-open .cs-arrow { transform: rotate(180deg); }

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--blue-300);
  border-top: 1px solid var(--ink-100);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-lg), var(--glow-blue);
  z-index: 9999;
  overflow: hidden;
}
.custom-select-wrap.cs-open .custom-select-dropdown { display: block; }

.cs-search-wrap { padding: 10px 12px; background: var(--ink-50); border-bottom: 1px solid var(--ink-100); }

.cs-search {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-md);
  font-size: 0.87rem;
  outline: none;
  background: var(--white);
  font-family: var(--font-body);
  color: var(--ink-900);
  transition: border-color 0.2s;
}
.cs-search::placeholder { color: var(--ink-300); }
.cs-search:focus { border-color: var(--blue-300); box-shadow: var(--glow-blue); }

.cs-options { max-height: 220px; overflow-y: auto; padding: 6px; scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
.cs-options::-webkit-scrollbar { width: 4px; }
.cs-options::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }

.cs-option {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink-800);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all 0.14s;
}
.cs-option:hover { background: var(--blue-50); color: var(--blue-300); padding-left: 18px; font-weight: 500; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1050px) {
  .auth-panel { width: 460px; min-width: 460px; }
  .auth-branding { padding: 56px 48px; }
}

@media (max-width: 900px) {
  .auth-wrapper { flex-direction: column; min-height: 100svh; }
  .auth-branding { width: 100%; min-height: unset; padding: 28px 28px 36px; gap: 20px; }
  .auth-branding::after, .auth-branding::before { display: none; }
  .brand-logo { margin-bottom: 0; }
  .brand-copy { margin-bottom: 0; }
  .brand-copy h1 { font-size: 1.5rem; margin-bottom: 0; }
  .brand-copy p, .brand-features, .brand-eyebrow { display: none; }
  .auth-panel { width: 100%; min-width: unset; padding: 40px 20px 56px; border-radius: 32px 32px 0 0; margin-top: -24px; background: var(--white); box-shadow: 0 -10px 40px rgba(6,14,30,0.12); }
  .auth-form { max-width: 100%; padding: 0 4px; }
}

/* Sidebar backdrop (mobile only) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,13,31,0.55);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* Ensure mobile nav is never visible on desktop */
@media (min-width: 769px) {
  .mobile-magic-nav { display: none !important; }
}

@media (max-width: 768px) {
  .sidebar {
    display: none !important;
  }
  .sidebar {
    transform: none !important;
    box-shadow: none !important;
    width: min(272px, 80vw);
    min-width: unset;
  }
  .sidebar.open { transform: none !important; box-shadow: none !important; }
  .sidebar-toggle {
    display: inline-flex !important;
    top: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    z-index: 240;
  }
  .sidebar-backdrop {
    display: block !important;
    z-index: 219;
  }
  .dashboard-content { margin-left: 0; }
  .dash-header {
    margin: 10px 12px 0;
    padding: 16px 16px 14px 56px;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,255,0.98) 100%);
    border: 1px solid rgba(207, 220, 237, 0.9);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(12, 32, 66, 0.08);
  }
  .dash-header-left {
    width: 100%;
    gap: 6px;
  }
  .dash-header-left h1 {
    font-size: 1.3rem;
    line-height: 1.05;
  }
  .dash-header-left p {
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 2px;
  }
  .dash-header-right {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    align-self: flex-start;
  }
  .dash-user-pill {
    padding: 6px 12px 6px 10px;
    font-size: 0.78rem;
    border-radius: 14px;
  }
  .corte-select-row {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .corte-select-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7486a3;
  }
  .corte-select {
    min-width: 100%;
    width: 100%;
    max-width: none;
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 8px 20px rgba(12, 32, 66, 0.06);
  }
  .module-content { padding: 14px 12px 20px; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-header { padding: 22px 24px 18px; }
  .modal-body { padding: 24px; }
  .modal-footer { padding: 16px 24px; flex-direction: column-reverse; }
  .modal-footer .btn-primary,
  .modal-footer .btn-secondary { width: 100%; justify-content: center; }

  .mobile-magic-nav {
    position: fixed;
    top: 58px;
    left: 10px;
    bottom: auto;
    right: auto;
    transform: translateY(-8px) scale(0.96);
    z-index: 220;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 68px;
    max-height: calc(100vh - 88px);
    padding: 10px 6px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(201, 214, 232, 0.82);
    border-radius: 26px;
    box-shadow: 0 12px 28px rgba(6,14,30,0.12), 0 2px 10px rgba(6,14,30,0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
    scrollbar-width: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.22s ease;
  }
  .mobile-magic-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .mobile-magic-nav::-webkit-scrollbar { display: none; }

  .mobile-magic-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    width: 100%;
    min-height: 58px;
    padding: 8px 2px 6px;
    color: #7a8ea8;
    text-decoration: none;
    background: transparent;
    border-radius: 16px;
    border: none;
    scroll-snap-align: center;
  }

  .mobile-magic-item:hover {
    background: transparent;
    color: #35557a;
  }

  .mobile-magic-item.active {
    background: rgba(63, 111, 255, 0.08);
    color: #0a2347;
    box-shadow: none;
    transform: translateX(-4px);
  }

  .mobile-magic-logout {
    margin-top: 4px;
    color: #b45309;
  }
  .mobile-magic-logout:hover {
    color: #b91c1c;
  }

  .mobile-magic-icon {
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-magic-item.active:not(.mobile-magic-item-center) .mobile-magic-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 2px;
    background: linear-gradient(180deg, #3f6fff 0%, #6c78ff 100%);
    border: 3px solid #ffffff;
    color: #fff;
    box-shadow: 0 10px 20px rgba(73, 95, 255, 0.24), inset 0 0 0 1px rgba(255,255,255,0.22);
  }

  .mobile-magic-text {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    max-width: 54px;
  }

  .mobile-magic-item-center {
    transform: none;
  }

  .mobile-magic-orb {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .mobile-magic-item-center .mobile-magic-icon {
    font-size: 1.18rem;
    color: #496786;
  }

  .mobile-magic-item-center.active {
    transform: translateX(-4px);
  }

  .mobile-magic-item-center.active .mobile-magic-orb {
    width: 42px;
    height: 42px;
    background: linear-gradient(180deg, #3f6fff 0%, #6c78ff 100%);
    border: 3px solid #ffffff;
    color: #fff;
    box-shadow: 0 10px 20px rgba(73, 95, 255, 0.24), inset 0 0 0 1px rgba(255,255,255,0.22);
  }

  .mobile-magic-item-center.active .mobile-magic-icon {
    color: #fff;
  }
}

@media (max-width: 600px) {
  .dash-header {
    padding-right: 12px;
    padding-left: 54px;
  }
  .dash-user-pill {
    border-radius: 16px;
  }
  .mobile-magic-nav {
    left: 10px;
    width: 64px;
    border-radius: 22px;
    padding: 8px 4px;
  }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: 28px 28px 0 0; max-height: 95svh; width: 100%; }
  .modal-header { padding: 20px 20px 16px; }
  .modal-body { padding: 18px 20px; }
  .modal-footer { padding: 14px 20px 28px; gap: 8px; }
  .modal-icon { width: 44px; height: 44px; border-radius: 14px; }
  .modal-header h2 { font-size: 1.35rem; }
}

@media (max-width: 520px) {
  .auth-branding {
    padding: 22px 18px 26px;
  }

  .brand-logo {
    margin-bottom: 0;
  }

  .brand-logo span {
    font-size: 1rem;
  }

  .auth-panel {
    padding: 30px 14px 42px;
    border-radius: 28px 28px 0 0;
    margin-top: -18px;
  }

  .auth-form {
    padding: 0;
  }

  .form-header {
    margin-bottom: 28px;
  }

  .form-header h2 {
    font-size: 1.8rem;
  }

  .form-body {
    gap: 18px;
    margin-bottom: 22px;
  }

  .input-wrap input {
    padding-top: 13px;
    padding-bottom: 13px;
    font-size: 16px;
  }

  .btn-primary,
  .btn-secondary {
    min-height: 48px;
  }

  .btn-primary svg {
    flex-shrink: 0;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal-box {
    max-height: 96svh;
    border-radius: 24px 24px 0 0;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-grid {
    gap: 14px;
  }

  .custom-select-trigger,
  .input-wrap,
  .cs-search {
    min-height: 48px;
  }
}

@media (max-width: 380px) {
  .auth-branding {
    padding: 18px 14px 22px;
  }

  .auth-panel {
    padding: 24px 12px 36px;
  }

  .form-header h2 {
    font-size: 1.55rem;
  }

  .form-header p,
  .form-hint,
  .link-btn {
    font-size: 0.8rem;
  }

  .brand-logo svg {
    width: 34px;
    height: 34px;
  }
}

