/**
 * NEXUS Enterprise Identity & Registration System Stylesheet
 * Ultra-Responsive, High-Security, Fintech/Cyber Grade UI
 */

/* Modal Backdrop & Viewport Fit */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px;
  box-sizing: border-box;
  animation: authFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.open {
  display: flex !important;
}

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Card Container */
.auth-card {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  background: #090e1d;
  background: linear-gradient(165deg, rgba(14, 23, 47, 0.96) 0%, rgba(6, 10, 23, 0.98) 100%);
  border: 1px solid rgba(0, 245, 255, 0.28);
  border-radius: 18px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 245, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  animation: authSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Header */
.auth-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(3, 7, 18, 0.6);
  flex-shrink: 0;
}

.auth-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-header-shield {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f5ff;
  font-size: 1.15rem;
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.25);
  flex-shrink: 0;
}

.auth-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
}

.auth-header-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  margin-top: 1px;
}

.auth-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Scrollable Content Body */
.auth-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

/* Custom Scrollbar */
.auth-body::-webkit-scrollbar {
  width: 5px;
}
.auth-body::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 255, 0.25);
  border-radius: 10px;
}

/* Segmented Control Tabs */
.auth-nav-tabs {
  display: flex;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  padding: 4px;
  gap: 4px;
  flex-shrink: 0;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  white-space: nowrap;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(139, 92, 246, 0.25));
  color: #ffffff;
  border: 1px solid rgba(0, 245, 255, 0.4);
  box-shadow: 0 2px 10px rgba(0, 245, 255, 0.15);
}

/* Security Trust Banner */
.auth-trust-banner {
  background: rgba(0, 245, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.auth-trust-banner-icon {
  color: #00f5ff;
  font-size: 1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Form Groups & Inputs */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-field-label small {
  font-weight: 500;
  color: #64748b;
  text-transform: none;
}

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

.auth-input-icon {
  position: absolute;
  left: 12px;
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(3, 7, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #ffffff;
  padding: 11px 40px 11px 38px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: #00f5ff;
  background: rgba(3, 7, 18, 0.95);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.18);
}

.auth-input:focus ~ .auth-input-icon {
  color: #00f5ff;
}

.auth-input::placeholder {
  color: #475569;
  font-size: 0.82rem;
}

/* Eye Show/Hide Password Toggle */
.auth-pwd-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.auth-pwd-toggle:hover {
  color: #00f5ff;
}

/* Password Strength Meter */
.auth-pwd-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.auth-pwd-bars {
  display: flex;
  gap: 4px;
  height: 4px;
}

.auth-pwd-bar-seg {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: background 0.25s ease;
}

.auth-pwd-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-family: var(--font-mono, monospace);
  color: #64748b;
}

.auth-pwd-status-text {
  font-weight: 700;
}

/* Cognitive Style Selector */
.auth-select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(3, 7, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #ffffff;
  padding: 10px 14px 10px 38px;
  font-size: 0.84rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300f5ff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.auth-select:focus {
  border-color: #00f5ff;
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.18);
}

.auth-select option {
  background: #090e1d;
  color: #fff;
}

/* Checkbox & Terms */
.auth-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.45;
  cursor: pointer;
  margin-top: 4px;
}

.auth-consent-checkbox {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #00f5ff;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-consent-link {
  color: #00f5ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Primary Action Button */
.auth-submit-btn {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #00f5ff 0%, #2563eb 100%);
  color: #02040a;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 245, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 245, 255, 0.5);
  filter: brightness(1.1);
}

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

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

/* Feedback Alert Message */
.auth-feedback-box {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  display: none;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  box-sizing: border-box;
}

.auth-feedback-box.error {
  display: flex;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-feedback-box.success {
  display: flex;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Security Seals / Trust Footer */
.auth-footer-seals {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 20px 16px;
  background: rgba(3, 7, 18, 0.65);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  flex-shrink: 0;
}

.auth-seal-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

.auth-seal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f5ff;
  box-shadow: 0 0 6px #00f5ff;
  flex-shrink: 0;
}

/* Authenticated Account Profile View */
.auth-user-cockpit {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-user-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-user-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-user-badge {
  background: rgba(0, 245, 255, 0.15);
  border: 1px solid rgba(0, 245, 255, 0.4);
  color: #00f5ff;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Responsive Breakpoints */
@media (max-width: 480px) {
  .auth-modal-backdrop {
    padding: 8px;
  }
  .auth-card {
    max-height: 94vh;
    border-radius: 14px;
  }
  .auth-header {
    padding: 14px 16px 12px;
  }
  .auth-body {
    padding: 14px 16px 16px;
    gap: 14px;
  }
  .auth-tab-btn {
    font-size: 0.76rem;
    padding: 8px 6px;
  }
  .auth-input {
    font-size: 0.85rem;
    padding: 10px 36px 10px 34px;
  }
  .auth-input-icon {
    left: 10px;
  }
  .auth-footer-seals {
    grid-template-columns: 1fr;
    padding: 12px 16px;
    gap: 6px;
  }
}
