:root {
  color-scheme: light;
  --ink: #20252d;
  --muted: #5d6876;
  --line: #d9dee6;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --nav: #253042;
  --green: #287560;
  --amber: #9a6a16;
  --red: #a43d3d;
  --blue: #2f65a7;
  --shadow: 0 14px 36px rgb(32 37 45 / 12%);
  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;
  min-height: 100vh;
  background: var(--surface-soft);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(320px, 480px);
  gap: 24px;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-brand,
.login-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-brand {
  background: var(--nav);
  color: #f9fbfc;
  padding: 24px;
}

.login-brand > p {
  color: #dbe6ef;
  line-height: 1.45;
}

.login-panel {
  background: var(--surface);
  padding: 24px;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 8px;
  background: #334158;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1rem;
  line-height: 1.25;
}

h2 {
  margin-top: 4px;
  font-size: 1.55rem;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.login-brand .eyebrow {
  color: #bed0df;
}

.status {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.status[data-status="error"] {
  border-color: #e4b6b6;
  background: #fff8f8;
  color: var(--red);
}

.status[data-status="success"] {
  border-color: #bdd7ce;
  background: #f1f8f5;
  color: var(--green);
}

.status[data-status="warning"] {
  border-color: #e6cf9d;
  background: #fff9ed;
  color: var(--amber);
}

.auth-copy {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.form-stack {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--surface-soft);
  color: var(--ink);
}

.field-error {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 750;
}

textarea {
  resize: vertical;
  line-height: 1.4;
}

button {
  min-height: 40px;
  border: 1px solid #bdd0eb;
  border-radius: 8px;
  padding: 9px 14px;
  background: #e9f1fb;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

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

.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.provider-section,
.developer-token {
  margin-top: 2px;
}

.provider-buttons {
  display: grid;
  gap: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.developer-token {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.developer-token .form-stack {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .login-brand,
  .login-panel {
    padding: 18px;
  }

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