/* ============================================================
   BIASHARA KIGANJANI — AUTH (login / register)
============================================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--text);
  overflow-x: hidden;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-brand {
  position: relative;
  width: min(46%, 540px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 56px);
  background: linear-gradient(155deg, #0B1426 0%, #13233f 45%, #1a2d4d 100%);
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 168, 76, 0.14), transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.08), transparent 45%);
  pointer-events: none;
}

.auth-brand-inner { position: relative; z-index: 1; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(36px, 6vh, 64px);
}

.auth-logo img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.auth-logo-text .main {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.auth-logo-text .sub {
  display: block;
  font-size: 11px;
  color: rgba(201, 168, 76, 0.75);
  font-weight: 600;
  margin-top: 2px;
}

.auth-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  margin-bottom: 16px;
}

.auth-hero h1 span { color: var(--gold); }

.auth-hero p {
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.65;
  max-width: 400px;
}

.auth-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  margin-top: 36px;
}

.auth-stat .num {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.auth-stat .lbl {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 4px;
}

.auth-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 32px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.auth-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.auth-feature-text .t { font-size: 12.5px; font-weight: 700; color: #fff; }
.auth-feature-text .s { font-size: 11px; color: rgba(255, 255, 255, 0.5); margin-top: 1px; }

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  background: var(--cream);
  overflow-y: auto;
}

.auth-mobile-top {
  display: none;
  width: 100%;
  max-width: 440px;
  text-align: center;
  margin-bottom: 20px;
}

.auth-mobile-top img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow);
}

.auth-mobile-top h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.auth-mobile-top p { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 4px 32px rgba(11, 20, 38, 0.08);
  border: 1px solid var(--border);
  animation: authCardIn 0.45s ease-out;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-tabs {
  display: flex;
  margin-bottom: 28px;
  padding: 4px;
  background: var(--cream);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 11px 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-radius: 9px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-tab.active {
  background: var(--navy);
  color: var(--gold);
  box-shadow: 0 4px 12px rgba(11, 20, 38, 0.15);
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 4vw, 28px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.form-sub {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 22px;
  line-height: 1.5;
}

.demo-note {
  background: linear-gradient(135deg, #fffbf0, #fff9e8);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #6b5718;
  margin-bottom: 20px;
  line-height: 1.55;
}

.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.role-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  font-family: inherit;
  min-height: 88px;
  -webkit-tap-highlight-color: transparent;
}

.role-card:hover {
  border-color: var(--gold);
  background: #fffdf8;
  transform: translateY(-1px);
}

.role-card.selected {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 6px 20px rgba(11, 20, 38, 0.2);
}

.role-card .ri {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-dark);
}

.role-card.selected .ri {
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold);
}

.role-card .rl { font-size: 11.5px; font-weight: 700; color: var(--text); }
.role-card.selected .rl { color: var(--gold); }

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

.form-group input,
.form-select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafaf8;
  color: var(--text);
}

.form-group input:focus,
.form-select:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-icon { position: relative; }
.input-icon input { padding-right: 44px; }

.input-icon .field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b5c0;
  font-size: 15px;
}

.input-icon .toggle-pass { pointer-events: auto; cursor: pointer; padding: 4px; }
.input-icon .toggle-pass:hover { color: var(--gold-dark); }

.form-row2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
}

.remember input { width: 16px; height: 16px; accent-color: var(--navy); }

.forgot { font-size: 13px; color: var(--navy); font-weight: 700; text-decoration: none; }
.forgot:hover { color: var(--gold-dark); }

.btn-auth {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
}

.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 11px; color: #aaa; font-weight: 700; letter-spacing: 0.04em; text-transform: lowercase; }

.social-logins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-btn {
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.social-btn:hover { border-color: #ccc; background: #fafaf8; }

.switch-auth { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-light); }
.switch-auth a { color: var(--navy); font-weight: 700; text-decoration: none; }
.switch-auth a:hover { color: var(--gold-dark); }

.admin-notice {
  background: rgba(11, 20, 38, 0.05);
  border: 1px solid rgba(11, 20, 38, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
  display: none;
}

.admin-panel {
  text-align: center;
  padding: clamp(24px, 5vw, 32px);
  background: var(--cream);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.admin-panel .main-icon { font-size: 40px; color: var(--navy); margin-bottom: 12px; }
.admin-panel h3 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.admin-panel p { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.admin-panel .btn-auth { display: inline-flex; margin-top: 20px; max-width: 220px; text-decoration: none; }

@media (max-width: 960px) {
  .auth-shell { flex-direction: column; }
  .auth-brand { display: none; }
  .auth-main {
    flex: 1;
    justify-content: flex-start;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .auth-mobile-top { display: block; }
}

@media (max-width: 480px) {
  .auth-main {
    padding-left: 16px;
    padding-right: 16px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy) 140px, var(--cream) 140px);
  }
  .auth-mobile-top { color: #fff; margin-bottom: 16px; }
  .auth-mobile-top h2 { color: #fff; font-size: 20px; }
  .auth-mobile-top p { color: rgba(255, 255, 255, 0.65); }
  .auth-card {
    border-radius: 20px;
    padding: 22px 18px;
    box-shadow: 0 8px 40px rgba(11, 20, 38, 0.12);
  }
  .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
  .social-logins { grid-template-columns: 1fr; }
  .form-row2 { flex-direction: column; align-items: flex-start; }
  .form-group input,
  .form-select {
    font-size: 16px;
    padding: 14px 16px;
  }
  .demo-note { font-size: 11.5px; }
}

@media (max-width: 360px) {
  .role-selector { gap: 8px; }
  .role-card { padding: 12px 4px 10px; min-height: 80px; }
  .role-card .ri { width: 34px; height: 34px; font-size: 14px; }
  .role-card .rl { font-size: 10.5px; }
  .auth-tab { font-size: 13px; padding: 10px 8px; }
  .form-title { font-size: 22px; }
}
