/* ============================================================
   FAA DER Audit System — Login Page Styles
   Self-contained: no external dependencies beyond Inter font
   ============================================================ */

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

:root {
  --navy-bg:      #1a2744;
  --navy-mid:     #1e3060;
  --navy-light:   #253a6e;
  --navy-border:  rgba(255, 255, 255, 0.10);
  --gold:         #c8902a;
  --gold-light:   #e0aa4a;
  --accent-blue:  #1e6eb5;
  --accent-hover: #1a5e9e;
  --accent-light: #e8f1fb;
  --white:        #ffffff;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-700:     #374151;
  --gray-800:     #1f2937;
  --red-600:      #dc2626;
  --red-50:       #fef2f2;
  --red-200:      #fecaca;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --radius:       6px;
  --radius-lg:    10px;
  --shadow-form:  0 1px 3px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
}

html, body {
  height: 100%;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--navy-bg);
  min-height: 100vh;
}

/* ── LAYOUT ─────────────────────────────────────────────── */

.login-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── LEFT PANEL ──────────────────────────────────────────── */

.login-left {
  flex: 0 0 42%;
  background: var(--navy-bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30, 110, 181, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, var(--navy-bg) 0%, #0f1b35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  border-right: 1px solid var(--navy-border);
  position: relative;
  overflow: hidden;
}

/* Subtle pattern overlay */
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.012) 60px,
      rgba(255,255,255,0.012) 61px
    );
  pointer-events: none;
}

.left-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  max-width: 340px;
  width: 100%;
}

/* ── FAA SEAL ────────────────────────────────────────────── */

.faa-seal {
  width: 130px;
  height: 130px;
  margin-bottom: 28px;
  filter: drop-shadow(0 4px 16px rgba(200, 144, 42, 0.25));
  transition: filter 0.3s ease;
}

.faa-seal:hover {
  filter: drop-shadow(0 6px 24px rgba(200, 144, 42, 0.40));
}

.faa-seal svg {
  width: 100%;
  height: 100%;
}

/* ── SYSTEM NAME ─────────────────────────────────────────── */

.system-name {
  margin-bottom: 20px;
}

.system-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--white);
  line-height: 1.2;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.system-subtitle {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

/* ── REGULATORY BADGE ────────────────────────────────────── */

.reg-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 144, 42, 0.12);
  border: 1px solid rgba(200, 144, 42, 0.30);
  border-radius: 40px;
  padding: 5px 14px 5px 10px;
  margin-bottom: 28px;
}

.reg-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(200, 144, 42, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(200,144,42,0.7); }
  50%       { opacity: 0.6; box-shadow: 0 0 10px rgba(200,144,42,0.4); }
}

.reg-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-transform: uppercase;
}

/* ── DIVIDER ─────────────────────────────────────────────── */

.left-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--navy-border), var(--navy-border), transparent);
  margin-bottom: 24px;
}

/* ── FEATURE LIST ────────────────────────────────────────── */

.feature-list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 36px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
  text-align: left;
  letter-spacing: 0.01em;
}

.feature-list li svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* ── LEFT FOOTER ─────────────────────────────────────────── */

.left-footer {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
  line-height: 1.6;
  border-top: 1px solid var(--navy-border);
  padding-top: 20px;
  width: 100%;
}

/* ── RIGHT PANEL ─────────────────────────────────────────── */

