/* ==========================================================================
   SendInYellow Auth & MFA Styling
   Brand Colors: Saffron (#FFC400), Slate Dark (#0F172A), Navy Card (#1E293B)
   ========================================================================== */

/* Fullscreen Auth Portal Overlay */
#auth-portal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 15%, #1e293b 0%, #0b0f19 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #f8fafc;
}

#auth-portal[hidden] {
  display: none !important;
}

/* Central Authentication Card */
.auth-card {
  width: 100%;
  max-width: 480px;
  background: #182234;
  border: 1px solid #2d3b53;
  border-radius: 16px;
  padding: 34px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 196, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b38600, #ffc400, #ffd859);
}

/* Header Branding */
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #ffc400;
  color: #111827;
  font-weight: 900;
  font-size: 24px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(255, 196, 0, 0.35);
  letter-spacing: -1px;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

/* Demo Access Quick Banner */
.auth-demo-banner {
  background: rgba(255, 196, 0, 0.08);
  border: 1px solid rgba(255, 196, 0, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffc400;
  color: #111827;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.auth-demo-desc {
  font-size: 11px;
  color: #ffd859;
  font-weight: 600;
}

.auth-demo-creds {
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 196, 0, 0.15);
}

.auth-demo-creds code {
  color: #ffc400;
  font-family: Consolas, monospace;
  font-weight: 700;
  background: none;
  padding: 0;
}

.btn-demo-quick {
  background: linear-gradient(180deg, #ffc400 0%, #e5b000 100%);
  color: #111827;
  border: 0;
  padding: 7px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-demo-quick:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(255, 196, 0, 0.3);
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #283548;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-weight: 600;
  font-size: 13px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s ease;
}

.auth-tab.active {
  background: #1e293b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Form Elements */
.auth-form-group {
  margin-bottom: 15px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  color: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  outline: none;
  border-color: #ffc400;
  box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.2);
}

.auth-input::placeholder {
  color: #64748b;
}

.auth-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 18px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.auth-checkbox input {
  accent-color: #ffc400;
  cursor: pointer;
}

.auth-link {
  color: #ffc400;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-link:hover {
  color: #ffd859;
  text-decoration: underline;
}

/* Primary Submit Button */
.btn-auth-primary {
  width: 100%;
  background: #ffc400;
  color: #111827;
  border: 0;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 196, 0, 0.25);
}

.btn-auth-primary:hover {
  background: #ffd138;
  transform: translateY(-1px);
}

.btn-auth-primary:active {
  transform: translateY(0);
}

/* Secondary Button / Back Link */
.btn-auth-secondary {
  width: 100%;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.15s;
}

.btn-auth-secondary:hover {
  background: #1e293b;
  border-color: #475569;
}

/* Alerts / Errors */
.auth-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-alert.error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid #dc2626;
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid #16a34a;
  color: #86efac;
}

.auth-alert.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}

/* ==========================================================================
   MFA View Specifics (4-Character Pin: 2 Numbers, 2 Letters)
   ========================================================================== */
.mfa-pin-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
}

.mfa-pin-input {
  width: 58px;
  height: 64px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 10px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: #ffc400;
  font-family: Consolas, monospace;
  text-transform: uppercase;
  caret-color: #ffc400;
  transition: all 0.15s ease;
}

.mfa-pin-input:focus {
  outline: none;
  border-color: #ffc400;
  box-shadow: 0 0 0 4px rgba(255, 196, 0, 0.25);
  background: #141f33;
}

.mfa-pin-input.filled {
  border-color: #eab308;
  background: #141f33;
}

.mfa-hint {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  margin-top: -8px;
  margin-bottom: 20px;
}

.mfa-hint strong {
  color: #ffd859;
}

.mfa-resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 16px;
  color: #94a3b8;
}

.btn-link {
  background: none;
  border: 0;
  color: #ffc400;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
}

.btn-link:disabled {
  color: #64748b;
  cursor: not-allowed;
  text-decoration: none;
}

/* Simulated Email Notification Toast (Top Right) */
.email-sim-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  width: min(380px, 92vw);
  background: #1e293b;
  border: 1px solid #ffc400;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 196, 0, 0.25);
  animation: slideInEmail 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
}

@keyframes slideInEmail {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.email-sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 1px solid #334155;
  padding-bottom: 6px;
}

.email-sim-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #ffc400;
  text-transform: uppercase;
}

.email-sim-close {
  background: none;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.email-sim-body {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.email-sim-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  border: 1px dashed #ffc400;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0 6px;
}

.email-sim-code {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffc400;
  font-family: Consolas, monospace;
}

.btn-quick-fill {
  background: #ffc400;
  color: #111827;
  border: 0;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-quick-fill:hover {
  background: #ffd859;
}

/* ==========================================================================
   Header Session Indicator Pill
   ========================================================================== */
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff6d6;
  border: 1px solid #f1dc8a;
  color: #8a6200;
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.session-pill:hover {
  background: #ffecb3;
  border-color: #e5b000;
}

.session-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulseGreen 2s infinite;
}

.session-pill.warning .session-pulse {
  background: #dc2626;
  animation: pulseRed 1s infinite;
}

.session-pill.warning {
  background: #fde8e8;
  border-color: #f8b4b4;
  color: #9b1c1c;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

@keyframes pulseRed {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}
