@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dm-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dm-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/outfit-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/outfit-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --forest: #043322;
  --forest-2: #0a4430;
  --green: #3c6a2b;
  --green-soft: #ecf3e6;
  --green-line: #d5e4cb;
  --lime: #8fc43a;
  --yellow: #ffe175;
  --yellow-soft: #fff6d1;
  --orange: #ff7a00;
  --orange-2: #e66e00;
  --orange-soft: #fff0e1;
  --ink: #1f2a24;
  --ink-2: #48544d;
  --muted: #7a857e;
  --line: #ebede6;
  --line-2: #dfe2d8;
  --bg: #f5f6f1;
  --card: #ffffff;
  --red: #b4372f;
  --red-soft: #fcebe9;
  --blue: #2f6f9f;
  --blue-soft: #e7f1f8;
  --violet: #6b4fa0;
  --violet-soft: #f0ebf8;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --side: 112px;
  --head: "Outfit", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 17px; line-height: 1.3; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.ico { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell { display: flex; min-height: 100vh; }

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--side);
  flex: none;
  background: var(--card);
  border-radius: 0 32px 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 8px 16px;
  z-index: 30;
  box-shadow: 1px 0 0 var(--line);
}
.side-logo { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; }
.side-logo .mark { width: 44px; height: 44px; }
.nav { display: flex; flex-direction: column; gap: 4px; width: 100%; overflow-y: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 58px;
  padding: 7px 4px;
  border-radius: 18px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a .ico { width: 22px; height: 22px; }
.nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--green-soft); color: var(--green); }
.nav a .badge-dot { position: relative; }
.side-foot { margin-top: auto; padding-top: 12px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.side-foot form { margin: 0; width: 100%; }
.side-out {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 60px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.side-out:hover { background: var(--red-soft); color: var(--red); }

.main { flex: 1; min-width: 0; padding: 0 32px 48px; }
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 14px 0;
}
.top-title { min-width: 0; }
.crumbs { display: flex; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.crumbs span + span::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 14px;
  background: var(--card);
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13.5px;
}
.who small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; line-height: 1.1; }
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--forest);
  font-family: var(--head);
  font-weight: 700;
  font-size: 14px;
  flex: none;
}
.avatar.lg { width: 48px; height: 48px; border-radius: 18px; font-size: 17px; }
.avatar.muted { background: var(--bg); color: var(--muted); }

