:root {
  --cream: #f6f1e7;
  --ink: #1e1e1c;
  --muted: #7a756b;
  --green: #3d5c43;
  --pale: #e9efdd;
  --line: #ded7c9;
  --white: #fffdf8;
  --red: #a4472f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 14px 22px; background: var(--white); border-bottom: 1px solid var(--line);
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.brand span { margin-left: 6px; color: var(--green); font-weight: 500; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.tabs button.active { background: var(--pale); color: var(--ink); font-weight: 600; }
.filters { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.filters label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
input[type="date"], input[type="text"], input[type="password"] {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 6px 9px; font-size: 13px; font-family: inherit;
}
button.primary {
  background: var(--green); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 15px; font-size: 13px; cursor: pointer;
}
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 7px 11px; cursor: pointer; }
main { padding: 22px; max-width: 1180px; margin: 0 auto; }
.panel { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.export { color: var(--green); font-size: 12px; text-decoration: none; }
.export:hover { text-decoration: underline; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 26px; font-weight: 650; letter-spacing: -0.5px; margin-top: 4px; }
.kpi .hint { color: var(--muted); font-size: 11px; margin-top: 2px; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
table.grid th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.grid tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--pale); border-radius: 99px; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.drop { color: var(--red); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.answers h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.answers .row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.answers .row b { font-weight: 600; }
.muted { color: var(--muted); }
.error { color: var(--red); font-size: 12px; }
.inline-form { display: flex; gap: 10px; margin-bottom: 14px; }
.login {
  position: fixed; inset: 0; background: rgba(246,241,231,.96);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
.login-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; width: 320px; display: flex; flex-direction: column; gap: 12px;
}
.login-card h1 { margin: 0; font-size: 22px; }
.login-card input { width: 100%; }