.login-right {
  flex: 1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.right-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── FORM HEADER ─────────────────────────────────────────── */

.form-header {
  margin-bottom: 32px;
}

.form-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.form-sub {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 400;
}

/* ── FORM ────────────────────────────────────────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

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

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.01em;
}

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

.input-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  flex-shrink: 0;
}

.field-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.field-input:hover {
  border-color: var(--gray-400);
}

.field-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(30, 110, 181, 0.12);
}

/* password toggle */
.toggle-pw {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.toggle-pw:hover { opacity: 1; }
.toggle-pw svg { width: 18px; height: 18px; }

/* ── ERROR ────────────────────────────────────────────────── */

.error-msg {
  font-size: 13px;
  font-weight: 500;
  color: var(--red-600);
  background: var(--red-50);
  border: 1px solid var(--red-200);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: none;
  margin-top: -4px;
}

.error-msg.visible {
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-msg::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='6.5' stroke='%23dc2626' stroke-width='1.2'/%3E%3Cpath d='M8 4.5V8.5M8 10.5v.5' stroke='%23dc2626' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── LOGIN BUTTON ─────────────────────────────────────────── */

.login-btn {
  width: 100%;
  height: 46px;
  background: var(--accent-blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 3px rgba(30, 110, 181, 0.25), 0 4px 12px rgba(30, 110, 181, 0.15);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.login-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
  pointer-events: none;
}

.login-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 2px 6px rgba(30, 110, 181, 0.35), 0 6px 20px rgba(30, 110, 181, 0.20);
  transform: translateY(-1px);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(30, 110, 181, 0.25);
}

.login-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── CREDENTIALS HINT ─────────────────────────────────────── */

.credentials-hint {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.hint-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.hint-header svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hint-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
  border-top: 1px solid var(--gray-100);
}

.hint-row:first-of-type {
  border-top: none;
}

.hint-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  min-width: 66px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hint-row code {
  font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  font-weight: 500;
  background: var(--gray-200);
  color: var(--gray-800);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
  user-select: all;
}

.hint-row code:hover {
  background: #d1d5db;
}

.hint-sep {
  color: var(--gray-400);
  font-size: 13px;
}

/* ── FOOTER NOTE ──────────────────────────────────────────── */

.login-footer-note {
  font-size: 11.5px;
  color: var(--gray-400);
  line-height: 1.65;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — stack vertically on mobile
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .login-wrap {
    flex-direction: column;
    min-height: 100vh;
  }

  .login-left {
    flex: 0 0 auto;
    width: 100%;
    padding: 28px 24px;
    border-right: none;
    border-bottom: 1px solid var(--navy-border);
    background-image:
      radial-gradient(ellipse 100% 80% at 50% 100%, rgba(30, 110, 181, 0.10) 0%, transparent 70%),
      linear-gradient(180deg, #0f1b35 0%, var(--navy-bg) 100%);
  }

  .left-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 100%;
  }

  .faa-seal {
    width: 72px;
    height: 72px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .system-name {
    text-align: left;
    margin-bottom: 0;
  }

  .system-title {
    font-size: 14px;
    letter-spacing: 0.14em;
  }

  .system-subtitle {
    font-size: 11px;
  }

  .reg-badge {
    margin-bottom: 0;
  }

  /* hide feature list and footer on mobile header */
  .left-divider,
  .feature-list,
  .left-footer {
    display: none;
  }

  .login-right {
    flex: 1;
    padding: 32px 20px;
  }

  .right-inner {
    max-width: 100%;
  }

  .form-title {
    font-size: 22px;
  }
}

@media (max-width: 400px) {
  .login-right {
    padding: 24px 16px;
  }

  .hint-row {
    gap: 4px;
  }

  .hint-role {
    width: 100%;
    margin-bottom: 2px;
  }
}

/* Neutral product wordmark on the sign-in panel. Partner logos are not shown here. */
.brand-wordmark-hero {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}
.brand-logo-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 22px;
  width: min(340px, 80%);
  margin: 0 auto 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.brand-logo-card img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .brand-logo-card { width: min(240px, 70%); padding: 12px 16px; margin: 0; }
}
/* Keep the logo centered in the visible screen on long forms (register) */
@media (min-width: 901px) {
  .login-left .left-inner { position: sticky; top: calc(50vh - 110px); align-self: flex-start; }
}

/* Welcome heading under the logo */
.welcome-block { margin: 0 0 18px; text-align: center; }
.welcome-kicker {
  margin: 0 0 4px; color: rgba(255,255,255,.62);
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
}
.welcome-title {
  margin: 0; color: #fff; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em;
}
.welcome-title span { color: #7bc67e; }
.welcome-rule { width: 56px; height: 3px; border-radius: 2px; background: #3f9142; margin: 14px auto 0; }
@media (max-width: 768px) {
  .welcome-block { margin: 0; flex-basis: 100%; }
  .welcome-kicker { font-size: 11px; }
  .welcome-title { font-size: 24px; }
  .welcome-rule { margin-top: 8px; }
}

/* Provider footer (all pages) */
.app-footer {
  margin-top: 28px;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border, #e2e8f0);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-3, #64748b);
}
@media print { .app-footer { display: none; } }

.app-footer .legal-links { display: block; margin-top: 4px; }
.app-footer .legal-links a { color: inherit; text-decoration: underline; }
