/* Session 18 — login screen + profile logout menu. Kept in its own small file, matching this
   codebase's existing convention of one CSS file per feature area (catalog.css, import-review.css,
   duplicate-review.css, ...) rather than growing components.css.

   GOLD EDU Visual Redesign, Phase 2, Section 4 — the login screen is rebuilt as a two-panel
   shell (dark navy brand panel + white form panel). The form itself (.auth-card and everything
   inside it: #loginForm/#loginEmail/#loginPassword/#loginError/#loginSubmit) is UNCHANGED —
   only its outer wrapper and surrounding chrome moved. The old single-card .auth-card__brand
   row (GE monogram + wordmark sitting inside the form) was removed; that identity now lives in
   the new .auth-shell__brand panel instead, so it is not duplicated. */

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
  padding: 24px;
}

.auth-shell {
  width: 100%;
  max-width: 940px;
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ---- Brand panel (left) — decorative, aria-hidden, no interactive content ---- */
.auth-shell__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 52px 48px;
  background: linear-gradient(160deg, #0F172A 0%, #14213D 55%, #1E293B 100%);
  color: #fff;
  overflow: hidden;
}
/* Restrained abstract/geometric accent — two translucent gold rings, no photography, no
   gradients beyond the panel's own background above (spec section 4: "no external photography
   yet ... use restrained abstract/geometric branding"). */
.auth-shell__brand-accent { position: absolute; inset: 0; pointer-events: none; }
.auth-shell__brand-accent::before,
.auth-shell__brand-accent::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.22);
}
.auth-shell__brand-accent::before { width: 340px; height: 340px; right: -140px; bottom: -120px; }
.auth-shell__brand-accent::after { width: 200px; height: 200px; right: -40px; bottom: 60px; border-color: rgba(212, 175, 55, 0.14); }

.auth-shell__brand-mark { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-shell__brand-mark .brand__monogram {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: var(--radius-md);
  background: var(--gold-500, var(--color-accent));
  color: var(--navy-950, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
}
.auth-shell__brand-mark strong { font-size: 21px; letter-spacing: .01em; }

.auth-shell__brand-message {
  position: relative;
  z-index: 1;
  max-width: 320px;
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .76);
}

/* ---- Form panel (right) — the existing .auth-card, unchanged, just re-homed ---- */
.auth-shell__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  background: var(--color-surface);
}

.auth-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card h1 { font-size: 22px; font-weight: 700; margin: 0; color: var(--color-text); }
.auth-card__hint { margin: 0 0 8px; color: var(--color-text-secondary); font-size: 13px; }

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.auth-card input {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.auth-card input:focus {
  outline: none;
  border-color: var(--gold-500, var(--color-accent));
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.28);
}

.auth-card__error {
  margin: 0;
  font-size: 13px;
  color: var(--color-danger);
  background: rgba(220, 38, 38, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.auth-card__submit { margin-top: 6px; width: 100%; justify-content: center; }
.auth-card__submit[disabled] { opacity: 0.65; cursor: default; }

.auth-developer-credit { margin-top: 20px; color: var(--color-text-secondary); font-size: 11px; text-decoration: none; }
.auth-developer-credit:hover { text-decoration: underline; }
.auth-developer-credit:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }

/* ---- profile logout menu (topbar) ---- */

.profile-wrap { position: relative; }

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 60;
}
.profile-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}
.profile-menu button:hover { background: var(--color-background); }

/* GOLD EDU Visual Redesign, Phase 2 — responsive collapse for the login shell. Below ~860px
   there isn't room for two panels side by side (spec section 32/41: no viewport down to a
   reasonable phone/small-laptop width should overflow or clip primary content), so the brand
   panel drops out and the form panel becomes the whole card, matching the pre-redesign single-
   card layout's proportions. Nothing above this breakpoint changes. */
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 420px; min-height: 0; }
  .auth-shell__brand { display: none; }
  .auth-shell__panel { padding: 36px 28px; }
}
