/* =========================================================
   Signature Finance — Auth Pages (Login / Register / Recovery)
   Theme: Signature Royal Navy & Metallic Gold Luxury Aesthetic
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --primary-navy: #0b2046;
  --primary-navy-dark: #07152b;
  --navy-deep: #050f21;
  --navy-light: #163b75;

  --gold: #d4af37;
  --gold-light: #f5d77f;
  --gold-dark: #aa7a1e;
  --gold-gradient: linear-gradient(135deg, #fbe28c 0%, #dfb743 45%, #c59728 85%, #996e12 100%);

  --lime: #d4af37;
  --ink: #0b2046;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --soft: #edf2f7;
  --muted: #edf2f7;
  --muted-fg: #64748b;
  --border: #e2e8f0;
  --fg: #0b1c38;
  --radius: 1.25rem;
}

[data-theme="dark"] {
  --bg: #060d1a;
  --surface: #0b182e;
  --soft: #112342;
  --muted: #112342;
  --muted-fg: #9bb5db;
  --border: #1a2f52;
  --fg: #f4f8fc;
  --ink: #07152b;
  --lime: #e5b842;
}

.text-muted,
.text-secondary {
  color: #596e8d !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary,
[data-theme="dark"] small.text-muted,
[data-theme="dark"] span.text-muted,
[data-theme="dark"] div.text-muted,
[data-theme="dark"] p.text-muted {
  color: #9bb5db !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
}

/* ============ Layout ============ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
}

@media (max-width: 992px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
}

/* ============ Visual side ============ */
.auth-visual {
  background: linear-gradient(145deg, #0b2046 0%, #07152b 60%, #040d1c 100%);
  color: #fff;
  height: 100vh;
  min-height: 560px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 32px 32px 0;
  position: sticky;
  top: 0;
  box-shadow: 10px 0 40px rgba(7, 21, 43, 0.4);
}

@media (max-width: 992px) {
  .auth-visual {
    display: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  background: #ffffff !important;
  padding: 6px 16px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  width: auto;
  min-width: 170px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  max-height: 78px;
  display: block;
  object-fit: contain;
}

.auth-hero {
  position: relative;
  z-index: 2;
  margin: auto 0;
  max-width: 500px;
}

.auth-hero h1 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  margin: 0 0 16px;
  color: #ffffff;
}

.auth-hero h1 .lime {
  color: #f5d77f;
  background: linear-gradient(135deg, #fbe28c 0%, #dfb743 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-hero p {
  opacity: .8;
  max-width: 380px;
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f7d77c 0%, #dfb743 100%);
  color: #07152b;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 460px;
}

.auth-stats>div {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}

.stat-mini {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f5d77f;
  letter-spacing: -.02em;
}

.stat-mini-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
  margin-top: 2px;
}

.auth-glow {
  display: none;
}

/* ============ Form side ============ */
.auth-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 24px;
  position: relative;
  box-sizing: border-box;
}

.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: all .2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
  background: var(--muted);
  border-color: var(--gold);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 24px;
}

.auth-mobile-brand .brand-mark {
  width: 170px;
  height: 52px;
}

@media (max-width: 992px) {
  .auth-mobile-brand {
    display: flex;
  }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin: auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px -25px rgba(11, 32, 70, 0.15);
  animation: rise .5s ease both;
}

[data-theme="dark"] .auth-card {
  box-shadow: 0 25px 70px -30px rgba(0, 0, 0, 0.6);
}

.auth-card h2 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -.02em;
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--fg);
}

.auth-card .sub {
  color: var(--muted-fg);
  font-size: .9rem;
  margin: 0 0 24px;
}

/* ============ Fields ============ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 14px;
}

.field>.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-fg);
  font-weight: 600;
}

.field .label .opt {
  font-weight: 400;
  opacity: .7;
  margin-left: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: .95rem;
  color: var(--fg) !important;
  transition: all .2s;
  font-family: inherit;
}

.field input::placeholder {
  color: var(--muted-fg);
  opacity: .6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, .25);
}

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

.input-wrap {
  position: relative;
}

.eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted-fg);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.eye:hover {
  background: var(--muted);
  color: var(--fg);
}

/* ============ Buttons ============ */
.btn-ink {
  width: 100%;
  background: linear-gradient(135deg, #0b2046 0%, #07152b 100%);
  color: #f5d77f;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(11, 32, 70, 0.25);
}

.btn-ink:hover {
  background: linear-gradient(135deg, #f7d77c 0%, #dfb743 100%);
  color: #07152b;
  border-color: #d4af37;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-ghost {
  flex: 1;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .2s;
  font-size: 1rem;
}

.btn-ghost:hover {
  background: var(--muted);
  border-color: var(--gold);
}

/* ============ Misc ============ */
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  margin-bottom: 18px;
}

.row-between .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-fg);
  cursor: pointer;
  user-select: none;
}

.row-between .check input {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.link {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold);
  transition: opacity 0.2s;
}

.link:hover {
  opacity: .8;
  color: var(--gold-dark);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted-fg);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.foot {
  text-align: center;
  font-size: .85rem;
  color: var(--muted-fg);
  margin-top: 22px;
}

/* ============ Password strength ============ */
.pw-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.pw-meter span {
  height: 4px;
  background: var(--muted);
  border-radius: 999px;
  transition: background .25s;
}

.pw-meter span.on.s1 {
  background: #ff6b6b;
}

.pw-meter span.on.s2 {
  background: #ffa94d;
}

.pw-meter span.on.s3 {
  background: #ffd93d;
}

.pw-meter span.on.s4 {
  background: var(--gold);
}

/* ============ Animations ============ */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}