/* ============================================================
   Nyumbanet — Premium Auth (Split-screen) — Deep Blue + Gold
   Self-contained: does not depend on app.scss / Bootstrap build.
   ============================================================ */

:root {
  --navy-900: #07182b;
  --navy-800: #0a2540;
  --navy-700: #0e3354;
  --navy-600: #134a78;
  --gold-500: #c9a24b;
  --gold-400: #d8b563;
  --gold-300: #e6cd8c;
  --ink: #0a2540;
  --muted: #6b7280;
  --line: #e6e9ef;
  --bg-soft: #f6f8fb;
  --danger: #d64545;
  --radius: 16px;
  --shadow-lg: 0 24px 60px -20px rgba(10, 37, 64, 0.35);
}

* { box-sizing: border-box; }

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

/* Layout shell */
.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* ---------------- LEFT / VISUAL PANEL ---------------- */
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  color: #fff;
  background-image:
    linear-gradient(160deg, rgba(7, 24, 43, 0.78) 0%, rgba(10, 37, 64, 0.6) 45%, rgba(19, 74, 120, 0.42) 100%),
    var(--auth-image, url('/images/hero.jpg'));
  background-size: cover;
  background-position: center;
}
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(201, 162, 75, 0.18), transparent 60%);
  pointer-events: none;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 1.5px;
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  align-self: flex-start;
}
.auth-brand:hover,
.auth-brand:focus,
.auth-brand:visited { color: #ffffff; text-decoration: none; }
.auth-brand .logo-badge {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--gold-300), var(--gold-500));
  color: var(--navy-900);
  font-size: 21px;
  box-shadow: 0 10px 24px -8px rgba(201, 162, 75, 0.85);
}
.auth-brand .wordmark {
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.auth-brand .wordmark b {
  font-weight: 800;
  color: var(--gold-400);
}

.auth-visual-center { position: relative; z-index: 1; max-width: 460px; }
.auth-visual-center h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.1;
  margin: 0 0 16px;
}
.auth-visual-center h1 em {
  font-style: normal;
  color: var(--gold-300);
}
.auth-visual-center p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.auth-features {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.auth-features .feat {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,0.9);
}
.auth-features .feat i {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-300);
  border: 1px solid rgba(255,255,255,0.14);
}

/* ---------------- RIGHT / FORM PANEL ---------------- */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #fff;
}
.auth-card {
  width: 100%;
  max-width: 440px;
}
.auth-card.wide { max-width: 560px; }

.auth-top-link {
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.auth-top-link a { color: var(--navy-800); font-weight: 600; text-decoration: none; }
.auth-top-link a:hover { color: var(--gold-500); }

.auth-card h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 30px;
  margin: 0 0 6px;
  color: var(--ink);
}
.auth-card .subtitle {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 28px;
}

/* Fields */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 7px;
}
.field .control { position: relative; }
.field .control > i.lead-ic {
  position: absolute;
  left: 16px; top: 50%; transform: translateY(-50%);
  color: #9aa6b6; font-size: 15px;
  pointer-events: none;
}
.auth-input,
.field select.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
}
.field.no-icon .auth-input { padding-left: 16px; }
.auth-input::placeholder { color: #aab3c0; }
.auth-input:focus {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 4px rgba(14, 51, 84, 0.10);
  background: #fff;
}

/* Force clean white even when the browser auto-fills saved email/password
   (Chrome/Edge otherwise paint a grey-blue background that overrides ours). */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  border-color: var(--line) !important;
  transition: background-color 99999s ease-in-out 0s;
}
.auth-input:-webkit-autofill:focus { border-color: var(--navy-700) !important; }
.auth-input.is-invalid { border-color: var(--danger); }
.field .err {
  display: block;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 6px;
}
.pw-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #9aa6b6; cursor: pointer; font-size: 15px;
}

/* select arrow */
.field .control.has-select::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free"; font-weight: 900;
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: #9aa6b6; font-size: 12px; pointer-events: none;
}

/* Row helpers */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.auth-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 24px;
}
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.remember input { width: 16px; height: 16px; accent-color: var(--navy-800); }
.link-gold { color: var(--navy-800); font-weight: 600; text-decoration: none; font-size: 14px; }
.link-gold:hover { color: var(--gold-500); }

