:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --ink: #1c1917;
  --muted: #6f675e;
  --line: #e4ddd2;
  --panel: #fffcf7;
  --accent: #9a3412;
  --accent-ink: #fff7ed;
  --ok: #166534;
  --warn: #92400e;
  --bad: #991b1b;
  --shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(154, 52, 18, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: #7c2d12; }

button, input, select, textarea { font: inherit; color: inherit; }

button, .button {
  border: 0;
  background: var(--ink);
  color: #faf7f2;
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  cursor: pointer;
  font-weight: 500;
}

button:hover { background: #292524; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
}
button:disabled { opacity: 0.55; cursor: wait; }

button.ghost {
  background: transparent;
  color: #f5f0e8;
  border: 1px solid rgba(245, 240, 232, 0.28);
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
}

textarea { min-height: 7rem; resize: vertical; }

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem;
  background:
    linear-gradient(160deg, rgba(255, 247, 237, 0.08), transparent 42%),
    #1c1917;
  color: #faf7f2;
}

.eyebrow {
  margin: 0 0 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #fdba74;
}

.login-brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.login-brand p:last-child {
  max-width: 28rem;
  margin: 1.25rem 0 0;
  color: #d6d3d1;
  font-size: 1.15rem;
}

.login .card {
  align-self: center;
  justify-self: center;
  width: min(26rem, calc(100% - 3rem));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.75rem;
  display: grid;
  gap: 0.9rem;
}

.login .card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 560;
}

.lede { margin: 0; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
.login .card button { justify-self: start; margin-top: 0.4rem; }

.shell {
  display: grid;
  grid-template-columns: 15.5rem 1fr;
  min-height: 100vh;
}

nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 0.85rem;
  background: #1c1917;
  color: #f5f0e8;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0.55rem 1rem;
}

.mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background:
    linear-gradient(145deg, #fdba74, #9a3412);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.brand small {
  color: #a8a29e;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.65rem;
}

nav a {
  color: #e7e5e4;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
}

nav a.active, nav a:hover {
  background: rgba(255, 250, 245, 0.08);
  color: white;
}

nav a.active { box-shadow: inset 3px 0 0 #fb923c; }

nav .spacer { flex: 1; }

main {
  padding: 1.75rem 2rem 4rem;
  min-width: 0;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.1rem;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
h1 { margin: 0; font-size: 2.15rem; }
h2 { margin: 1.5rem 0 0.7rem; font-size: 1.35rem; }

.metrics, .split, .form-grid { display: grid; gap: 0.85rem; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.split { grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.8fr); align-items: start; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.metric, .panel, table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.metric { padding: 0.95rem 1rem; }
.metric span, .muted { color: var(--muted); }
.metric b {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.panel { padding: 1rem; display: grid; gap: 0.75rem; }
.panel h2 { margin: 0; }
.panel p { margin: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  background: #faf7f2;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffaf3; }

.banner {
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
  border-radius: 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
}

.banner.bad { background: #fef2f2; border-color: #fecaca; color: var(--bad); }
.banner.ok { background: #f0fdf4; border-color: #bbf7d0; color: var(--ok); }

.checks { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.checks label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  color: var(--ink);
}
.checks input { width: auto; }

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.75rem;
  background: #f5f0e8;
  color: #44403c;
  white-space: nowrap;
}
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.bad { background: #fee2e2; color: var(--bad); }
.tag.warn { background: #ffedd5; color: var(--warn); }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #1c1917;
  color: #f5f0e8;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.prose { max-width: 46rem; font-size: 1.05rem; }
ul { padding-left: 1.1rem; }
li + li { margin-top: 0.35rem; }

@media (max-width: 960px) {
  .login, .shell, .split { grid-template-columns: 1fr; }
  .login-brand { min-height: 16rem; padding: 2rem; }
  nav {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  nav .spacer { display: none; }
  main { padding: 1.1rem; }
}
