:root {
  --ink: #1c2b24;
  --muted: #5d6b63;
  --paper: #f4f0e6;
  --card: #fffdf8;
  --line: #ddd4c4;
  --green: #1f6b4a;
  --green-ink: #f3fbf6;
  --rust: #8c3a2f;
  --gold: #a56b2b;
  --shadow: 0 16px 40px rgba(48, 36, 18, 0.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 16px/1.45 "Avenir Next", "Segoe UI", sans-serif; }
h1, h2, h3 { font-family: Palatino, "Iowan Old Style", Georgia, serif; font-weight: 600; letter-spacing: -0.02em; }
button, input, select { font: inherit; color: inherit; }
.gate { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 64px; }
.eyebrow { margin: 0 0 8px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; }
.gate h1 { font-size: 58px; line-height: 0.95; margin: 0 0 16px; }
.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card { padding: 28px; }
label { display: block; margin: 14px 0; font-size: 14px; color: var(--muted); }
input, select { width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.primary, .ghost { border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; }
.primary { background: var(--green); color: var(--green-ink); }
.ghost, .text { background: transparent; color: var(--green); }
.text { border: 0; padding: 12px 0; cursor: pointer; }
.error { color: var(--rust); min-height: 1.2em; }
.secret { padding: 10px 12px; background: #f7f1e4; border-radius: 10px; word-break: break-all; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
aside { padding: 24px 18px; border-right: 1px solid var(--line); background: #ebe4d4; }
.brand { font-family: Palatino, Georgia, serif; font-size: 22px; margin-bottom: 18px; }
nav { display: grid; gap: 4px; }
.nav-btn { text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.nav-btn.active { background: var(--ink); color: #f6f1e6; }
main { padding: 28px; }
header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
header h1 { margin: 0; font-size: 36px; }
.filters, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters label, .row label { margin: 0; min-width: 140px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.metric { padding: 16px; }
.metric b { display: block; font-size: 28px; font-family: Palatino, Georgia, serif; }
.metric.in b { color: var(--green); }
.metric.out b { color: var(--rust); }
.panel { padding: 16px; margin: 12px 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.alert { color: var(--rust); font-weight: 600; }
.drop { border: 1.5px dashed var(--gold); border-radius: 16px; padding: 28px; background: #fffdf8; text-align: center; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 120px 1fr 80px; gap: 8px; align-items: center; }
.bar span { height: 10px; background: #efe6d4; border-radius: 99px; display: block; }
.bar i { display: block; height: 10px; border-radius: 99px; background: var(--green); }
.note { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .gate, .shell { grid-template-columns: 1fr; }
  .gate { padding: 24px; }
  .gate h1 { font-size: 40px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
}
