/* ══════════════════════════════════════════════════════════════
   DISA v2 — Auth pages (login, register, activation, create_password)
   Two-column layout: form left · navy brand panel right
   ══════════════════════════════════════════════════════════════ */

html, body { height: 100%; margin: 0; }

/* ── Page shell ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  font-family: var(--font-sans);
  background: var(--color-white);
}

/* ── Form column (left) ───────────────────────────────────────── */
.auth-form-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--color-surface);
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px var(--color-shadow);
  color: var(--color-navy);
}

/* ── Brand panel (right, desktop only) ────────────────────────── */
.auth-brand-col {
  display: none;
  flex: 0 0 440px;
  background: var(--color-navy);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5rem 3rem;
  color: var(--color-white);
}

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

.auth-brand-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 2.25rem;
}

.auth-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.625rem;
  line-height: 1.3;
}

.auth-brand-subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.auth-brand-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2.25rem;
}

.auth-brand-features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 0.875rem;
}

.auth-brand-features li i {
  color: var(--color-primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-brand-cta {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
}

/* ── Form logo + wordmark ─────────────────────────────────────── */
.auth-logo-form {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
}

.auth-logo-form img { height: 36px; }

.auth-logo-wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── Headings ─────────────────────────────────────────────────── */
.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--color-slate);
  margin-bottom: 2rem;
}

/* ── Labels & controls ────────────────────────────────────────── */
.auth-form-wrap .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-navy);
  margin-bottom: 0.375rem;
}

.auth-form-wrap .form-control {
  font-size: 0.9375rem;
  border-color: var(--color-border);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  color: var(--color-navy);
  background: var(--color-white);
}

.auth-form-wrap .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(41, 184, 176, 0.12);
  background: var(--color-white);
}

.auth-form-wrap .form-control.is-invalid {
  border-color: var(--color-danger);
}

.auth-form-wrap .form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(217, 79, 90, 0.12);
}

/* Password input + toggle button */
.auth-form-wrap .input-group .form-control {
  border-right: none;
  border-radius: 8px 0 0 8px;
}

.auth-form-wrap .input-group .btn-pw-toggle {
  border: 1px solid var(--color-border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--color-slate);
  background: var(--color-white);
  padding: 0 0.75rem;
  line-height: 1;
  transition: color 0.15s;
}

.auth-form-wrap .input-group .btn-pw-toggle:hover { color: var(--color-primary); }

.auth-form-wrap .input-group:focus-within .btn-pw-toggle {
  border-color: var(--color-primary);
}

/* ── Password checklist ───────────────────────────────────────── */
.password-checklist {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0;
  background: var(--color-surface);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}

.password-checklist li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-slate);
  transition: color 0.15s;
}

.password-checklist li i {
  font-size: 0.9375rem;
  color: var(--color-border);
  flex-shrink: 0;
  transition: color 0.15s;
}

.password-checklist li[data-ok="1"] { color: var(--color-success); }
.password-checklist li[data-ok="1"] i { color: var(--color-success); }

/* ── Checkbox ─────────────────────────────────────────────────── */
.auth-form-wrap .form-check-label {
  font-size: 0.875rem;
  color: var(--color-slate);
}

.auth-form-wrap .form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.auth-form-wrap .form-check-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(41, 184, 176, 0.12);
}

/* ── Submit button ────────────────────────────────────────────── */
.auth-form-wrap .btn-disa-primary {
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: 0.01em;
}

.auth-form-wrap .btn-disa-primary:disabled {
  background-color: var(--color-border);
  border-color: var(--color-border);
  color: var(--color-text-tertiary);
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Checkbox link (Terms) ────────────────────────────────────── */
.auth-form-wrap .form-check a {
  color: var(--color-primary);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-form-wrap .form-check a:hover { color: var(--color-primary-hover); }

/* ── Submit hint (why button is disabled) ─────────────────────── */
.auth-submit-hint {
  font-size: 0.8125rem;
  line-height: 1;
  color: var(--color-slate);
  text-align: center;
  margin: 0.5rem 0 0;
  height: 0.8125rem;   /* fixed — always reserves one line, never grows */
  overflow: hidden;
  white-space: nowrap;
}

/* ── Footer hint (login / register switch) ────────────────────── */
.auth-switch-hint {
  font-size: 0.875rem;
  color: var(--color-slate);
  text-align: center;
  margin: 0;
}

.auth-switch-hint a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch-hint a:hover { color: var(--color-primary-hover); }

/* ── Error state ─────────────────────────────────────────────── */
.auth-error-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(217, 79, 90, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.auth-error-icon i {
  font-size: 2.75rem;
  color: var(--color-danger);
}

.auth-error-code {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-slate);
  text-align: center;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

/* ── Success state (register-success, future confirmation pages) ─ */
.auth-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(76, 175, 122, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
}

.auth-success-icon i {
  font-size: 2.75rem;
  color: var(--color-success);
}

/* ── Inline form link (forgot password) ──────────────────────── */
.auth-form-link {
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-form-link:hover { color: var(--color-primary-hover); }

/* ── Flash alerts — fixed toast, top-centre, no layout shift ──── */
.auth-page #alerts-container {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1055;          /* above Bootstrap modals */
  width: min(420px, 90vw);
  pointer-events: none;   /* clicks pass through the empty container */
}

.auth-page #alerts-container .alert {
  pointer-events: auto;
  font-size: 0.875rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(28, 43, 58, 0.14);
}
