:root {
  --bg-dark: #0b0f19;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #f5c518;
  --accent-hover: #eab308;
  --accent-soft: rgba(245, 197, 24, 0.14);
  --secondary: #3b82f6;
  --danger: #ef4444;
  --success: #10b981;
}

/* Transición progresiva de temas según avanza de sección */
body.theme-corporate {
  --bg-dark: #0b0f19;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --border-color: #334155;
  --accent: #f5c518;
  --accent-hover: #eab308;
  --accent-soft: rgba(245, 197, 24, 0.14);
  background-image:
    radial-gradient(circle at 15% 40%, rgba(245, 197, 24, 0.06), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(29, 78, 216, 0.08), transparent 45%);
}

/* Tema Romántico (Sus colores favoritos: Rosa y Amarillo cálido) */
body.theme-romantic {
  --bg-dark: #160d1a;
  --bg-panel: #221329;
  --bg-card: #2d1937;
  --border-color: #582c66;
  --accent: #f472b6;
  --accent-hover: #ec4899;
  --accent-soft: rgba(244, 114, 182, 0.16);
  background-image:
    radial-gradient(circle at 15% 25%, rgba(244, 114, 182, 0.14), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(250, 204, 21, 0.10), transparent 45%);
}

/* Tema Picante / Confidencial +18 (Carmesí, Fuego y Rosa Intenso) */
body.theme-spicy {
  --bg-dark: #14070c;
  --bg-panel: #210a12;
  --bg-card: #2e0f1b;
  --border-color: #6b1d36;
  --accent: #fb7185;
  --accent-hover: #f43f5e;
  --accent-soft: rgba(244, 63, 94, 0.18);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(225, 29, 72, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.10), transparent 45%);
}

/* Tema Declaración Final (Rosa Dorado y Amarillo Brillante) */
body.theme-final {
  --bg-dark: #140c1c;
  --bg-panel: #1f132b;
  --bg-card: #2b1b3d;
  --border-color: #7e3af2;
  --accent: #facc15;
  --accent-hover: #eab308;
  --accent-soft: rgba(250, 204, 21, 0.18);
  background-image:
    radial-gradient(circle at 50% 20%, rgba(244, 114, 182, 0.2), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(250, 204, 21, 0.15), transparent 50%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.6s ease, color 0.4s ease;
}

.mono-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* Topbar de sistema */
.sys-topbar {
  background: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: border-color 0.5s ease;
}

.sys-topbar-left,
.sys-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.badge-security {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  transition: all 0.4s ease;
}

/* Contenedor principal de Login */
.login-wrapper {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 1200px;
  width: 100%;
  margin: auto;
  padding: 2.5rem 2rem;
  gap: 3rem;
  align-items: center;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding-right: 1rem;
}

.gru-logo-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--accent);
}

.gru-g-svg {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(245, 197, 24, 0.2));
}

.brand-titles h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-titles p {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

.security-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.75rem;
  backdrop-filter: blur(8px);
}

.card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.security-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.security-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.corp-Specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.1rem;
}

.corp-Specs li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.spec-code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* Gafas Minion interactivas */
.brand-footer {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: #64748b;
  padding-top: 0.5rem;
}

.minion-eyes-watermark {
  display: flex;
  align-items: center;
}

.goggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #94a3b8;
  padding: 4px;
  border: 2px solid #475569;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  margin-right: -4px;
}

.eye {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.pupil {
  width: 10px;
  height: 10px;
  background: #422006;
  border-radius: 50%;
  border: 2px solid #713f12;
  transition: transform 0.06s linear;
}

/* Tarjeta de Login */
.auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.auth-card-header {
  margin-bottom: 1.75rem;
}

.step-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.auth-card-header h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.auth-card-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 500;
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-hint {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input,
.form-group select,
.q-input,
.q-textarea {
  width: 100%;
  background: rgba(11, 17, 32, 0.75);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.94rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s;
}

.input-wrapper input:focus,
.form-group select:focus,
.q-input:focus,
.q-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
}

.hint-box {
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  color: #fde047;
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-check input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.error-banner {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.btn-corp-primary,
.btn-nav-primary {
  background: var(--accent);
  color: #0f172a;
  border: none;
  padding: 0.9rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.15s, background-color 0.25s, box-shadow 0.25s;
}

.btn-corp-primary:hover,
.btn-nav-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-soft);
}

.btn-nav-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-nav-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ticket-info {
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.72rem;
}

/* ==========================================
   VISTA 2: FORMULARIO MULTIFASE
   ========================================== */
.form-portal {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}

.expediente-header {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: all 0.5s ease;
}

.expediente-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
}

