:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --panel-soft: #eef5f2;
  --ink: #17211d;
  --muted: #61706a;
  --line: #d8dfda;
  --accent: #0e766e;
  --accent-2: #9a5f18;
  --danger: #9f2d20;
  --ok: #236d42;
  --shadow: 0 16px 40px rgba(28, 42, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: #fbfaf7;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand p,
.small {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button,
.icon-button,
.primary,
.secondary {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.nav button {
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
}

.nav button.active {
  background: var(--panel-soft);
  color: var(--ink);
  border-color: #d5e6de;
}

.main {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.15;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.primary {
  background: var(--accent);
  color: white;
  padding: 10px 14px;
}

.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  padding: 10px 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.metrics {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  margin-top: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title h3 {
  margin: 0;
  font-size: 18px;
}

.split {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.list {
  display: grid;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row-title {
  font-weight: 700;
}

.row-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.pill.high {
  color: var(--danger);
  border-color: #e7bab4;
  background: #fff5f3;
}

.pill.medium {
  color: var(--accent-2);
  border-color: #edd7b7;
  background: #fff8ed;
}

.pill.ok {
  color: var(--ok);
  border-color: #bddfc8;
  background: #f2fbf4;
}

.notice {
  padding: 16px;
  background: #fffaf1;
  border: 1px solid #ead8ac;
  border-radius: 8px;
  color: #594216;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login {
  width: min(440px, 100%);
  padding: 28px;
}

.login h1 {
  margin: 0;
  font-size: 30px;
}

.login p {
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 7px;
  margin: 18px 0 12px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
}

.message {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.locked {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics,
  .split {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
  }
}
