:root {
  --ink: #14213d;
  --text: #1f2937;
  --muted: #5b6472;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --border: #e1e6ec;
  --brand: #0f766e;
  --brand-dark: #0b5a54;
  --brand-tint: #e3f4f2;
  --mint: #2dd4bf;
  --red: #b42318;
  --red-bg: #fde8e6;
  --amber: #8a5a00;
  --amber-bg: #fdf0d0;
  --green: #1a7f4b;
  --green-bg: #dff5e8;
  --radius: 12px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.2; }
h1 { font-size: 24px; }
h2 { font-size: 18px; margin-bottom: 4px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
a { color: var(--brand); }

.top { background: var(--ink); color: #fff; }
.top-inner { display: flex; align-items: center; gap: 16px; padding: 10px 20px; max-width: 1280px; margin: 0 auto; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: #fff; text-decoration: none; }
.logo img { width: 26px; height: 26px; }
.logo .accent { color: var(--mint); }
.top .spacer { flex: 1; }
.top .who { color: #cbd5e1; font-size: 14px; }
.top button.link-btn { color: #cbd5e1; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px; }
.narrow { max-width: 440px; margin: 48px auto; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; margin-right: auto; }
.hint { color: var(--muted); font-size: 14px; }

.btn { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: #c8d0da; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--border); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red-bg); }
.btn-small { padding: 4px 10px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #475467; }
.field input, .field textarea, .field select, .input { font: inherit; font-size: 15px; font-weight: 400; color: var(--text); padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 9px; background: #fff; width: 100%; }
textarea { resize: vertical; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f3; color: #475467; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.brand { background: var(--brand-tint); color: var(--brand-dark); }

.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; background: var(--amber-bg); color: var(--amber); font-weight: 500; }
.banner.green { background: var(--green-bg); color: var(--green); }
.error { color: var(--red); font-size: 14px; min-height: 1.2em; margin: 4px 0 0; }
.saved { color: var(--green); font-size: 13px; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button { font: inherit; font-weight: 600; padding: 10px 14px; border: 0; background: none; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { margin-left: 6px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fff; }
.item.empty-value { border-style: dashed; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: top; }
thead th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.meter { height: 8px; background: #eef0f3; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.meter > div { height: 100%; background: var(--brand); }

pre.code { background: var(--ink); color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }

.empty { color: var(--muted); }
.qr { width: 200px; margin: 8px auto 12px; }
.qr svg { width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
