:root {
  --bg: #f4f0e8;
  --ink: #1d211f;
  --muted: #665d51;
  --line: #ded4c3;
  --paper: #fffaf2;
  --accent: #e9c46a;
  --ok: #2f7a52;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}
a { color: inherit; font-weight: 800; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(255,250,242,.94);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo span, .brand {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}
nav { display: flex; gap: 12px; overflow-x: auto; }
nav a { text-decoration: none; padding: 10px 12px; border-radius: 12px; }
nav a:hover { background: #ece4d7; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 24px; }
.hero, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 16px 40px rgba(64,50,30,.06);
}
.hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.hero.tight { padding: 18px 24px; }
.eyebrow { color: var(--ok); font-weight: 900; text-transform: uppercase; font-size: 12px; letter-spacing: .15em; }
h1 { font-size: clamp(32px, 5vw, 64px); line-height: .98; margin: 8px 0; }
h2 { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.compact { gap: 10px; }
.metric { background: var(--ink); color: white; border-radius: 20px; padding: 18px; }
.metric span { display: block; color: rgba(255,255,255,.65); font-weight: 800; }
.metric strong { display: block; margin-top: 8px; font-size: 40px; }
label { display: grid; gap: 8px; font-weight: 800; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
button, .button {
  display: inline-flex;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.button.ghost, button.small { background: #ece4d7; color: var(--ink); }
.stack { display: grid; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; }
.inline-form { display: grid; grid-template-columns: 1fr 180px 1fr auto; gap: 8px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
small { color: var(--muted); }
.pill { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #ece4d7; font-weight: 900; }
.cards { display: grid; gap: 12px; }
.card, .timeline div { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
.alert { background: #fff0d0; border: 1px solid var(--accent); padding: 12px; border-radius: 14px; margin-bottom: 14px; font-weight: 800; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 26px; }
.login-card form { display: grid; gap: 14px; }

@media (max-width: 820px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .hero { align-items: flex-start; flex-direction: column; }
  .grid.two, .grid.four { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .wrap { padding: 14px; }
}
