:root {
  --teal: #2d5f5d;
  --teal-deep: #1f4543;
  --gold: #c5943e;
  --cream: #f7f6f0;
  --ink: #1a2e2d;
  --muted: #5b6f6e;
  --line: rgba(45, 95, 93, 0.14);
  --surface: #ffffff;
  --font: "Outfit", system-ui, sans-serif;
  --shadow: 0 14px 40px rgba(31, 69, 67, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
}

.auth-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 500;
}

.auth-boot[hidden] { display: none !important; }

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.85rem;
}

.brand {
  display: block;
  padding: 0.35rem 0.5rem 1rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}

.nav-section {
  margin: 0.75rem 0.65rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.nav-item {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover { background: rgba(45, 95, 93, 0.06); }

.nav-item.active {
  background: rgba(45, 95, 93, 0.12);
  color: var(--teal-deep);
  font-weight: 600;
}

.side-foot {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-chip {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
}

.admin-chip strong {
  display: block;
  font-size: 0.88rem;
}

.admin-chip span {
  font-size: 0.75rem;
  color: var(--muted);
}

.chip-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.75rem 0.5rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}

.lede {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.content {
  padding: 1rem 1.75rem 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  border: none;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { background: var(--teal-deep); }

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: rgba(45, 95, 93, 0.06); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.metric .label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.metric .value {
  margin-top: 0.35rem;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--teal-deep);
  letter-spacing: -0.02em;
}

.metric .hint {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--teal-deep);
}

.bars {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 0.35rem;
  align-items: end;
  min-height: 120px;
}

.bar {
  background: linear-gradient(180deg, var(--gold), var(--teal));
  border-radius: 4px 4px 2px 2px;
  min-height: 4px;
  position: relative;
}

.bar-label {
  display: none;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

table.data th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(45, 95, 93, 0.1);
  color: var(--teal-deep);
}

.pill.gold {
  background: rgba(197, 148, 62, 0.18);
  color: #8a641f;
}

.pill.muted {
  background: #eef1f0;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  margin: 0;
}

.error {
  color: #b42318;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .brand-logo { max-width: 220px; }
}

@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
}