/* Button */
.btn-auth {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: .3px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 14px 30px -12px rgba(10, 37, 64, 0.6);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-auth:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-auth:active { transform: translateY(0); }
.btn-auth .gold-bar {
  display: inline-block;
}

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  color: #aab3c0; font-size: 13px; margin: 26px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.auth-alt {
  text-align: center; font-size: 14.5px; color: var(--muted);
}
.auth-alt a { color: var(--navy-800); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { color: var(--gold-500); }

/* Alert */
.auth-alert {
  background: #fdecec;
  border: 1px solid #f4c6c6;
  color: #b23b3b;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}

.auth-alert.success {
  background: #e9f7ef;
  border-color: #bfe6cd;
  color: #1d7a45;
}

/* Helper text under a field */
.auth-hint { font-size: 13px; color: var(--muted); margin: -6px 0 22px; line-height: 1.5; }

/* Scroll for long register form */
.auth-form-panel.scrollable { align-items: flex-start; overflow-y: auto; max-height: 100vh; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual {
    min-height: 240px;
    padding: 28px 28px 26px;
  }
  .auth-visual-center { display: none; }
  .auth-features { display: none; }
  .auth-form-panel { padding: 36px 20px; }
  .auth-form-panel.scrollable { max-height: none; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .auth-card h2 { font-size: 26px; }
}

/* language switcher on login / register */
.auth-lang { position: fixed; top: 16px; right: 18px; z-index: 50; }
.auth-lang .lang-switch__btn { background: #2f7fd8; border-color: #2f7fd8; }


/* ============================================================
   FULL-PAGE PHOTO — the form card floats on top of the picture
   (ONFIVEE blue palette)
   ============================================================ */
:root {
  --navy-900: #0b1f3a; --navy-800: #1f63c2; --navy-700: #2f7fd8; --navy-600: #4a95e6;
  --gold-500: #2f7fd8; --gold-400: #9cc8ff; --gold-300: #cfe3ff;
  --ink: #0b1f3a; --line: #dde8f6;
}
.auth-visual {
  position: fixed; inset: 0; z-index: 0;
  padding: 48px 52% 48px 56px;
  background-image:
    linear-gradient(90deg, rgba(11,31,58,0.55) 0%, rgba(11,31,58,0.22) 45%, rgba(11,31,58,0.08) 100%),
    var(--auth-image, url('/images/hero.jpg'));
}
.auth-visual::after { display: none; }
.auth-brand .logo-badge { background: linear-gradient(145deg, #5aa2ec, #1f63c2); color: #fff; box-shadow: 0 10px 24px -8px rgba(31,99,194,.8); }
.auth-visual-center h1, .auth-visual-center p { text-shadow: 0 2px 16px rgba(0,0,0,.45); }

.auth-form-panel,
.auth-form-panel.scrollable {
  grid-column: 2; position: relative; z-index: 1;
  background: transparent; min-height: 100vh; max-height: none; overflow: visible;
  align-items: center; padding: 80px 32px 48px;
}
.auth-card {
  background: rgba(255,255,255,0.97);
  border-radius: 24px;
  padding: 34px 36px 30px;
  box-shadow: 0 40px 90px -30px rgba(11,31,58,.65);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.auth-top-link { margin-bottom: 18px; }

@media (max-width: 980px) {
  .auth-visual { padding: 24px; }
  .auth-form-panel, .auth-form-panel.scrollable { grid-column: 1; padding: 96px 16px 32px; }
  .auth-card { padding: 28px 22px 24px; }
}

/* ---- compact, smart card (login + register) ---- */
.auth-card { max-width: 380px; padding: 26px 26px 22px; border-radius: 20px; }
.auth-card.wide { max-width: 470px; }
.auth-card h2 { font-size: 23px; margin-bottom: 4px; }
.auth-card .subtitle { font-size: 13.5px; margin-bottom: 18px; }
.auth-top-link { font-size: 13px; margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field label { font-size: 12px; margin-bottom: 5px; }
.auth-input, .field select.auth-input { height: 40px; font-size: 14px; border-radius: 10px; padding-left: 38px; }
.field.no-icon .auth-input { padding-left: 13px; }
.field .control > i.lead-ic { left: 13px; font-size: 13px; }
.pw-toggle { right: 11px; font-size: 13px; }
.field .control.has-select::after { right: 13px; font-size: 11px; }
.field-row { gap: 12px; }
.auth-meta { margin: 2px 0 16px; }
.remember, .link-gold { font-size: 13px; }
.btn-auth { height: 44px; font-size: 15px; border-radius: 10px; }
.auth-divider { margin: 16px 0; font-size: 12px; }
.auth-alt { font-size: 13.5px; }
.auth-alert { padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
