/* =========================================================
   Franchise Platform — Login Page
   Theme: Orange #f76300 / White / Navy #16213e
   No external font imports — system font stack
   wwwroot/css/auth/login.css
   ========================================================= */

:root {
  --navy:        #16213e;
  --navy-2:      #1a2747;
  --navy-3:      #1e2f52;
  --orange:      #f76300;
  --orange-lt:   #ff7a1a;
  --orange-dim:  rgba(247,99,0,0.12);
  --orange-glow: rgba(247,99,0,0.18);
  --white:       #ffffff;
  --off-white:   #f8f9fc;
  --border:      rgba(255,255,255,0.08);
  --border-2:    rgba(255,255,255,0.14);
  --text:        #f0ede8;
  --text-muted:  rgba(240,237,232,0.55);
  --error-bg:    rgba(239,68,68,0.12);
  --error-border:rgba(239,68,68,0.30);
  --error-text:  #fca5a5;
  --t:           0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.login-page {
  min-height: 100dvh;
  background: var(--navy);
}

/* ── Full-page split layout ────────────────────────────── */
.lg-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
  min-height: 100dvh;
  height: 100dvh;
  background: var(--navy);
  overflow: hidden;
}

/* ── Left panel — brand story ──────────────────────────── */
.lg-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  overflow: hidden;
  min-width: 0;
}

/* Subtle grid texture */
.lg-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

/* Large decorative arc */
.lg-left::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 800px;
  height: 400px;
  border-radius: 50%;
  border: 56px solid var(--orange-dim);
  pointer-events: none;
}

.lg-left-top {
  position: relative;
  z-index: 1;
}

/* Wordmark */
.lg-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 64px;
}

.lg-wordmark-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lg-wordmark-icon svg { width: 20px; height: 20px; color: #fff; }

.lg-wordmark-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}

.lg-wordmark-name span { color: var(--orange); }

/* Hero headline */
.lg-headline {
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 0 0 18px;
}

.lg-headline em {
  font-style: normal;
  color: var(--orange);
}

.lg-subheadline {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 0 48px;
}

/* Feature pills */
.lg-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lg-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(240,237,232,0.75);
}

.lg-feature-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--orange-dim);
  border: 1px solid var(--orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--orange);
}

.lg-feature-dot svg { width: 13px; height: 13px; }

/* Bottom stat strip */
.lg-left-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 40px;
}

.lg-stat-val {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 3px;
}

.lg-stat-val span { color: var(--orange); }

.lg-stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Right panel — form ─────────────────────────────────── */
.lg-right {
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  min-height: 100dvh;
  overflow-y: auto;
}

/* Top-right lang / version badge */
.lg-right-top {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lg-language-switch .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lg-language-switch .btn:hover {
  background: #fff7f2;
  border-color: rgba(247, 99, 0, 0.2);
}

.lg-language-switch .currentflag {
  font-size: 1rem;
}

.lg-language-switch .dropdown-menu {
  min-width: 150px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.lg-language-switch .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.lg-language-switch .dropdown-item.active,
.lg-language-switch .dropdown-item:active {
  background: #fff3ea;
  color: var(--orange);
}

.lg-version {
  font-size: 11px;
  color: #9ca3af;
  letter-spacing: 0.06em;
  font-family: monospace;
}

/* Form container */
.lg-form-wrap {
  width: 100%;
  max-width: 420px;
  padding: 48px 44px;
  margin: auto 0;
}

/* Form heading */
.lg-form-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin: 0 0 4px;
}

.lg-form-sub {
  font-size: 13.5px;
  color: #6b7280;
  margin: 0 0 28px;
}

/* Error block */
.lg-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--error-text);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lg-error-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lg-error-row svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Form groups */
.lg-field {
  margin-bottom: 18px;
}

.lg-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #374151;
  margin-bottom: 6px;
}

.lg-input-wrap {
  position: relative;
}

.lg-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.lg-input-icon svg { width: 15px; height: 15px; }

.lg-input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.lg-input::placeholder { color: #c0c4cc; }

.lg-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(247,99,0,0.12);
}

/* Password toggle */
.lg-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--t);
}

.lg-pw-toggle:hover { color: #374151; }
.lg-pw-toggle svg { width: 16px; height: 16px; }

/* Remember me row */
.lg-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}

.lg-check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

.lg-check-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  accent-color: var(--orange);
  cursor: pointer;
}

/* Submit button */
.lg-submit {
  width: 100%;
  height: 46px;
  background: var(--orange);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
  transition: background var(--t), transform 0.12s ease;
}

.lg-submit:hover  { background: var(--orange-lt); }
.lg-submit:active { transform: scale(0.985); }
.lg-submit svg { width: 16px; height: 16px; }

/* Divider */
.lg-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 11.5px;
  color: #c0c4cc;
}

.lg-divider::before,
.lg-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #f3f4f6;
}

/* Footer note */
.lg-form-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.6;
}

.lg-form-footer svg { width: 12px; height: 12px; vertical-align: middle; margin-right: 3px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .lg-page { grid-template-columns: 1fr; }
  .lg-left  { display: none; }
  .lg-right {
    padding: max(32px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
    min-height: 100dvh;
    justify-content: flex-start;
    background: var(--navy);
  }
  .lg-right-top {
    position: static;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
  }
  .lg-form-wrap {
    max-width: 420px;
    padding: 0;
    margin: 0 auto;
  }
  .lg-form-title { color: var(--white); }
  .lg-form-sub   { color: rgba(240,237,232,.6); }
  .lg-label      { color: rgba(240,237,232,.8); }
  .lg-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: var(--white);
  }
  .lg-input-icon,
  .lg-pw-toggle {
    color: rgba(240,237,232,0.5);
  }
  .lg-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-dim);
  }
  .lg-input::placeholder { color: rgba(255,255,255,0.25); }
  .lg-check-label { color: rgba(240,237,232,0.7); }
  .lg-form-footer { color: rgba(240,237,232,.4); }
  .lg-version { color: rgba(240,237,232,.3); }
  .lg-language-switch .btn {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
  }
  .lg-language-switch .btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
  }
  .lg-language-switch .dropdown-menu {
    background: #fff;
  }
}

@media (max-width: 480px) {
  .lg-right {
    padding-left: 20px;
    padding-right: 20px;
  }
  .lg-form-wrap {
    max-width: none;
    padding: 0;
  }
  .lg-headline {
    letter-spacing: -0.6px;
  }
  .lg-submit {
    height: 48px;
  }
}
