:root {
  --bg: #020617;
  --panel-bg: radial-gradient(circle at top left, #111827, #020617);
  --border-subtle: #1f2937;
  --fg: #e5e7eb;
  --fg-muted: #9ca3af;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --danger: #f97373;
  --tone-cyan-rgb: 56, 189, 248;
  --tone-violet-rgb: 168, 85, 247;
  --tone-emerald-rgb: 34, 197, 94;
  --tone-amber-rgb: 245, 158, 11;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

.bg-orb {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

.bg-orb-a {
  background: #a855f7;
  top: -12rem;
  left: -10rem;
}

.bg-orb-b {
  background: #38bdf8;
  right: -12rem;
  top: 18rem;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.6rem 1rem 2.4rem;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: transparent;
}

h1 {
  margin: 0.1rem 0 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.help-title,
.admin-help-title {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.help-dot,
.suite-help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #cbd5e1;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  cursor: help;
}

.help-dot:focus,
.suite-help-dot:focus {
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 2px;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
  padding: 0.44rem 0.84rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 120ms ease, border-color 120ms ease;
}

.quick-links a:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
  padding: 1rem;
}

.login-panel {
  max-width: 680px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.1rem 2.8rem;
  display: grid;
  align-items: center;
}

.auth-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
  gap: 1.1rem;
  align-items: stretch;
}

.auth-panel {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 4px rgba(2, 6, 23, 0.55),
    0 12px 20px rgba(2, 6, 23, 0.28),
    0 26px 55px -22px rgba(56, 189, 248, 0.24),
    0 40px 70px -32px rgba(2, 6, 23, 0.72);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(var(--tone-cyan-rgb), 0.10) 0%,
    rgba(var(--tone-cyan-rgb), 0.90) 18%,
    rgba(var(--tone-violet-rgb), 0.86) 40%,
    rgba(var(--tone-emerald-rgb), 0.84) 66%,
    rgba(var(--tone-amber-rgb), 0.84) 86%,
    rgba(var(--tone-amber-rgb), 0.10) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.auth-panel::after {
  content: "";
  position: absolute;
  inset: auto 7% -26px 7%;
  height: 56px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--tone-cyan-rgb), 0.24), transparent 26%),
    radial-gradient(circle at 37% 0%, rgba(var(--tone-violet-rgb), 0.18), transparent 24%),
    radial-gradient(circle at 64% 0%, rgba(var(--tone-emerald-rgb), 0.20), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(var(--tone-amber-rgb), 0.22), transparent 24%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.auth-panel-brand {
  background:
    radial-gradient(circle at 18% 16%, rgba(var(--tone-cyan-rgb), 0.26), transparent 30%),
    radial-gradient(circle at 76% 16%, rgba(var(--tone-violet-rgb), 0.18), transparent 24%),
    radial-gradient(circle at 24% 82%, rgba(var(--tone-emerald-rgb), 0.16), transparent 24%),
    radial-gradient(circle at 84% 78%, rgba(var(--tone-amber-rgb), 0.16), transparent 24%),
    linear-gradient(155deg, rgba(8, 15, 34, 0.96), rgba(4, 10, 24, 0.98));
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-panel-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.06), transparent 34%),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.05), transparent 28%);
}

.auth-brand-lockup {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.25rem;
}

.auth-brand-mark {
  width: clamp(120px, 18vw, 170px);
  height: auto;
}

.auth-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.auth-hero-title {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.auth-hero-copy {
  margin: 0;
  max-width: 34rem;
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.65;
}

.auth-feature-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
}

.auth-context-head {
  display: grid;
  gap: 0.2rem;
}

.auth-context-head strong,
.auth-context-head p {
  margin: 0;
}

.auth-context-head strong {
  color: #f8fafc;
  font-size: 0.98rem;
}

