:root {
  --ink: #1c2430;
  --muted: #5c6b73;
  --line: #d7e0dc;
  --bg: #e7eeeb;
  --card: #ffffff;
  --nav: #14312e;
  --nav-text: #d7ebe6;
  --teal: #0c5c56;
  --teal-dark: #084740;
  --danger: #8d2a2a;
  --warn: #8a5a12;
  --ok: #1d6b45;
  --accent: #1f4e79;
  --shadow: 0 1px 2px rgba(20, 49, 46, 0.06);
  font-family: "Liberation Sans", "Nimbus Sans", "DejaVu Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #0c5c56; outline-offset: 2px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 8px; background: white; padding: 8px; z-index: 5; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.nav {
  background: var(--nav);
  color: var(--nav-text);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand { padding: 4px 10px 16px; }
.brand strong { display: block; font-size: 0.95rem; letter-spacing: 0.02em; color: white; }
.brand span { display: block; margin-top: 4px; font-size: 0.8rem; color: #b7d4ce; }
.nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--nav-text);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 8px;
}
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.12); color: white; }
.badge {
  background: #f3d4d4;
  color: var(--danger);
  border-radius: 999px;
  min-width: 1.4rem;
  text-align: center;
  font-size: 0.75rem;
  padding: 1px 6px;
}
.who { margin-top: auto; padding: 12px; font-size: 0.8rem; color: #b7d4ce; }

.main { padding: 20px 28px 48px; max-width: 1180px; }
.top {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.search { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.search input, .field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
}
.userbox { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: white;
  display: grid; place-items: center; font-size: 0.75rem;
}
.banner {
  background: #fff6e8;
  border: 1px solid #efd3a4;
  color: #6b4a12;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}
.flash {
  background: #e5f3f1;
  border: 1px solid #b7ddd7;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.notice {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 8px;
}

h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.kpi, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.kpi span { display: block; color: var(--muted); font-size: 0.8rem; }
.kpi strong { display: block; font-size: 1.6rem; margin-top: 4px; }
.kpi em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; }

.bar { height: 8px; background: #d5e4e1; border-radius: 99px; overflow: hidden; }
.bar span, .bar i { display: block; height: 100%; background: var(--teal); }

table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 12px; }

.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 0.78rem; font-weight: 650; }
.pill-success { background: #e5f6ec; color: var(--ok); }
.pill-warning { background: #fff3dd; color: var(--warn); }
.pill-danger { background: #fde8e8; color: var(--danger); }
.pill-neutral { background: #eef1f3; color: #52606a; }
.pill-accent { background: #e7f0f8; color: var(--accent); }

.btn, button, .linkish {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  display: inline-block;
}
.btn-primary, button.primary { background: var(--teal); color: white; border-color: var(--teal-dark); }
.btn-danger { color: var(--danger); border-color: #e3b4b4; background: white; }
.btn[disabled], button:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--teal); font-weight: 650; }

.props { display: grid; grid-template-columns: 220px 1fr; }
.props div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.props dt { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.chart { width: 100%; height: auto; }
.chart .grid { stroke: #e1e8e5; stroke-width: 1; }
.chart .axis { fill: #5c6b73; font-size: 11px; }
.chart .series { fill: none; stroke: #0c5c56; stroke-width: 2; }
.chart .dot { fill: #0c5c56; }
.chart .reference { stroke: #8d2a2a; stroke-dasharray: 4 3; }
.chart .mark { stroke: #1f4e79; stroke-dasharray: 2 3; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.swatch { width: 10px; height: 10px; display: inline-block; margin-right: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.field label { font-size: 0.78rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; }

.steps { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.step { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.step.on { color: var(--ink); font-weight: 650; }
.num {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; background: white;
}
.step.on .num { background: var(--teal); color: white; border-color: var(--teal); }

.alert {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); background: white; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
}
.danger-box { border: 1px solid #e3b4b4; border-radius: 12px; padding: 14px; background: #fff8f8; }

.phone {
  max-width: 28rem;
  margin: 0 auto;
  background: white;
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 18px 16px 24px;
  box-shadow: var(--shadow);
}
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  flex: 1 1 4.5rem;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.choices input { position: absolute; opacity: 0; }
.choices label:has(input:checked) { background: var(--teal); color: white; border-color: var(--teal-dark); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.qr { width: 180px; height: auto; background: white; padding: 8px; border-radius: 8px; }

.login-list { display: grid; gap: 8px; max-width: 32rem; }
.login-list button { text-align: left; }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .nav { flex-direction: row; overflow-x: auto; align-items: center; }
  .brand, .who { display: none; }
  .nav a { white-space: nowrap; }
  .main { padding: 14px; }
  .props { grid-template-columns: 1fr; }
}
