/* ═══════════════════════════════════════════════════════════════
   GERDY LEARNING PORTAL — SSO / auth styling
   Uses the same CSS variables defined in style.css so it matches
   the rest of the portal automatically.
═══════════════════════════════════════════════════════════════ */

.auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark, #004999), var(--primary, #0066CC));
}
.auth-overlay.auth-overlay-visible { display: flex; }

.auth-card {
  background: var(--surface, #fff);
  border-radius: var(--radius, 10px);
  box-shadow: var(--shadow-lg, 0 4px 20px rgba(0,0,0,.13));
  padding: 40px 36px;
  width: 340px;
  text-align: center;
}

.auth-logo-mark {
  width: 48px; height: 48px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary, #0066CC);
  color: #fff; font-weight: 700; font-size: 1.3rem;
  border-radius: var(--radius-sm, 6px);
}

.auth-title { font-size: 1.15rem; font-weight: 700; color: var(--text, #1A1A2E); margin-bottom: 4px; }
.auth-sub { font-size: .85rem; color: var(--text-secondary, #5A6478); margin-bottom: 28px; }

.auth-signin-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border, #DCE3ED);
  border-radius: var(--radius-sm, 6px);
  background: #fff;
  font-size: .88rem; font-weight: 600; color: var(--text, #1A1A2E);
  transition: box-shadow .15s, border-color .15s;
}
.auth-signin-btn:hover { border-color: var(--primary, #0066CC); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08)); }
.auth-signin-btn:disabled { opacity: .5; cursor: not-allowed; }

.auth-status {
  min-height: 18px; margin-top: 14px;
  font-size: .8rem; color: var(--text-secondary, #5A6478);
}
.auth-status-error { color: var(--danger, #A4262C); font-weight: 600; }

.auth-footnote {
  margin-top: 20px; font-size: .72rem; color: var(--text-muted, #8E97A8);
}

/* ── Signed-in badge in the top nav ─────────────────────────── */
.auth-user-badge {
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px; margin-left: 4px;
  border-left: 1px solid var(--border, #DCE3ED);
  flex-shrink: 0;
}
.auth-user-role {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 4px;
}
.auth-role-admin  { background: var(--purple-light, #EDE7F6); color: var(--purple, #5C2D91); }
.auth-role-learner{ background: var(--primary-light, #E8F1FB); color: var(--primary, #0066CC); }
.auth-user-name { font-size: .82rem; font-weight: 600; color: var(--text, #1A1A2E); white-space: nowrap; }
.auth-signout-btn {
  font-size: .75rem; color: var(--text-secondary, #5A6478);
  padding: 4px 8px; border-radius: var(--radius-sm, 6px);
}
.auth-signout-btn:hover { background: var(--bg, #F0F4F8); color: var(--text, #1A1A2E); }

@media (max-width: 720px) {
  .auth-user-name { display: none; }
}
