@charset "UTF-8";
/* ═══════════════════════════════════════════════════════════════
   0. SCOPED ELEVATED TOKENS — isolated to the login page
════════════════════════════════════════════════════════════════ */
.auth-page {
  --surface-card: #ffffff;
  --text-primary: #06090f;
  --text-secondary: #475067;
  --text-muted: #828ba3;
  --border-default: #e2e6f1;
  --brand-primary: #1251a0;
  --brand-hover: #0e417f;
  --brand-subtle: rgba(18, 81, 160, 0.10);
  --border-focus: #1251a0;
  --input-bg: #f7f9fc;
  --input-bg-focus: #ffffff;
  --input-border: #cdd3e4;
  --input-text: #06090f;
  --input-label: #5c6678;
  --input-label-active: #1251a0;
  --input-icon: #9aa3bd;
  --error-bg: #fef0f1;
  --error-border: #f9c8ce;
  --error-text: #d92d20;
  --panel-bg: linear-gradient(150deg, #0c2f63 0%, #103f86 55%, #1a5aa3 100%);
  --shadow-btn: 0 2px 8px -3px rgba(18, 81, 160, 0.30);
}

[data-theme=dark] .auth-page {
  --surface-card: #12161f;
  --text-primary: #eef1f8;
  --text-secondary: #9aa3bd;
  --text-muted: #6a7392;
  --border-default: #242c44;
  --brand-primary: #4a9fe8;
  --brand-hover: #6fb4ef;
  --brand-subtle: rgba(74, 159, 232, 0.16);
  --border-focus: #4a9fe8;
  --input-bg: #161c2e;
  --input-bg-focus: #1b2336;
  --input-border: #303a58;
  --input-text: #eef1f8;
  --input-label: #6a7392;
  --input-label-active: #4a9fe8;
  --input-icon: #6a7392;
  --error-bg: rgba(224, 45, 32, 0.16);
  --error-border: rgba(248, 113, 133, 0.32);
  --error-text: #fb7185;
  --panel-bg: linear-gradient(150deg, #0a2347 0%, #0e305f 55%, #154a86 100%);
  --shadow-btn: 0 3px 10px -4px rgba(74, 159, 232, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   1. KEYFRAMES — subtle one-time entrances only (sober, no loops)
════════════════════════════════════════════════════════════════ */
@keyframes auth-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes auth-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
/* ═══════════════════════════════════════════════════════════════
   2. PAGE LAYOUT — mobile-first
════════════════════════════════════════════════════════════════ */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
@media (min-width: 768px) {
  .auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}
@media (min-width: 1280px) {
  .auth-page {
    grid-template-columns: 5fr 7fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   3. LEFT PANEL — deep-blue brand (the signature gradient)
════════════════════════════════════════════════════════════════ */
.auth-panel {
  background: var(--panel-bg);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: auth-panel-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (min-width: 768px) {
  .auth-panel {
    min-height: unset;
    padding: 3rem;
  }
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.auth-panel__glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 65%);
  top: -160px;
  right: -120px;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.auth-panel__center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.auth-panel__brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel .brand-logo__img {
  filter: brightness(0) invert(1);
}

.auth-panel .brand-logo__badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-panel__tagline {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 80%;
  display: none;
}
@media (min-width: 768px) {
  .auth-panel__tagline {
    display: block;
  }
}

.auth-panel__footer {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  display: none;
}
@media (min-width: 768px) {
  .auth-panel__footer {
    display: block;
  }
}
.auth-panel__footer p {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   4. RIGHT PANEL — form
════════════════════════════════════════════════════════════════ */
.auth-form {
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
  position: relative;
  flex: 1;
  transition: background 0.2s ease;
}
@media (min-width: 768px) {
  .auth-form {
    padding: 3rem 3.5rem;
    flex: unset;
  }
}
@media (min-width: 1024px) {
  .auth-form {
    padding: 3rem 5rem;
  }
}

.auth-form .theme-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

.auth-form__wrap {
  width: 100%;
  max-width: 400px;
}

/* ── Subtle staggered entry (one-time, sober) ── */
.auth-form__header {
  animation: auth-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.auth-alert {
  animation: auth-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

#loginForm .form-field:nth-child(1) {
  animation: auth-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

#loginForm .form-field:nth-child(2) {
  animation: auth-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.form-check {
  animation: auth-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.btn-submit {
  animation: auth-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* ═══════════════════════════════════════════════════════════════
   5. FORM HEADER
════════════════════════════════════════════════════════════════ */
.auth-form__header {
  margin-bottom: 2rem;
}
.auth-form__header h3 {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.375rem;
  line-height: 1.15;
}
.auth-form__header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   6. FORM FIELDS — floating label (sharp)
════════════════════════════════════════════════════════════════ */
.form-field {
  margin-bottom: 1.125rem;
}

.form-field__floating {
  position: relative;
}

.form-field__input {
  width: 100%;
  height: 54px;
  padding: 20px 14px 8px 44px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  -webkit-appearance: none;
}
.form-field__input::placeholder {
  color: transparent;
}
.form-field__input:hover:not(:focus) {
  border-color: var(--text-muted);
}
.form-field__input:focus {
  border-color: var(--border-focus);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3.5px var(--brand-subtle);
}

/* 2026-06-18 — leading icon for advanced form-control feel */
.form-field__icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--input-icon);
  font-size: 15px;
  pointer-events: none;
  z-index: 2;
  transition: color 0.15s ease;
}

.form-field__floating:focus-within .form-field__icon {
  color: var(--brand-primary);
}

.form-field__label {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  color: var(--input-label);
  pointer-events: none;
  transition: top 0.15s ease, transform 0.15s ease, font-size 0.15s ease, color 0.15s ease, letter-spacing 0.15s ease;
}

.form-field__input:focus ~ .form-field__label,
.form-field__input:not(:placeholder-shown) ~ .form-field__label {
  top: 9px;
  transform: none;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--input-label-active);
  text-transform: uppercase;
}

.form-field__floating--password .form-field__input {
  padding-right: 46px;
}

.form-field__toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.form-field__toggle-btn:hover {
  color: var(--brand-primary);
  background: var(--brand-subtle);
}
.form-field__toggle-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   7. ERROR ALERT (sharp)
════════════════════════════════════════════════════════════════ */
.auth-alert {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  color: var(--error-text);
  line-height: 1.5;
  position: relative;
}

.auth-alert--visible {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  animation: auth-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.auth-alert__icon {
  margin-top: 1px;
  flex-shrink: 0;
}

.auth-alert__msg {
  flex: 1;
  min-width: 0;
}

.auth-alert__close {
  position: absolute;
  right: 6px;
  top: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--error-text);
  opacity: 0.55;
  font-size: 0.8125rem;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}
.auth-alert__close:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   8. REMEMBER ME
════════════════════════════════════════════════════════════════ */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.375rem;
}

.form-check__input {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--brand-primary);
  flex-shrink: 0;
}

.form-check__label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════
   9. SUBMIT BUTTON — SOLID (sober), loading spinner
════════════════════════════════════════════════════════════════ */
.btn-submit {
  width: 100%;
  height: 50px;
  margin-top: 0.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-submit:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}
.btn-submit:active {
  transform: translateY(0);
}
.btn-submit:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}
.btn-submit--loading {
  pointer-events: none;
  opacity: 0.82;
}

.btn-submit__spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
}

.btn-submit--loading .btn-submit__spinner {
  display: block;
}

.btn-submit--loading .btn-submit__label {
  opacity: 0.75;
}

/* ═══════════════════════════════════════════════════════════════
   10. DARK MODE — page-specific separator
════════════════════════════════════════════════════════════════ */
[data-theme=dark] .auth-form {
  border-left: 1px solid var(--border-default);
}

/* ═══════════════════════════════════════════════════════════════
   11. MOBILE — compact panel strip + full form
════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .auth-panel {
    padding: 1.25rem 1rem;
    min-height: 112px;
  }
  .auth-panel__glow {
    display: none;
  }
  .auth-form {
    padding: 2.25rem 1.25rem 3rem;
    justify-content: flex-start;
  }
  .auth-form__wrap {
    max-width: 100%;
  }
  .auth-form__header h3 {
    font-size: 1.375rem;
  }
}