.page-intro { color: var(--ink-2); max-width: 760px; margin: 0 0 22px; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--forest);
  margin: 0 0 20px;
  font-weight: 500;
}
.flash .ico { color: var(--green); margin-top: 1px; }
.flash.err { background: var(--red-soft); border-color: #f2c9c4; color: #6d1f19; }
.flash.err .ico { color: var(--red); }
.flash p { flex: 1; }
.flash-x { border: 0; background: transparent; padding: 2px; cursor: pointer; color: inherit; opacity: .6; border-radius: 8px; }
.flash-x:hover { opacity: 1; }
.flash-x .ico { width: 18px; height: 18px; color: inherit; margin: 0; }

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 24px;
  border: 1px solid var(--line);
  min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card.tint { background: var(--forest); border-color: var(--forest); color: #eef3ea; }
.card.tint h2, .card.tint h3 { color: #fff; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: 13px; }
.card-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card.flush .card-head { padding: 22px 24px 0; }
.stack { display: grid; gap: 20px; }
.grid { display: grid; gap: 20px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.mt { margin-top: 20px; }

.stat { display: flex; flex-direction: column; gap: 14px; }
.stat-top { display: flex; align-items: center; gap: 12px; }
.stat-top span { color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.chip-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--green-soft);
  color: var(--green);
  flex: none;
}
.chip-ico.y { background: var(--yellow-soft); color: #8a6a00; }
.chip-ico.o { background: var(--orange-soft); color: var(--orange-2); }
.chip-ico.b { background: var(--blue-soft); color: var(--blue); }
.chip-ico.v { background: var(--violet-soft); color: var(--violet); }
.chip-ico.r { background: var(--red-soft); color: var(--red); }
.stat-value { font-family: var(--head); font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; word-break: break-word; }
.stat-value.sm { font-size: 20px; }
.stat-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; background: var(--green-soft); color: var(--green); }
.delta.down { background: var(--red-soft); color: var(--red); }
.delta.flat { background: var(--bg); color: var(--muted); }

.hello { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hello p { color: var(--muted); margin-top: 4px; }
.hello .end { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.chart { width: 100%; height: 200px; }
.chart rect.on { fill: var(--green); }
.chart rect.off { fill: var(--line); }
.chart rect.on:hover { fill: var(--orange); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 8px; }
.chart-sum { font-family: var(--head); font-size: 22px; font-weight: 600; }

.meter { width: 100%; height: 8px; }
.meter .track { fill: var(--bg); }
.meter .fill { fill: var(--green); }
.rank { display: grid; gap: 14px; }
.rank-row { display: grid; gap: 7px; }
.rank-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.rank-top b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-top span { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.todo { display: grid; gap: 10px; }
.todo a, .todo div.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}
.todo a:hover { background: var(--green-soft); text-decoration: none; }
.todo b { display: block; font-weight: 600; }
.todo small { display: block; color: var(--muted); font-size: 12.5px; }
.todo .count { margin-left: auto; font-family: var(--head); font-weight: 600; font-size: 20px; }
.todo .ico.go { margin-left: auto; color: var(--muted); }
.todo .count + .ico.go { margin-left: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--orange);
  color: var(--forest);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--orange-2); text-decoration: none; }
.btn .ico { width: 18px; height: 18px; }
.btn.dark { background: var(--forest); color: var(--yellow); }
.btn.dark:hover { background: var(--forest-2); }
.btn.line { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn.line:hover { border-color: var(--green); color: var(--green); }
.btn.soft { background: var(--green-soft); color: var(--green); }
.btn.soft:hover { background: var(--green-line); }
.btn.ghost { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.ghost:hover { background: var(--bg); color: var(--ink); }
.btn.danger { background: transparent; color: var(--red); padding: 0 12px; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 13px; }
.btn.icon { padding: 0; width: 42px; }
.btn.icon.sm { width: 36px; }
.btn.block { width: 100%; }

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.field small { font-weight: 500; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="month"], input[type="search"], input:not([type]), select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}
input:hover, select:hover { border-color: #c9cdc1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
select {
  appearance: none;
  padding-right: 38px;
  background-image: url(chevron.svg);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
input[type="file"] { font-size: 13.5px; color: var(--ink-2); }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--card);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-xs { margin-top: 6px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.form-row .field { flex: 1 1 180px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.wide { grid-column: 1 / -1; }

.drop {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  padding: 30px 20px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--green); background: var(--green-soft); }
.drop .chip-ico { width: 52px; height: 52px; border-radius: 18px; }
.drop b { font-family: var(--head); font-size: 16px; font-weight: 600; }
.drop small { color: var(--muted); }
.drop input[type="file"] { max-width: 100%; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; width: fit-content; max-width: 100%; }
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 13px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { background: var(--bg); text-decoration: none; }
.tabs a.on { background: var(--forest); color: #fff; }
.tabs a em { font-style: normal; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.tabs a.on em { background: rgba(255, 255, 255, .16); color: var(--yellow); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.toolbar input, .toolbar select { min-height: 42px; width: auto; }
.toolbar input[type="search"] { min-width: 300px; }
.period { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px; }
.period b { padding: 0 10px; font-family: var(--head); font-weight: 600; white-space: nowrap; }
.period .btn { min-height: 34px; width: 34px; border-radius: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbf8; }
.card.flush th:first-child, .card.flush td:first-child { padding-left: 24px; }
.card.flush th:last-child, .card.flush td:last-child { padding-right: 24px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
td .strong { font-weight: 600; }
.money { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.neg { color: var(--red); }
.money.pos { color: var(--green); }
.title-cell { max-width: 340px; }
.title-cell b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.empty-row td { text-align: center; color: var(--muted); padding: 36px 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.pill.warn { background: var(--orange-soft); color: #b65200; }
.pill.info { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.off { background: var(--bg); color: var(--muted); }
.pill.red { background: var(--red-soft); color: var(--red); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 10px; background: var(--bg); color: var(--ink-2); font-size: 12.5px; }

.assign summary, .edit summary { list-style: none; cursor: pointer; }
.assign summary::-webkit-details-marker, .edit summary::-webkit-details-marker { display: none; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-form input { min-height: 38px; min-width: 0; flex: 1; }
td .inline-form { min-width: 260px; }
.assign .inline-form { margin-top: 8px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.pager .end { display: flex; gap: 6px; }

.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 44px 24px;
}
.empty .chip-ico { width: 64px; height: 64px; border-radius: 22px; }
.empty .chip-ico .ico { width: 28px; height: 28px; }
.empty h2 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 440px; }

.welcome { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.welcome-body { padding: 32px; display: grid; gap: 16px; align-content: center; }
.welcome-body h2 { font-size: 24px; }
.welcome-body p { color: var(--ink-2); }
.steps { display: grid; gap: 12px; counter-reset: step; margin: 6px 0 4px; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--forest);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.steps b { display: block; font-weight: 600; }
.steps small { color: var(--muted); font-size: 13px; }
.welcome-art { background: var(--forest); display: grid; place-items: center; min-height: 260px; position: relative; }
.welcome-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: .85; }

.status-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); color: var(--ink-2); font-size: 13.5px; }
.status-line .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status-line .dot.warn { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.status-line .dot.on { background: var(--lime); box-shadow: 0 0 0 4px var(--green-soft); }

.map-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.map-grid .field select.guessed { border-color: var(--green-line); background-color: #fbfdf9; }

.people { display: grid; gap: 14px; }
.person { padding: 0; }
.person-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; flex-wrap: wrap; }
.person-head .who-txt { min-width: 0; flex: 1; }
.person-head b { display: block; font-weight: 600; }
.person-head small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.person-head .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.person-body { border-top: 1px solid var(--line); padding: 22px; display: grid; gap: 20px; }
.edit[open] > summary .btn { background: var(--green-soft); color: var(--green); border-color: transparent; }
.block-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.roles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.role { position: relative; display: block; cursor: pointer; }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role span { display: block; height: 100%; padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line-2); background: var(--card); transition: border-color .15s, background .15s; }
.role b { display: block; font-weight: 600; margin-bottom: 3px; }
.role small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.role input:checked + span { border-color: var(--green); background: var(--green-soft); }
.role input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.perms { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.perms label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); font-size: 13.5px; cursor: pointer; }
.perms input, .switch input { width: 18px; height: 18px; accent-color: var(--green); flex: none; margin: 0; }
.perms.locked label { opacity: .7; cursor: default; }
.switch { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--ink-2); min-height: 44px; }

.kv { display: grid; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }
.note { color: var(--muted); font-size: 13px; }
.note.box { padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); }
.result-cards { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.result-cards > div { padding: 16px; border-radius: var(--r-md); background: var(--bg); }
.result-cards span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.result-cards b { font-family: var(--head); font-size: 19px; font-weight: 600; }

.gate { background: var(--bg); }
.gate-wrap { height: 100vh; min-height: 560px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; padding: 16px; }
.gate-form { display: grid; place-items: center; padding: 32px 24px; }
.gate-inner { width: 100%; max-width: 400px; display: grid; gap: 26px; }
.gate-inner h1 { font-size: 30px; }
.gate-inner .page-intro { margin: 6px 0 0; }
.gate-inner form { display: grid; gap: 16px; }
.gate-inner .btn { min-height: 48px; margin-top: 4px; }
.gate-photo { margin: 0; height: 100%; min-height: 0; border-radius: 32px; overflow: hidden; position: relative; background: var(--forest); }
.gate-photo img { width: 100%; height: 100%; object-fit: cover; }

.shade { display: none; }

.bulk {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px 10px 18px;
  margin-bottom: 14px;
  border-radius: var(--r-md);
  background: var(--forest);
  color: #eef3ea;
  box-shadow: 0 14px 40px rgba(4, 51, 34, .22);
}
.bulk[hidden] { display: none; }
.bulk-count { font-size: 13.5px; margin-right: 4px; }
.bulk-count b { color: var(--yellow); font-family: var(--head); font-size: 16px; }
.bulk input { min-height: 36px; width: 260px; max-width: 100%; border-color: transparent; }
.bulk .btn.line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.bulk .btn.line:hover { border-color: var(--yellow); color: var(--yellow); }
.bulk .btn.ghost { color: rgba(255, 255, 255, .75); }
.bulk .btn.ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
th.check, td.check { width: 44px; padding-right: 0; }
td.check input, th.check input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; cursor: pointer; }
.card.flush th.check:first-child, .card.flush td.check:first-child { padding-left: 22px; }
tbody tr:has(td.check input:checked) td { background: var(--green-soft); }
.row-link { color: inherit; text-decoration: none; }
.row-link:hover b { color: var(--green); text-decoration: underline; }
a.money { color: inherit; text-decoration: none; }
a.money:hover { color: var(--green); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-head .stat-value { font-size: 32px; margin: 2px 0; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; letter-spacing: .02em; }
.kv b { overflow-wrap: anywhere; }
.muted-row td { color: var(--muted); }
.goal-cell { min-width: 150px; }
.campaign-form { display: grid; gap: 10px; text-align: left; margin-top: 10px; min-width: 260px; }
.campaign-form + .campaign-form { padding-top: 10px; border-top: 1px solid var(--line); }
.edit-campaign[open] { background: var(--card); }
.closed-list > summary { list-style: none; cursor: pointer; padding-bottom: 20px !important; }
.closed-list > summary::-webkit-details-marker { display: none; }
.closed-list[open] > summary { padding-bottom: 0 !important; margin-bottom: 14px; }
.goal { display: grid; gap: 6px; padding: 16px; border-radius: var(--r-md); background: var(--bg); }
.goal b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-num { font-family: var(--head); font-size: 24px; font-weight: 600; line-height: 1.1; }
.goal small { color: var(--muted); font-size: 12px; }
.combined { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.combined span { display: block; font-size: 12.5px; color: var(--yellow); font-weight: 600; min-height: 18px; }
.combined b { display: block; font-family: var(--head); font-size: 22px; font-weight: 600; color: #fff; }
.combined small { color: rgba(238, 243, 234, .7); }
.drop.compact { padding: 18px 14px; gap: 6px; }
.drop.compact b { font-size: 14px; }
.grow-field { flex: 1 1 280px; }
.preview-card { border: 2px solid var(--orange); margin-bottom: 20px; }

.ai-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; border-color: #ddd3ee; background: linear-gradient(90deg, var(--violet-soft), var(--card) 60%); }
.ai-body { flex: 1 1 320px; display: grid; gap: 6px; }
.ai-body p { color: var(--ink-2); font-size: 13.5px; }
.ai-actions { display: flex; gap: 8px; }
.ai-actions form { margin: 0; }
.ai-progress .fill { fill: var(--violet); transition: width .3s; }
.ai-suggest { display: grid; gap: 4px; justify-items: start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--violet-soft); margin: 0 0 6px; min-width: 240px; }
.ai-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--violet); }
.ai-label .ico { width: 14px; height: 14px; }
.ai-suggest b { font-weight: 600; font-size: 13.5px; }
.ai-suggest .btn { margin-top: 4px; }
.ai-wait { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--violet); }
.ai-wait .ico { width: 14px; height: 14px; }

.tour-shade { position: fixed; inset: 0; z-index: 90; background: rgba(4, 51, 34, .55); }
.tour-shade.clear { background: transparent; }
.tour-spot {
  position: fixed;
  z-index: 91;
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--yellow), 0 0 0 9999px rgba(4, 51, 34, .55);
  pointer-events: none;
  transition: left .2s, top .2s, width .2s, height .2s;
}
.tour-card {
  position: fixed;
  z-index: 92;
  width: 380px;
  max-width: calc(100vw - 24px);
  padding: 20px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(4, 51, 34, .3);
  display: grid;
  gap: 10px;
}
.tour-card.centered { transform: translate(-50%, -50%); width: 440px; }
.tour-card h2 { font-size: 18px; }
.tour-card p { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.tour-head { display: flex; align-items: center; justify-content: space-between; }
.tour-count { font-size: 12px; font-weight: 700; color: var(--violet); background: var(--violet-soft); padding: 3px 10px; border-radius: 999px; }
.tour-x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 8px; border-radius: 10px; }
.tour-x:hover { background: var(--bg); color: var(--ink); }
.tour-bar { height: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.tour-bar span { display: block; height: 100%; background: var(--orange); border-radius: 4px; }
.tour-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tour-actions .btn[disabled] { opacity: .35; cursor: default; }
.menu-open .tour-spot { z-index: 91; }
.tour-btn { gap: 6px; }

@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1080px) {
  .g-main, .g-side, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome-art { min-height: 180px; }
}
@media (max-width: 860px) {
  body { font-size: 14px; }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: auto;
    width: 264px;
    align-items: stretch;
    padding: 18px 14px;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 0 20px 60px rgba(4, 51, 34, .18);
  }
  .side-logo { width: auto; height: auto; justify-content: start; display: flex; gap: 10px; align-items: center; padding: 0 8px; }
  .side-logo::after { content: "Centaurus"; font-family: var(--head); font-weight: 700; font-size: 18px; color: var(--forest); }
  .nav a, .side-out { flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 48px; padding: 0 14px; font-size: 14.5px; border-radius: 14px; }
  .menu-open .side { transform: none; }
  .menu-open .shade { display: block; position: fixed; inset: 0; background: rgba(4, 51, 34, .32); z-index: 25; }
  .menu-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--card);
    cursor: pointer;
    flex: none;
  }
  .main { padding: 0 16px 40px; }
  .top { min-height: 68px; gap: 12px; }
  h1 { font-size: 21px; }
  .who { padding: 3px; border: 0; background: transparent; }
  .who .who-name { display: none; }
  .tour-btn span { display: none; }
  .tour-btn { width: 40px; padding: 0; }
  .menu-open .side { z-index: 93; }
  .menu-open .tour-card { z-index: 95; }
  .tour-card { width: auto; max-width: none; }
  .card { padding: 18px; border-radius: 24px; }
  .card.flush .card-head { padding: 18px 18px 0; }
  .card.flush th:first-child, .card.flush td:first-child { padding-left: 18px; }
  .card.flush th:last-child, .card.flush td:last-child { padding-right: 18px; }
  .g-4, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .grid, .stack { gap: 14px; }
  .stat-value { font-size: 23px; }
  .result-cards { grid-template-columns: minmax(0, 1fr); }
  .hello .end { margin-left: 0; width: 100%; }
  .hello .end .btn { flex: 1; }
  .toolbar input[type="search"] { min-width: 0; width: 100%; }
  .toolbar form { width: 100%; }
  .toolbar form > * { flex: 1 1 140px; }
  form.toolbar > input, form.toolbar > select, form.toolbar > .btn { flex: 1 1 140px; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .gate-wrap { grid-template-columns: minmax(0, 1fr); padding: 12px; height: auto; min-height: 100vh; }
  .gate-photo { order: -1; height: 220px; border-radius: 26px; }
  .gate-form { padding: 20px 8px 32px; place-items: start center; }
  .welcome-body { padding: 22px; }
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  table.stack-sm tbody tr:last-child { border-bottom: 0; }
  table.stack-sm td { padding: 3px 0; border: 0; }
  .card.flush table.stack-sm td:first-child, .card.flush table.stack-sm td:last-child { padding-left: 0; padding-right: 0; }
  table.stack-sm td.num { text-align: left; }
  table.stack-sm td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  table.stack-sm tbody tr:hover td { background: transparent; }
  .title-cell { max-width: none; }
  .pager { padding: 14px 18px; }
  .combined { grid-template-columns: minmax(0, 1fr); }
  .bulk { top: 6px; }
  .bulk input { width: 100%; }
  table.stack-sm td.check { position: absolute; right: 18px; width: auto; }
  table.stack-sm tr { position: relative; }
  .campaign-form { min-width: 0; }
  .person-head { padding: 16px 18px; }
  .person-head .who-txt { flex: 1 1 calc(100% - 64px); }
  .person-head .meta { width: 100%; }
  .person-body { padding: 18px; }
  td .inline-form { min-width: 0; }
}
