/* =====================================================================
   VAC-AP  -  Estilos compartidos para login, 2FA e instalador
   ===================================================================== */

:root {
  --vac-blue: #3B82F6;
  --vac-blue-dark: #1F3A8A;
  --vac-blue-deep: #0F1E47;
  --ap-orange: #EFA126;
  --ap-orange-dark: #C7821A;
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --green:   #16A34A;
  --red:     #DC2626;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow:    0 4px 14px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0F1E47 0%, #1F3A8A 45%, #2C4FB3 100%);
  min-height: 100vh;
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
}

body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

/* Decoración de fondo: círculos suaves */
body.auth-page::before,
body.auth-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
  z-index: 0;
}
body.auth-page::before {
  width: 480px; height: 480px;
  background: var(--vac-blue);
  top: -120px; left: -120px;
}
body.auth-page::after {
  width: 420px; height: 420px;
  background: var(--ap-orange);
  bottom: -160px; right: -120px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  animation: cardIn .35s ease-out;
}
.auth-card--wide { max-width: 560px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.auth-logo img { height: 110px; }

.auth-title {
  text-align: center;
  font-size: 14px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  margin: 0 0 6px;
}
.auth-subtitle {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 28px;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--vac-blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.form-control--code {
  font-size: 22px;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 700;
  font-family: 'Consolas', 'Courier New', monospace;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s, background .15s;
  font-family: inherit;
  letter-spacing: .3px;
}
.btn--primary {
  background: linear-gradient(135deg, var(--vac-blue-dark), var(--vac-blue));
  color: #fff;
  box-shadow: 0 6px 14px rgba(31,58,138,.25);
}
.btn--primary:hover { box-shadow: 0 8px 22px rgba(31,58,138,.35); }
.btn--primary:active { transform: translateY(1px); }
.btn--secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn--secondary:hover { background: var(--gray-200); }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert--error {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}
.alert--info {
  background: #EFF6FF;
  color: #1E40AF;
  border-color: #BFDBFE;
}
.alert--success {
  background: #F0FDF4;
  color: #166534;
  border-color: #BBF7D0;
}
.alert--warn {
  background: #FFFBEB;
  color: #92400E;
  border-color: #FDE68A;
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
}
.auth-footer img { height: 22px; vertical-align: middle; opacity: .75; }

.muted { color: var(--gray-500); font-size: 13px; }
.text-center { text-align: center; }

.step-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.step-bar > div {
  flex: 1;
  height: 5px;
  background: var(--gray-200);
  border-radius: 999px;
  transition: background .2s;
}
.step-bar > div.active {
  background: linear-gradient(90deg, var(--vac-blue), var(--ap-orange));
}

.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}
.qr-wrap img {
  border: 8px solid #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.totp-secret {
  text-align: center;
  font-family: 'Consolas', monospace;
  font-size: 16px;
  padding: 10px;
  background: var(--gray-50);
  border-radius: 8px;
  letter-spacing: 1px;
  color: var(--gray-700);
  margin: 10px 0 20px;
  word-break: break-all;
}
