*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #102033;
  --muted: #64748b;
  --line: #dbe4ef;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --green: #0f9f6e;
  --green-soft: #e7f8f1;
  --amber: #b86b00;
  --amber-soft: #fff4dc;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 8px;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(219 228 239 / 0.58) 1px, transparent 1px),
    linear-gradient(rgb(219 228 239 / 0.58) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.auth-panel {
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 44px rgb(15 23 42 / 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
}

.brand__name {
  font-size: 0.98rem;
  font-weight: 800;
}

.auth-copy {
  display: grid;
  gap: 6px;
}

.auth-copy__eyebrow {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-copy h1 {
  font-size: 1.65rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-copy p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.oauth-stack,
.auth-form,
.verification-panel {
  display: grid;
  gap: 10px;
}

.oauth-button,
.primary-action,
.secondary-action,
.link-action,
.auth-tab {
  min-height: 40px;
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 800;
}

.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.oauth-button:hover,
.secondary-action:hover {
  border-color: #9bbcff;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.08);
}

.oauth-button__mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--blue);
  background: #e8f0ff;
  font-size: 0.72rem;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.auth-tab {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.auth-tab--active {
  color: var(--blue);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font-size: 0.9rem;
}

.auth-field input:focus {
  outline: 3px solid rgb(37 99 235 / 0.14);
  border-color: #9bbcff;
}

.primary-action {
  border: 1px solid var(--blue);
  color: #ffffff;
  background: var(--blue);
}

.primary-action:hover {
  background: var(--blue-2);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.link-action {
  border: 0;
  color: var(--blue);
  background: transparent;
}

.verification-panel {
  display: none;
  padding: 13px;
  border: 1px solid #bee8d8;
  border-radius: var(--radius);
  background: var(--green-soft);
}

.verification-panel.visible {
  display: grid;
}

.verification-panel strong {
  color: #075f43;
  font-size: 0.88rem;
}

.verification-panel p {
  color: #126447;
  font-size: 0.8rem;
  line-height: 1.45;
}

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

.auth-message {
  display: none;
  padding: 11px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.auth-message.visible {
  display: block;
}

.auth-message.error {
  color: var(--danger);
  background: var(--danger-soft);
}

.auth-message.warning {
  color: #7c4b00;
  background: var(--amber-soft);
}

.auth-message.success {
  color: #075f43;
  background: var(--green-soft);
}

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

  .auth-panel {
    padding: 18px;
  }

  .verification-panel__actions {
    grid-template-columns: 1fr;
  }
}
