:root {
  font: 15px/1.5 system-ui, sans-serif;
  color: #1d2825;
  background: #f5f6f1;
  --ink: #1d2825;
  --muted: #596964;
  --sidebar: #172725;
  --mint: #b8ead1;
  --accent: #205a47;
  --line: #dce3db;
  --surface: #fff;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button { border: 1px solid var(--line); background: white; color: var(--ink); padding: 8px 13px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: .45rem; align-items: center; justify-content: center; text-decoration: none; }
button:hover, .button:hover { background: #edf4ee; text-decoration: none; }
.primary { background: #235d4a; color: white; border-color: #235d4a; }
.primary:hover { background: #174536; }
.small { font-size: .85rem; padding: 4px 9px; }
:focus-visible { outline: 3px solid #498e73; outline-offset: 3px; }
.layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: white; padding: 23px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; font-weight: 750; padding: 1px 5px 25px; line-height: 1.16; }
.brand img { width: 39px; height: 39px; }
.brand small { display: block; opacity: .73; margin-top: 4px; font-weight: 500; }
.brand:hover { text-decoration: none; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; gap: 11px; align-items: center; padding: 9px 10px; color: #d1ddd7; border-radius: 8px; }
.sidebar nav a.active, .sidebar nav a:hover { background: #28403a; color: #e5fff1; text-decoration: none; }
.sidebar nav a.active { box-shadow: inset 3px 0 var(--mint); }
.navicon { width: 21px; text-align: center; font-size: 1.1rem; color: #bce6cf; }
.sidefoot { margin-top: auto; border-top: 1px solid #3c504b; padding: 16px 6px 0; color: #d6e5dc; }
.sidefoot form { margin-top: 8px; }
.sidefoot button { color: inherit; background: transparent; border-color: #4a6058; }
.main { min-width: 0; }
.topbar { background: #fff; padding: 13px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search { display: flex; flex: 0 1 415px; position: relative; }
.search input { width: 100%; background: #f5f7f3; padding-right: 36px; }
.search kbd { position: absolute; right: 12px; top: 8px; color: var(--muted); }
.content { max-width: 1515px; margin: auto; padding: clamp(20px, 3.4vw, 46px); }
.heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.85rem); line-height: 1.1; letter-spacing: -.055em; font-weight: 750; }
h2 { font-size: 1.18rem; letter-spacing: -.022em; }
h3 { font-size: 1rem; }
.subtitle { margin-top: 8px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px 15px; background: #fff; color: inherit; min-width: 0; }
.metric:first-child { background: #e0f0e5; border-color: #cbe0d1; }
.metric strong { display: block; font-size: 1.9rem; line-height: 1.25; letter-spacing: -.065em; }
.metric span { color: var(--muted); font-size: .86rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.card, .panel, .table-frame { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 17px; min-width: 0; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.eyeline { color: var(--muted); font-size: .78rem; font-weight: 680; }
.card h2 { margin: 4px 0; }
.card-footer { display: flex; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 13px; padding-top: 10px; font-size: .86rem; }
.meta { color: var(--muted); font-size: .86rem; }
.pill { display: inline-flex; align-items: center; border-radius: 20px; font-size: .78rem; padding: 3px 8px; white-space: nowrap; background: #eaf0e9; color: #36544a; }
.pill.ok { background: #dff3e7; color: #1b6546; }
.pill.warn { background: #fff0d3; color: #774a10; }
.pill.hot { background: #ffe8e5; color: #9c3d33; }
.progress { height: 6px; border-radius: 4px; background: #e5ede6; overflow: hidden; margin: 8px 0; }
progress { appearance: none; width: 100%; height: 6px; display: block; border: 0; background: #e5ede6; border-radius: 4px; overflow: hidden; }
progress::-webkit-progress-bar { background: #e5ede6; }
progress::-webkit-progress-value { background: #398065; }
progress::-moz-progress-bar { background: #398065; }
.sections { display: grid; gap: 13px; margin-top: 18px; }
.panel h2 { margin-bottom: 10px; }
.panel p + p { margin-top: 10px; }
.panel + .panel { margin-top: 0; }
.workspace-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 31%); gap: 16px; }
.stack { display: grid; align-content: start; gap: 12px; min-width: 0; }
.filter { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; }
.filter input, .filter select { width: auto; max-width: 100%; }
.table-frame { overflow-x: auto; padding: 0; }
table { width: 100%; text-align: left; border-collapse: collapse; }
th, td { padding: 11px 13px; border-bottom: 1px solid #edf0ea; vertical-align: middle; }
th { font-size: .82rem; color: #4c6057; font-weight: 670; background: #f8faf6; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .key { margin-right: 8px; }
tr:hover td { background: #f8faf6; }
.key { font: .85rem ui-monospace, monospace; color: #527067; white-space: nowrap; }
.issue-title { font-weight: 650; color: var(--ink); }
.narrow { white-space: nowrap; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(225px, 1fr); gap: 10px; overflow: auto; padding-bottom: 8px; }
.board-lane { background: #eaf0e9; border-radius: 10px; padding: 11px; min-height: 180px; }
.board-lane h3 { margin-bottom: 9px; }
.board-lane .card { padding: 10px; margin-bottom: 8px; }
.drag-over { outline: 2px solid #398065; outline-offset: -2px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.entry { padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.entry:first-of-type { border-top: 0; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding: 26px; border: 1px dashed #c9d6cb; border-radius: var(--radius); color: var(--muted); background: #f8faf6; }
label { display: grid; gap: 4px; color: #344840; font-weight: 600; font-size: .86rem; }
input, textarea, select { background: #fff; color: var(--ink); border: 1px solid #cbd6cc; border-radius: 7px; padding: 7px 9px; min-width: 0; width: 100%; }
input[type=checkbox] { width: auto; }
textarea { min-height: 90px; resize: vertical; }
form.stack { gap: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; min-width: 0; }
legend { color: var(--muted); font-size: .86rem; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
dialog { border: 1px solid #d5e0d7; border-radius: 16px; width: min(94vw, 650px); max-height: 90vh; padding: 21px; color: var(--ink); box-shadow: 0 18px 65px #0e211e30; }
dialog::backdrop { background: #182b286e; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #e8f0e6; }
.login .panel { width: min(100%, 415px); padding: 25px; }
.login .brand { color: var(--ink); }
.login h1 { font-size: 2rem; margin-bottom: 12px; }
.error { color: #9c3d33; margin-top: 8px; }
.error:empty { display: none; }
#notice { position: fixed; bottom: 20px; right: 20px; max-width: min(430px, 90vw); padding: 11px 15px; border-radius: 8px; background: #193931; color: white; z-index: 3; }
#notice:empty { display: none; }
.loading { margin: 22px; color: var(--muted); }
.code { overflow-wrap: anywhere; user-select: all; }
@media (max-width: 900px) { .layout { grid-template-columns: 175px minmax(0, 1fr); } .workspace-columns { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .layout { display: block; } .sidebar { height: auto; position: static; padding: 11px 12px; }
  .sidebar .brand { padding-bottom: 9px; } .sidebar .brand img { width: 32px; height: 32px; }
  .sidebar nav { display: flex; overflow: auto; gap: 3px; padding-bottom: 2px; }
  .sidebar nav a { white-space: nowrap; font-size: .82rem; padding: 6px 8px; }
  .navicon, .sidefoot { display: none; }
  .content { padding: 18px 12px; } .topbar { padding: 9px 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }
.inline-status { display: inline-block; vertical-align: middle; }
.inline-status select { background: #eaf0e9; border: 0; border-radius: 20px; font-size: .79rem; padding: 3px 6px; color: #36544a; }