.auth-context-head p {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-feature {
  --feature-tone-rgb: var(--tone-cyan-rgb);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(var(--feature-tone-rgb), 0.28);
  border-radius: 18px;
  background: rgba(7, 16, 36, 0.58);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 42px -28px rgba(var(--feature-tone-rgb), 0.32);
}

.auth-feature-link {
  color: inherit;
  text-decoration: none;
}

.auth-feature-link:hover,
.auth-feature-link:focus-visible {
  border-color: rgba(var(--feature-tone-rgb), 0.58);
  outline: none;
  transform: translateY(-1px);
}

.auth-feature-badge {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(var(--feature-tone-rgb), 0.38);
  background: rgba(var(--feature-tone-rgb), 0.14);
  color: rgb(var(--feature-tone-rgb));
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-feature:nth-child(2) {
  --feature-tone-rgb: var(--tone-violet-rgb);
}

.auth-feature:nth-child(3) {
  --feature-tone-rgb: var(--tone-emerald-rgb);
}

.auth-feature:nth-child(4) {
  --feature-tone-rgb: var(--tone-amber-rgb);
}

.auth-feature strong,
.auth-feature p {
  margin: 0;
}

.auth-feature strong {
  display: block;
  margin-bottom: 0.22rem;
  color: #f8fafc;
  font-size: 0.97rem;
}

.auth-feature p {
  color: #94a3b8;
  line-height: 1.55;
  font-size: 0.92rem;
}

.auth-panel-form {
  background:
    linear-gradient(180deg, rgba(8, 15, 35, 0.97), rgba(2, 6, 23, 0.97)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 28%);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel-form::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(var(--tone-amber-rgb), 0.10), transparent 22%),
    radial-gradient(circle at 72% 22%, rgba(var(--tone-violet-rgb), 0.12), transparent 20%),
    radial-gradient(circle at bottom left, rgba(var(--tone-cyan-rgb), 0.12), transparent 26%),
    radial-gradient(circle at 30% 80%, rgba(var(--tone-emerald-rgb), 0.10), transparent 22%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  margin: 0 auto;
  padding: 1.55rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(5, 11, 26, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 4px rgba(2, 6, 23, 0.48),
    0 10px 18px rgba(2, 6, 23, 0.24),
    0 18px 42px -26px rgba(56, 189, 248, 0.24);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(var(--tone-cyan-rgb), 0.12) 0%,
    rgba(var(--tone-cyan-rgb), 0.88) 16%,
    rgba(var(--tone-violet-rgb), 0.88) 38%,
    rgba(var(--tone-emerald-rgb), 0.84) 64%,
    rgba(var(--tone-amber-rgb), 0.84) 86%,
    rgba(var(--tone-amber-rgb), 0.12) 100%
  );
  pointer-events: none;
}

.auth-card-header {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.auth-card-header .login-title {
  margin: 0;
  font-size: 1.7rem;
}

.auth-card-header p {
  margin: 0;
}

.auth-provider-stack {
  display: grid;
  gap: 0.75rem;
}

.auth-provider-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 3.5rem;
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  align-items: center;
  gap: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fafc;
  color: #0f172a;
  padding: 0.9rem 1rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.auth-provider-button::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(var(--tone-cyan-rgb), 0.10) 0%,
    rgba(var(--tone-cyan-rgb), 0.88) 18%,
    rgba(var(--tone-violet-rgb), 0.84) 44%,
    rgba(var(--tone-emerald-rgb), 0.84) 68%,
    rgba(var(--tone-amber-rgb), 0.84) 88%,
    rgba(var(--tone-amber-rgb), 0.10) 100%
  );
  opacity: 0.9;
}

.auth-provider-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(var(--tone-cyan-rgb), 0.18),
    0 0 0 3px rgba(var(--tone-violet-rgb), 0.08);
  border-color: rgba(var(--tone-cyan-rgb), 0.42);
}

.auth-provider-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(var(--tone-cyan-rgb), 0.55);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(var(--tone-cyan-rgb), 0.24),
    0 0 0 4px rgba(var(--tone-cyan-rgb), 0.14);
}

.auth-provider-google:hover,
.auth-provider-google:focus-visible {
  border-color: rgba(66, 133, 244, 0.46);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(66, 133, 244, 0.18),
    0 0 0 4px rgba(52, 168, 83, 0.08);
}

.auth-provider-google::before {
  background: linear-gradient(
    90deg,
    rgba(66, 133, 244, 0.10) 0%,
    rgba(66, 133, 244, 0.92) 18%,
    rgba(234, 67, 53, 0.90) 42%,
    rgba(251, 188, 4, 0.88) 66%,
    rgba(52, 168, 83, 0.88) 88%,
    rgba(52, 168, 83, 0.10) 100%
  );
}

.auth-provider-microsoft:hover,
.auth-provider-microsoft:focus-visible {
  border-color: rgba(0, 164, 239, 0.48);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(0, 164, 239, 0.18),
    0 0 0 4px rgba(127, 186, 0, 0.08);
}

