/* =========================================================================
   CLIENT PORTAL - AUTHENTICATION UI (PHASE 3)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --navy: #1B2A4A;
  --navy-dark: #111b30;
  --gold: #C9A84C;
  --white: #ffffff;
  --bg-color: #F4F5F7;
  --error: #EF4444;
  --warning: #F59E0B;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --font-main: 'DM Sans', sans-serif;
}

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

body { 
  font-family: var(--font-main); 
  /* Deep navy background with subtle pattern */
  background-color: var(--navy-dark);
  background-image: radial-gradient(circle at 10px 10px, rgba(255, 255, 255, 0.05) 2px, transparent 0);
  background-size: 32px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.auth-wrapper {
  display: flex;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 900px;
  min-height: 540px;
}

/* ── LEFT PANEL (Branding) ──────────────────────────────── */
.auth-branding {
  width: 40%;
  background: var(--navy);
  padding: 48px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.auth-branding::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.branding-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

.branding-logo svg {
  width: 32px;
  height: auto;
}

.branding-logo .wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.branding-tagline {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 40px;
  color: #E8E6E0;
  position: relative;
  z-index: 2;
}

.trust-bullets {
  list-style: none;
  position: relative;
  z-index: 2;
}

.trust-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #aeb4c4;
  line-height: 1.5;
}

.trust-bullets i {
  color: var(--gold);
  margin-top: 2px;
}

/* ── RIGHT PANEL (Form) ─────────────────────────────────── */
.auth-content {
  width: 60%;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-mobile-logo { display: none; }

.auth-title { 
  color: var(--navy); 
  margin-bottom: 8px; 
  font-weight: 700; 
  font-size: 28px; 
  letter-spacing: -0.5px;
}
.auth-sub { 
  color: var(--text-muted); 
  margin-bottom: 40px; 
  font-size: 15px; 
}

/* ── FORMS ─────────────────────────────────────────────── */
.form-group { margin-bottom: 24px; position: relative; }
.form-group label { 
  display: block; 
  font-size: 13px; 
  font-weight: 600; 
  color: var(--text-main); 
  margin-bottom: 8px; 
}

.input-icon-wrap { position: relative; }
.input-icon-wrap i.leading {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  font-size: 14px;
}
.input-icon-wrap input { 
  width: 100%; 
  padding: 12px 16px 12px 42px; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  font-family: inherit; 
  font-size: 15px; 
  color: var(--text-main);
  transition: all 0.2s ease;
}
.input-icon-wrap input:focus { 
  outline: none; 
  border-color: var(--gold); 
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1); 
}

.password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.link-forgot {
  font-size: 13px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}
.link-forgot:hover { text-decoration: underline; }

.btn-auth {
  width: 100%; 
  background: var(--gold); 
  color: var(--navy); 
  padding: 14px; 
  border: none; 
  border-radius: 8px; 
  font-weight: 700; 
  cursor: pointer; 
  transition: all 0.2s; 
  font-size: 15px;
  margin-top: 8px;
}
.btn-auth:hover { background: #daba68; }
.btn-auth:disabled { opacity: 0.7; cursor: not-allowed; }

.auth-divider {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer-note {
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
  padding-top: 40px;
}

/* Alert States */
.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 32px; font-size: 14px; display: flex; align-items: flex-start; gap: 12px; }
.alert-error { background: #FEF2F2; color: var(--error); border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: var(--warning); border: 1px solid #FDE68A; }

/* OTP Specifics */
.otp-inputs { display: flex; gap: 12px; margin-bottom: 24px; }
.otp-inputs input { 
  width: 100%; 
  aspect-ratio: 1; 
  text-align: center; 
  font-size: 24px; 
  font-weight: 700; 
  border-radius: 8px; 
  border: 1px solid var(--border); 
  background: #F9FAFB;
}
.otp-inputs input:focus { border-color: var(--navy); background: var(--white); outline: none; }

.otp-timer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; font-size: 14px; color: var(--text-muted); }
.resend-link { color: var(--text-muted); text-decoration: none; cursor: not-allowed; }
.resend-link.active { color: var(--navy); cursor: pointer; font-weight: 600; }

.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); text-decoration: none; margin-top: 32px; }
.back-link:hover { color: var(--navy); }

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-branding { display: none; }
  .auth-content { width: 100%; padding: 40px 32px; }
  .auth-wrapper { min-height: auto; }
  .auth-mobile-logo { display: block; margin-bottom: 32px; }
  .otp-inputs { gap: 8px; }
  .otp-inputs input { font-size: 20px; }
}
