/* Auth / login page styling
   Light mode: uses design-system tokens
   Dark mode: preserves the navy gradient aesthetic */

body.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.06), transparent 34%),
    linear-gradient(180deg, var(--surface-0) 0%, var(--surface-0) 100%);
}

.auth-main {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}

.auth-panel {
  width: 100%;
  max-width: 620px;
  padding: 2rem 2rem 1.4rem;
  border-radius: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-2);
}

.auth-panel-header {
  margin-bottom: 1.5rem;
}

.auth-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.auth-title {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.08;
  color: var(--text-1);
}

.auth-subtitle {
  margin: 0.7rem 0 0;
  max-width: 38rem;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.5;
}

.login-provider-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.provider-login-form {
  margin: 0;
}

.provider-login-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-1);
  transition:
    transform 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.provider-login-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.provider-login-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.provider-login-icon-wrap {
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.provider-login-icon {
  text-align: center;
  font-size: 1rem;
  opacity: 0.98;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.provider-login-icon-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.provider-login-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
}

.provider-login-text {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--text-1);
}

.provider-login-hint {
  font-size: 0.83rem;
  font-weight: 500;
  opacity: 0.7;
  line-height: 1.25;
  color: var(--text-2);
}

.provider-login-arrow {
  margin-left: auto;
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
  color: var(--text-3);
}

/* Brand-style provider buttons (theme-independent) */
.provider-style-brand {
  background: linear-gradient(135deg, #5e8ff0 0%, #4673d8 100%);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}

.provider-style-brand:hover {
  filter: brightness(1.04);
  color: #fff;
}

.provider-style-brand .provider-login-text,
.provider-style-brand .provider-login-hint {
  color: #fff;
}

.provider-style-brand .provider-login-hint {
  opacity: 0.82;
}

.provider-style-brand .provider-login-arrow {
  color: #fff;
  opacity: 0.72;
}

.provider-style-brand .provider-login-icon-wrap {
  background: rgba(255, 255, 255, 0.14);
}

/* Default-style provider buttons (follows theme) */
.provider-style-default {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-1);
}

.provider-style-default:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.auth-panel-footer {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-1);
}

.auth-panel-footer p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-3);
}

/* Bootstrap auth form (shares auth panel styling) */
.bootstrap-auth-form .form-label {
  color: var(--text-2);
}

/* ── Dark mode: navy gradient aesthetic ────────────────────────────────────── */

[data-theme="dark"] body.auth-page,
body.auth-page[data-theme="dark"] {
  background:
    radial-gradient(circle at top, rgba(91, 141, 239, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(4, 15, 32, 0.96) 0%, rgba(3, 12, 26, 1) 100%);
}

[data-theme="dark"] .auth-panel {
  background: linear-gradient(180deg, rgba(10, 28, 53, 0.92) 0%, rgba(8, 22, 42, 0.96) 100%);
  border: 1px solid rgba(126, 166, 235, 0.18);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .auth-eyebrow {
  color: rgba(149, 184, 244, 0.82);
}

[data-theme="dark"] .auth-subtitle {
  color: rgba(214, 226, 244, 0.86);
}

[data-theme="dark"] .provider-login-icon-wrap {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

[data-theme="dark"] .provider-style-default {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}

[data-theme="dark"] .provider-style-default:hover {
  background: rgba(255,255,255,0.07);
}

[data-theme="dark"] .auth-panel-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-panel-footer p {
  color: rgba(197, 212, 236, 0.78);
}

[data-theme="dark"] .provider-login-btn:focus-visible {
  outline: 2px solid rgba(150, 191, 255, 0.95);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .auth-shell {
    padding: 2rem 0.25rem 3rem;
  }

  .auth-panel {
    padding: 1.35rem 1.1rem 1rem;
    border-radius: 14px;
  }

  .auth-title {
    font-size: 1.8rem;
  }

  .provider-login-btn {
    padding: 0.9rem 0.95rem;
  }
}