.auth-provider-microsoft::before {
  background: linear-gradient(
    90deg,
    rgba(242, 80, 34, 0.10) 0%,
    rgba(242, 80, 34, 0.92) 24%,
    rgba(127, 186, 0, 0.90) 24%,
    rgba(127, 186, 0, 0.90) 50%,
    rgba(0, 164, 239, 0.88) 50%,
    rgba(0, 164, 239, 0.88) 76%,
    rgba(255, 185, 0, 0.88) 76%,
    rgba(255, 185, 0, 0.88) 100%
  );
}

.auth-provider-icon {
  width: 1.3rem;
  height: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-provider-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-provider-button span:last-child {
  font-size: 1.05rem;
  color: #64748b;
}

.auth-provider-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.auth-provider-copy strong,
.auth-provider-copy small {
  display: block;
}

.auth-provider-copy strong {
  color: #0f172a;
  font-size: 0.98rem;
}

.auth-provider-copy small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 1.05rem 0;
  color: #64748b;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--tone-cyan-rgb), 0.32) 18%,
    rgba(var(--tone-violet-rgb), 0.28) 42%,
    rgba(var(--tone-emerald-rgb), 0.26) 68%,
    rgba(var(--tone-amber-rgb), 0.24) 86%,
    transparent
  );
}

.auth-option-note {
  margin: -0.55rem 0 0.85rem;
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-form button[type="submit"] {
  min-height: 3.3rem;
  margin-top: 0.1rem;
  font-size: 1rem;
}

.auth-meta {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.auth-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.auth-inline-links .btn {
  min-height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
}

.auth-footnote {
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.55;
}

.auth-footnote a {
  color: #7dd3fc;
  font-weight: 700;
}

.login-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.temp-info-shell {
  max-width: 760px;
  padding-top: 3rem;
}

.temp-info-panel {
  display: grid;
  gap: 0.75rem;
}

.temp-info-panel .brand-logo {
  width: 132px;
  height: 132px;
}

.temp-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.temp-help-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.temp-help-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
}

.temp-help-item strong,
.temp-help-item p {
  margin: 0;
}

.temp-help-item strong {
  display: block;
  margin-bottom: 0.3rem;
}

.temp-help-item p {
  color: var(--fg-muted);
  line-height: 1.55;
}

.muted {
  color: var(--fg-muted);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.48rem;
  text-align: left;
}

th {
  color: var(--fg-muted);
}

.pill {
  display: inline-block;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid var(--border-subtle);
  color: var(--fg);
}

.pill.ok {
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

.pill.bad {
  border-color: rgba(248, 113, 113, 0.7);
  color: #fecaca;
}

form {
  display: grid;
  gap: 0.55rem;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

input,
select {
  background: #020617;
  color: var(--fg);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.52rem 0.58rem;
  font: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-2);
}

.password-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.44rem;
}

.password-control input {
  width: 100%;
}

.password-toggle {
  min-width: 4.2rem;
  padding: 0.48rem 0.66rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--fg);
}

.password-toggle:hover {
  border-color: var(--accent-2);
}

button,
.btn {
  background: linear-gradient(90deg, #15803d, #22c55e);
  color: #ecfdf5;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.56rem 0.78rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--fg);
}

.errors {
  border: 1px solid rgba(248, 113, 113, 0.7);
  border-radius: 8px;
  padding: 0.6rem;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
}

#branding-logo-preview {
  display: block;
  width: min(220px, 100%);
  height: 160px;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.35rem;
}

pre {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 0.58rem;
  background: #020617;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  color: #cbd5e1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

@media (max-width: 980px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: 0;
  }

  .auth-panel-brand,
  .auth-panel-form {
    padding: 1.25rem;
  }

  .auth-card {
    width: 100%;
  }

  .auth-hero-title {
    max-width: none;
  }
}

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

  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: 0;
    border-radius: 22px;
  }

  .auth-panel-brand,
  .auth-panel-form {
    padding: 1.15rem;
  }

  .auth-card {
    width: 100%;
    padding: 1.1rem;
    border-radius: 20px;
  }

  .auth-hero-title {
    max-width: none;
  }

  .brand-logo {
    width: 112px;
    height: 112px;
  }

  .quick-links {
    width: 100%;
  }

  .quick-links a {
    width: 100%;
    justify-content: flex-start;
  }

  .auth-provider-button {
    grid-template-columns: 1.3rem 1fr auto;
    padding: 0.8rem 0.85rem;
  }
}