.exp-saved {
  color: #34d399;
  font-size: 0.75rem;
}

.expediente-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.exp-subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.exp-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.exp-instructions {
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  margin-bottom: 1.4rem;
}

/* Barra de fases clicables */
.steps-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.step-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 0.4rem;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}

.step-pill:hover {
  border-color: var(--accent);
  color: #fff;
}

.step-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.step-pill.completed {
  border-color: rgba(16, 185, 129, 0.45);
  color: #cbd5e1;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease, background-color 0.4s ease;
}

/* Alerta de transformación de humor/ambiente */
.mood-alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  transition: all 0.5s ease;
}

.mood-icon {
  font-size: 1.65rem;
}

.mood-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mood-text strong {
  font-size: 0.88rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.mood-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Cabecera de la sección actual */
.step-section-header {
  margin-bottom: 1.25rem;
}

.step-section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.step-section-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Tarjetas de cada pregunta */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.question-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  transition: border-color 0.25s, transform 0.2s, background-color 0.5s;
}

.question-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.question-card.destacada {
  border: 2px solid var(--accent);
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-card));
  box-shadow: 0 0 28px var(--accent-soft);
}

.q-header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.q-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.q-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
}

.q-req {
  color: var(--accent);
  margin-left: 0.25rem;
}

.q-textarea {
  min-height: 105px;
  resize: vertical;
  line-height: 1.5;
}

/* Opciones Tipo Test (A, B, C, D) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(11, 17, 32, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 0.8rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  line-height: 1.35;
}

.option-label:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.option-label input[type="radio"] {
  display: none;
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-label.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
}

.option-label.selected .option-letter {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f172a;
}

/* Botonera inferior de navegación */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.step-counter {
  color: var(--text-muted);
}

.exp-footer {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  opacity: 0.8;
}

/* ==========================================
   VISTA 3: RESOLUCIÓN FINAL APROBADA
   ========================================== */
.final-view {
  margin: auto;
  max-width: 680px;
  width: 100%;
  padding: 2.5rem 1.5rem;
}

.final-card {
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 2.75rem 2.25rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  position: relative;
}

.stamp-approved {
  display: inline-block;
  border: 2px solid #34d399;
  color: #34d399;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border-radius: 6px;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  transform: rotate(-2deg);
}

.final-icon {
  font-size: 3.2rem;
  margin-bottom: 0.8rem;
}

.final-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.9rem;
}

.final-message {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.final-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.secret-love-trigger {
  margin-bottom: 1.5rem;
}

.btn-emergency-love {
  width: 100%;
  background: linear-gradient(135deg, #f472b6, #facc15);
  color: #0f172a;
  border: none;
  padding: 1.05rem 1.4rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulseGlow 2s infinite;
}

.btn-emergency-love:hover {
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(250, 204, 21, 0.65);
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(244, 114, 182, 0.4); }
  50% { box-shadow: 0 0 32px rgba(250, 204, 21, 0.7); }
}

.personal-note-box {
  background: linear-gradient(145deg, rgba(244, 114, 182, 0.16), rgba(250, 204, 21, 0.14));
  border: 2px solid #f472b6;
  border-radius: 14px;
  padding: 1.65rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 12px 35px rgba(244, 114, 182, 0.25);
  animation: revealNote 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealNote {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.note-kittens-header {
  font-size: 1.6rem;
  margin-bottom: 0.65rem;
  letter-spacing: 0.2em;
}

.personal-note-text {
  font-size: 1.12rem;
  line-height: 1.65;
  color: #fff;
  font-weight: 500;
  font-style: italic;
}

/* Partículas flotantes de corazones rosas/amarillos y gatitos */
.floating-particle {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  animation: floatUpParticle linear forwards;
}

@keyframes floatUpParticle {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.7);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(1.25);
    opacity: 0;
  }
}

.final-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.btn-link-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.5rem;
  text-decoration: underline;
}

.copy-feedback {
  margin-top: 1rem;
  color: #34d399;
  font-size: 0.88rem;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .sys-topbar {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }
  .steps-nav {
    grid-template-columns: repeat(3, 1fr);
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
}
