:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --panel-soft: #eef3f7;
  --text: #16202a;
  --muted: #66727f;
  --line: #d8e0e8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #9a3412;
  --shadow: 0 18px 60px rgba(17, 24, 39, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101418;
  --panel: #171d22;
  --panel-soft: #1f2a31;
  --text: #ecf2f6;
  --muted: #9aa8b4;
  --line: #2b3741;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --warn: #fb923c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.mail-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.identity-pane,
.auth-pane {
  padding: 32px;
}

.identity-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0c3433;
  color: #f6fffb;
}

.auth-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}

.system-map {
  width: min(100%, 520px);
  aspect-ratio: 16 / 10;
  object-fit: contain;
  margin-bottom: 28px;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.identity-pane .eyebrow,
.identity-pane .label {
  color: #99f6e4;
}

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 48px; line-height: 1; max-width: 620px; }
h2 { font-size: 28px; }

.lede {
  margin: 18px 0 0;
  max-width: 560px;
  color: #c7fff3;
  font-size: 18px;
  line-height: 1.6;
}

.status-surface,
.auth-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-soft);
  color: var(--text);
}

.turnstile-slot {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-soft);
  font-weight: 700;
}

.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.status-surface {
  padding: 16px;
}

.status-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 840px) {
  .mail-shell {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }
}

@media (max-width: 560px) {
  .identity-pane,
  .auth-pane {
    padding: 20px;
  }

}
