/* ========================================================
   BÚNKER DESIGN SYSTEM (THEME TOKENS & WHITE-LABEL)
   ======================================================== */
:root {
  /* Fondo y Atmósfera Búnker */
  --bg-base: #07090e;
  --bg-radial: #111d33;
  
  /* Contenedores */
  --card-bg: rgba(17, 24, 39, 0.95);
  --card-border: rgba(59, 130, 246, 0.2);
  --card-glow: rgba(59, 130, 246, 0.08);
  --card-shadow: rgba(0, 0, 0, 0.8);
  
  /* Color Primario / Botones (Default: Esmeralda) */
  --btn-primary-start: #10b981;
  --btn-primary-end: #059669;
  --btn-primary-hover-start: #34d399;
  --btn-primary-hover-end: #059669;
  --btn-shadow: rgba(16, 185, 129, 0.35);
  --btn-shadow-hover: rgba(16, 185, 129, 0.45);
  --accent-color: #3b82f6;

  /* Textos */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #6b7280;
  
  /* Formularios */
  --input-bg: #0b0f19;
  --input-bg-focus: #0d1322;
  --border-input: #1f2937;

  /* Badges */
  --badge-bg: rgba(16, 185, 129, 0.1);
  --badge-border: rgba(16, 185, 129, 0.25);
  --badge-text: #34d399;
}

/* ========================================================
   PRESETS DE MARCA BLANCA PARA CLIENTES
   ======================================================== */
/* 1. Azul Titán (Corporativo / Tech) */
[data-theme="blue"] {
  --btn-primary-start: #2563eb;
  --btn-primary-end: #1d4ed8;
  --btn-primary-hover-start: #3b82f6;
  --btn-primary-hover-end: #1d4ed8;
  --btn-shadow: rgba(37, 99, 235, 0.35);
  --btn-shadow-hover: rgba(37, 99, 235, 0.45);
  --accent-color: #60a5fa;
  --badge-bg: rgba(37, 99, 235, 0.1);
  --badge-border: rgba(37, 99, 235, 0.3);
  --badge-text: #60a5fa;
}

/* 2. Black & Gold (Inmobiliarias / Joyerías / VIP) */
[data-theme="gold"] {
  --btn-primary-start: #d97706;
  --btn-primary-end: #b45309;
  --btn-primary-hover-start: #f59e0b;
  --btn-primary-hover-end: #b45309;
  --btn-shadow: rgba(217, 119, 6, 0.35);
  --btn-shadow-hover: rgba(217, 119, 6, 0.45);
  --accent-color: #fbbf24;
  --badge-bg: rgba(217, 119, 6, 0.1);
  --badge-border: rgba(217, 119, 6, 0.3);
  --badge-text: #fbbf24;
}

/* 3. Operación Carmesí (Seguridad / Automotriz) */
[data-theme="crimson"] {
  --btn-primary-start: #e11d48;
  --btn-primary-end: #be123c;
  --btn-primary-hover-start: #f43f5e;
  --btn-primary-hover-end: #be123c;
  --btn-shadow: rgba(225, 29, 72, 0.35);
  --btn-shadow-hover: rgba(225, 29, 72, 0.45);
  --accent-color: #fb7185;
  --badge-bg: rgba(225, 29, 72, 0.1);
  --badge-border: rgba(225, 29, 72, 0.3);
  --badge-text: #fb7185;
}

/* 4. Violeta Neón (Agencias / Moda / Creativos) */
[data-theme="violet"] {
  --btn-primary-start: #8b5cf6;
  --btn-primary-end: #7c3aed;
  --btn-primary-hover-start: #a78bfa;
  --btn-primary-hover-end: #7c3aed;
  --btn-shadow: rgba(139, 92, 246, 0.35);
  --btn-shadow-hover: rgba(139, 92, 246, 0.45);
  --accent-color: #c4b5fd;
  --badge-bg: rgba(139, 92, 246, 0.1);
  --badge-border: rgba(139, 92, 246, 0.3);
  --badge-text: #c4b5fd;
}

/* Reset y Layout */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

body {
  background: radial-gradient(circle at 50% 0%, var(--bg-radial) 0%, var(--bg-base) 75%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

/* Tarjeta Principal */
.bunker-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 36px 28px;
  box-shadow: 0 25px 50px -12px var(--card-shadow), 0 0 30px var(--card-glow);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.bunker-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-color), var(--btn-primary-start), transparent);
}

/* Selector Flotante de Temas (Demo / Configuración) */
.theme-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #1f2937;
  transition: transform 0.2s, border-color 0.2s;
}
.theme-dot:hover { transform: scale(1.2); }
.dot-emerald { background: #10b981; }
.dot-blue { background: #2563eb; }
.dot-gold { background: #d97706; }
.dot-crimson { background: #e11d48; }
.dot-violet { background: #8b5cf6; }

/* Cabecera y Logos */
.header { text-align: center; margin-bottom: 24px; }
.brand-logo-slot {
  max-height: 48px;
  max-width: 180px;
  margin: 0 auto 12px auto;
  display: block;
  object-fit: contain;
}

.badge-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--badge-text);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; color: #fff; margin-bottom: 6px; }
.header p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }

/* Formularios */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #d1d5db; margin-bottom: 6px; }

.input-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
}

.input-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: var(--input-bg-focus);
}

/* Selector Multicanal */
.channels-title { font-size: 0.8rem; font-weight: 600; color: #d1d5db; margin-bottom: 8px; margin-top: 20px; }
.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.channel-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #0d121f;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.channel-chip:hover { border-color: rgba(59, 130, 246, 0.4); }
.channel-chip input[type="checkbox"] { accent-color: var(--btn-primary-start); width: 16px; height: 16px; cursor: pointer; }
.channel-label { font-size: 0.8rem; color: #e5e7eb; font-weight: 500; }
.channel-tag { font-size: 0.65rem; color: var(--text-muted); margin-left: auto; }

/* Botones */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, var(--btn-primary-start) 0%, var(--btn-primary-end) 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--btn-shadow);
  margin-top: 8px;
}

.btn-submit:hover {
  background: linear-gradient(180deg, var(--btn-primary-hover-start) 0%, var(--btn-primary-hover-end) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--btn-shadow-hover);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.footer-note { text-align: center; margin-top: 16px; font-size: 0.75rem; color: var(--text-dark); }

/* QR */
#qr-section { display: none; text-align: center; }
#qr-box {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  margin: 20px 0;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}
#qr-img { width: 230px; height: 230px; display: block; border-radius: 6px; }

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Sello Powered By Softapatio (Inamovible) */
.powered-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.powered-footer a {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.powered-footer a:hover {
  color: var(--accent-color);
}
