:root {
  --bg: #f3f1ec;
  --panel: #ffffff;
  --ink: #1c1b19;
  --muted: #6b6560;
  --line: #e4e0d8;
  --accent: #0f6e56;
  --accent-2: #c45c26;
  --danger: #b42318;
  --ok: #067647;
  --warn: #b54708;
  --shadow: 0 10px 30px rgba(28, 27, 25, 0.06);
  --radius: 14px;
  --font: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, #e8f3ef 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #f7ebe3 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: #14241f;
  color: #f5f7f6;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.brand {
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 1.05rem;
  margin: .25rem .5rem 1.25rem;
}
.brand small { display: block; font-weight: 400; opacity: .65; font-size: .75rem; margin-top: .2rem; }
.nav a {
  display: block;
  color: #d9e4e0;
  padding: .55rem .7rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: .92rem;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav .section {
  margin: .9rem .7rem .35rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .5;
}
.main { padding: 1.5rem 1.75rem 2.5rem; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
}
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat h3 { margin: 0; font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat p { margin: .35rem 0 0; font-size: 1.45rem; font-weight: 700; }
h1 { margin: 0 0 .35rem; font-size: 1.45rem; }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 0; border-radius: 10px; padding: .55rem .9rem;
  font-weight: 600; cursor: pointer; font-size: .9rem;
  background: var(--accent); color: #fff; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.secondary { background: #ece8e1; color: var(--ink); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: .35rem .65rem; font-size: .8rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
label { display: block; font-size: .82rem; font-weight: 600; margin: 0 0 .3rem; }
input, select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
.form-row { margin-bottom: .85rem; }
.flash {
  padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem;
}
.flash.ok { background: #e8f7ef; color: var(--ok); }
.flash.err { background: #fef3f2; color: var(--danger); }
.flash.warn { background: #fffaeb; color: var(--warn); }
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
}
.auth-card { width: min(420px, 100%); }
.pill {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px;
  background: #e8f3ef; color: var(--accent); font-size: .75rem; font-weight: 700;
}
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 5; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
