:root {
  color-scheme: light;
  --cream: #fbf4ea;
  --paper: rgba(255, 250, 244, 0.88);
  --ink: #172033;
  --muted: #566273;
  --line: rgba(23, 32, 51, 0.12);
  --gold: #c77c30;
  --teal: #1f6f78;
  --teal-soft: rgba(31, 111, 120, 0.12);
  --danger: #b94b44;
  --shadow: 0 28px 80px rgba(23, 32, 51, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(199, 124, 48, 0.16), transparent 26%),
    radial-gradient(circle at bottom right, rgba(31, 111, 120, 0.18), transparent 30%),
    linear-gradient(160deg, #f7ecde 0%, #f1e4d2 48%, #ebdfd3 100%);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 32, 51, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  pointer-events: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 24px;
  width: min(1100px, calc(100% - 32px));
  margin: 24px auto;
}

.intro-panel,
.login-panel {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--paper);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.intro-panel {
  min-height: 580px;
  background:
    radial-gradient(circle at top right, rgba(199, 124, 48, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 248, 241, 0.72)),
    var(--paper);
}

.intro-panel::after {
  position: absolute;
  right: -56px;
  bottom: -56px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(31, 111, 120, 0.08);
  content: "";
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.96;
}

h1 {
  max-width: 8ch;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.intro-copy,
.field span,
.notice,
.start-card p,
#logged-in-copy {
  color: var(--muted);
  line-height: 1.6;
}

.intro-copy {
  max-width: 52ch;
  margin: 22px 0 0;
  font-size: 1.05rem;
}

.home-link {
  display: inline-flex;
  margin-top: 28px;
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--ink);
  color: #fffaf4;
}

.button-secondary {
  background: var(--teal-soft);
  color: var(--teal);
}

.notice,
.start-card,
.logged-in-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
}

.notice {
  min-height: 64px;
  background: rgba(255, 255, 255, 0.52);
}

.notice[data-state="error"] {
  color: var(--danger);
}

.notice[data-state="success"] {
  color: var(--teal);
}

.start-card,
.logged-in-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.logged-in-card {
  display: grid;
  gap: 16px;
}

.dashboard-metrics {
  display: grid;
  gap: 12px;
}

.metric-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.metric-label,
.metric-value {
  margin: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.hidden {
  display: none;
}

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

  .intro-panel {
    min-height: auto;
  }
}
