/* =========================================
   Login Page — login.css
   ========================================= */

/* Full-height split layout — no scrollbar on desktop */
html, body {
  height: 100%;
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Minimal Nav --- */
.login-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--navy);
}

.login-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  height: 100%;
  padding: 0 32px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--white);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* --- Split Layout --- */
.login-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
}

/* --- Left Brand Panel --- */
.login-panel-brand {
  background: linear-gradient(155deg, #1e2f54 0%, #1a2744 40%, #0f1a30 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
}

.panel-brand-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.panel-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.panel-brand-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: normal;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.panel-brand-content p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 36px;
}

.portal-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.82);
}

.portal-features svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--gold);
}

/* Decorative circle */
.panel-decoration {
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.12);
  pointer-events: none;
}

.panel-decoration::before {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.08);
}

/* --- Right Form Panel --- */
.login-panel-form {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
  overflow-y: auto;
  padding: 60px 48px 32px;
}

.login-form-inner {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.login-form-header {
  margin-bottom: 36px;
}

.login-form-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  color: var(--navy);
  margin-bottom: 8px;
}

.login-intro {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- Login Form --- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.forgot-link {
  font-size: 0.78rem;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--gold);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--navy);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

.remember-label {
  font-size: 0.85rem;
}

/* --- Error State --- */
.login-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: #c0392b;
}

.login-error[hidden] {
  display: none;
}

.login-error svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #c0392b;
}

/* --- Divider --- */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-500);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

/* --- SSO Options --- */
.sso-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.sso-btn:hover:not(:disabled) {
  border-color: var(--navy);
  background: var(--cream);
}

.sso-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sso-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* --- Footer Notes --- */
.login-footer-note {
  font-size: 0.83rem;
  color: var(--gray-500);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 0;
}

.login-footer-note a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-footer-note a:hover {
  color: var(--gold);
}

.login-legal {
  max-width: 400px;
  width: 100%;
  margin: 24px auto 0;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
  line-height: 1.6;
  padding-top: 20px;
  border-top: 1px solid var(--gray-300);
}

.login-legal a {
  color: var(--gray-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-legal a:hover {
  color: var(--navy);
}

/* Checkbox (reused from shared, scoped here) */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-panel-brand {
    display: none;
  }

  .login-panel-form {
    padding: 48px 24px 32px;
  }
}

@media (max-width: 480px) {
  .sso-options {
    grid-template-columns: 1fr;
  }
}
