:root {
  color-scheme: dark;
  --starfire-black: #000000;
  --starfire-charcoal: #1a1a1a;
  --starfire-gold: #ffb300;
  --starfire-orange: #ff7b00;
  --starfire-ember: #ffd580;
  --ink: #f8f5ee;
  --muted: #beb9af;
  --muted-strong: #d7d1c6;
  --line: #3f3a31;
  --line-soft: rgba(255, 213, 128, 0.18);
  --panel: #1a1a1a;
  --panel-raised: #22211f;
  --page: #000000;
  --accent: #ffb300;
  --accent-strong: #ffd580;
  --accent-text: #1a1200;
  --accent-soft: rgba(255, 179, 0, 0.13);
  --danger: #ff9b8f;
  --danger-soft: rgba(255, 123, 0, 0.16);
  --warn: #ffb300;
  --warn-soft: rgba(255, 179, 0, 0.15);
  --ok: #ffd580;
  --ok-soft: rgba(255, 213, 128, 0.13);
  --focus: #ffd580;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(255, 179, 0, 0.12), transparent 32rem),
    linear-gradient(180deg, #0a0908 0%, var(--page) 46%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button,
.button-link {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 213, 128, 0.18);
  color: var(--accent-text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
}

button:hover,
button:focus-visible,
.button-link:hover,
.button-link:focus-visible {
  background: var(--accent-strong);
  color: var(--accent-text);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a,
button,
input {
  outline-color: var(--focus);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.15;
}

h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.auth-page {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  padding: 18px;
  place-items: center;
}

.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  max-width: 430px;
  padding: 18px;
  width: 100%;
}

.auth-heading {
  display: grid;
  gap: 5px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-status,
.access-state {
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 10px 12px;
}

.auth-status[data-status="info"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.auth-status[data-status="success"] {
  background: var(--ok-soft);
  color: var(--ok);
}

.auth-status[data-status="warning"],
.access-state {
  background: var(--warn-soft);
  color: var(--warn);
}

.auth-status[data-status="error"],
.access-state.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.access-state {
  display: grid;
  gap: 8px;
}

.billing-plans {
  display: grid;
  gap: 8px;
}

.billing-plan {
  align-items: center;
  background: rgba(15, 14, 12, 0.78);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
}

.billing-plan input {
  min-height: auto;
  width: auto;
}

.auth-form,
.provider-area {
  display: grid;
  gap: 12px;
}

.mode-switch {
  background: #0f0e0c;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}

.mode-switch button {
  background: transparent;
  box-shadow: none;
  color: var(--muted-strong);
  min-height: 36px;
}

.mode-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-text);
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 5px;
}

input {
  background: #0f0e0c;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 40px;
  min-width: 0;
  padding: 8px 9px;
  width: 100%;
}

input::placeholder {
  color: #8f897f;
  opacity: 1;
}

.auth-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secondary-button {
  background: var(--panel-raised);
  color: var(--muted-strong);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.full-width {
  width: 100%;
}

.return-link {
  justify-self: start;
}

[hidden] {
  display: none !important;
}

@media (max-width: 460px) {
  .auth-shell {
    align-items: start;
    padding: 12px;
  }

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