:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e2e5ea;
  --line-strong: #cdd2da;
  --text: #1c2026;
  --muted: #667085;
  --faint: #98a2b3;
  --accent: #2457d6;
  --accent-soft: #e8eefc;
  --danger: #c4372f;
  --danger-soft: #fdecea;
  --warn: #b25e09;
  --warn-soft: #fff4e5;
  --ok: #1f7a4d;
  --ok-soft: #e6f4ec;
  --violet: #6941c6;
  --violet-soft: #f1ecfd;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  font-family: Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
::selection { background: #cfdcfa; }
input[type=checkbox], input[type=radio], progress { accent-color: var(--accent); }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 8px; }
code, pre { font-family: "D2Coding", Consolas, ui-monospace, monospace; font-size: 12.5px; }
pre { white-space: pre-wrap; word-break: break-word; background: #f8f9fb; border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 0; max-height: 520px; overflow: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 52px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); white-space: nowrap; }
.nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .sep { width: 1px; background: var(--line); margin: 6px 6px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; }
.who form { margin: 0; }

.page { max-width: 1240px; margin: 0 auto; padding: 24px; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel.tight { padding: 14px 16px; }
.panel > h2:first-child { margin-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background-color .12s ease-out, border-color .12s ease-out, box-shadow .12s ease-out; }
.btn:hover { background: var(--bg); border-color: #b4bcc8; text-decoration: none; }
.btn:active { background: #e9ecf1; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1d48b4; border-color: #1d48b4; }
.btn.primary:active { background: #183c96; border-color: #183c96; }
.btn.danger { background: var(--danger-soft); border-color: #efc2be; color: var(--danger); }
.btn.danger:hover { background: #f9d6d2; border-color: #e09b94; }
.btn.danger:active { background: #f3c1bc; }
.btn.danger:focus-visible { outline-color: var(--danger); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 28px; padding: 0; }
.btn.icon svg { width: 12px; height: 12px; }
.btn.icon.xs { width: 18px; height: 18px; border-radius: 5px; box-shadow: none; }
.btn.icon.xs svg { width: 9px; height: 9px; }
.btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; font: inherit; color: var(--text);
}
textarea { height: auto; min-height: 140px; padding: 10px; resize: vertical; line-height: 1.6; }
textarea.code { font-family: Consolas, ui-monospace, monospace; font-size: 12.5px; min-height: 420px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
select.inline, input.inline { width: auto; height: 30px; }
.choice { display: flex; gap: 8px; }
.choice label { display: flex; align-items: center; gap: 6px; font-weight: 500; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; margin: 0; }
.choice input { margin: 0; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe3cf; }
.flash.err { background: var(--danger-soft); color: var(--danger); border-color: #f3c7c3; }
.flash.warn { background: var(--warn-soft); color: var(--warn); border-color: #f6dcb6; }
.flash ul { margin: 6px 0 0; padding-left: 18px; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0f3; color: #475467; white-space: nowrap; }
.pill.s-RECEIVED, .pill.s-DRAFTING { background: var(--accent-soft); color: var(--accent); }
.pill.s-NEEDS_INFO { background: var(--warn-soft); color: var(--warn); }
.pill.s-AWAITING_CONFIRM { background: var(--violet-soft); color: var(--violet); }
.pill.s-CONFIRMED, .pill.s-PUBLISHED { background: #e7f2f5; color: #1d6a7a; }
.pill.s-IN_PROGRESS { background: var(--accent-soft); color: var(--accent); }
.pill.s-IN_REVIEW { background: var(--violet-soft); color: var(--violet); }
.pill.s-DONE { background: var(--ok-soft); color: var(--ok); }
.pill.s-CANCELED { background: #f2f4f7; color: var(--faint); }
.pill.s-REJECTED { background: var(--danger-soft); color: var(--danger); }
.pill.urgent { background: var(--danger-soft); color: var(--danger); }
.pill.t-bug { background: var(--warn-soft); color: var(--warn); }
.pill.t-improve { background: var(--violet-soft); color: var(--violet); }
.type-pick { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.type-pick legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.type-pick .req { font-size: 11px; font-weight: 600; color: var(--danger); margin-left: 4px; }
.type-opt { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.type-opt > span { display: flex; flex-direction: column; gap: 2px; }
.type-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.slip-ok { background: var(--ok-soft); color: var(--ok); }
.pill.slip-late { background: var(--danger-soft); color: var(--danger); }
.pill.admin { background: #1c2026; color: #fff; }
.pill.line { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.tag { display: inline-block; padding: 0 6px; border-radius: 4px; background: #f2f4f7; color: #475467; font-size: 12px; font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg a { padding: 6px 12px; color: var(--muted); }
.seg a + a { border-left: 1px solid var(--line-strong); }
.seg a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg a:hover { text-decoration: none; }

table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #fafbfc; }
table.list tr:last-child td { border-bottom: 0; }
table.list th.right, table.list td.right { text-align: right; }
table.list td.right:has(.btn) { padding-top: 6px; padding-bottom: 6px; }
table.list td.right form { display: inline-block; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--panel); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--text); }
a.card:hover { border-color: var(--line-strong); box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08); text-decoration: none; }
.card .card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card .card-title { font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.card .card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12.5px; }
.card .card-note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; }
.card.attn { border-left: 3px solid var(--violet); }
.card.attn-warn { border-left: 3px solid var(--warn); }
.progress { height: 4px; background: #eef0f3; border-radius: 2px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--ok); }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.column { background: #eceef2; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.column-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 700; }
.column-head .count { color: var(--muted); font-weight: 600; }
.column .card { margin-bottom: 10px; padding: 12px; }
.column .card:last-child { margin-bottom: 0; }
.overdue { color: var(--danger); font-weight: 600; }
.card form { margin: 8px 0 0; display: flex; gap: 6px; }

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters select { width: auto; min-width: 140px; height: 32px; }

.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 12px; border-radius: 8px; background: #f8f9fb; border: 1px solid var(--line); }
.msg.LLM { background: var(--warn-soft); border-color: #f6dcb6; }
.msg.ADMIN { background: #f2f4f7; }
.msg .msg-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.msg .msg-body { white-space: pre-wrap; }

.item-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.item-block .item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.item-block dl { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; margin: 0; }
.item-block dt { color: var(--muted); font-weight: 600; font-size: 12.5px; padding-top: 1px; }
.item-block dd { margin: 0; }
.item-block ul, .item-block ol { margin: 0; padding-left: 18px; }
.sched { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.sched .k { color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); color: #1d3f9a; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--muted); background: #fafbfc; cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.thumbs button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #1c2026; color: #fff; cursor: pointer; font-size: 12px; line-height: 20px; padding: 0; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
.photos a img { width: 160px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 8px; background: var(--accent-soft); color: #1d3f9a; font-weight: 600; }
.working.stopped { background: var(--danger-soft); color: #8f241d; }
.stopped-why { margin-top: 8px; color: var(--danger); }

.center-box { max-width: 420px; margin: 10vh auto; }
.center-box .panel { padding: 28px; }
.center-box h1 { margin-bottom: 6px; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.roadmap-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.roadmap svg { display: block; font-family: inherit; width: 100%; height: auto; min-width: 960px; }
.roadmap .bar-label { font-size: 12px; fill: #fff; font-weight: 600; pointer-events: none; }
.roadmap .bar-label.dark { fill: var(--text); }
.roadmap .bar-label.outside { fill: var(--text); font-weight: 500; }
.roadmap a:hover rect.bar { filter: brightness(0.92); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

.health { display: flex; gap: 10px; flex-wrap: wrap; }
.health .h { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.health .h.ok b { color: var(--ok); }
.health .h.bad b { color: var(--danger); }

.roles { display: flex; flex-wrap: wrap; gap: 4px; }
details.inline summary { cursor: pointer; list-style: none; }
details.inline summary:not(.btn) { color: var(--accent); }
details.inline summary::-webkit-details-marker { display: none; }
details.inline[open] { background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-top: 6px; }
details.pop { position: relative; }
details.pop summary { list-style: none; }
details.pop summary::-webkit-details-marker { display: none; }
details.pop[open] > :not(summary) { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.diff { font-family: Consolas, ui-monospace, monospace; font-size: 12.5px; white-space: pre-wrap; }
.diff .add { background: #e6f4ec; display: block; }
.diff .del { background: #fdecea; display: block; text-decoration: line-through; color: #8a2a24; }

.md-view > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.md-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.md-head h2 { margin: 0 auto 0 0; }
.md-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.md-tabs label { margin: 0; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.md-tabs label + label { border-left: 1px solid var(--line-strong); }
#bv-doc:checked ~ .md-head label[for=bv-doc], #bv-src:checked ~ .md-head label[for=bv-src] { background: var(--accent-soft); color: var(--accent); }
#bv-doc:focus-visible ~ .md-head label[for=bv-doc], #bv-src:focus-visible ~ .md-head label[for=bv-src] { outline: 2px solid var(--accent); outline-offset: -2px; }
.md-view .md-src { display: none; }
#bv-src:checked ~ .md-src { display: block; }
#bv-src:checked ~ .md-doc { display: none; }

.markdown { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown h1, .markdown h2 { font-size: 16px; margin: 22px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.markdown h3 { font-size: 14.5px; margin: 14px 0 4px; }
.markdown h4, .markdown h5, .markdown h6 { font-size: 14px; margin: 12px 0 4px; }
.markdown p { margin: 0 0 10px; }
.markdown ul, .markdown ol { margin: 0 0 10px; padding-left: 22px; }
.markdown li { margin: 3px 0; }
.markdown li:has(> input[type=checkbox]) { list-style: none; margin-left: -20px; }
.markdown li > input[type=checkbox] { width: auto; height: auto; margin: 0 6px 0 0; vertical-align: -2px; }
.markdown code { background: #f2f4f7; border-radius: 4px; padding: 1px 5px; }
.markdown pre { margin: 0 0 12px; max-height: none; }
.markdown pre code { background: none; padding: 0; }
.markdown table { border-collapse: collapse; margin: 0 0 12px; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 5px 10px; text-align: left; }
.markdown th { background: #f8f9fb; }
.markdown blockquote { margin: 0 0 10px; padding: 2px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.markdown hr { margin: 14px 0; }

.audit-detail { line-height: 1.5; }

.comments { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 14px; }
.comment { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fcfcfd; }
.comment:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.comment-head .faint { margin-left: auto; }
.comment-body { font-size: 13.5px; }
.comment-body > :last-child { margin-bottom: 0; }
.comment-form textarea { margin-bottom: 8px; }
h2 .count { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.related li { display: flex; flex-direction: column; gap: 4px; }
.top-search input { width: 180px; height: 32px; padding: 0 10px; }
.top-search input:focus { width: 240px; }
.search-form input[type=search] { flex: 1 1 260px; max-width: 420px; height: 32px; }
.search-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.hits { list-style: none; margin: 0; padding: 0; }
.hits li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.hits li:first-child { border-top: 0; padding-top: 4px; }
.hit-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hit-head a { font-weight: 600; }
.hit-text { color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
mark { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }
.pill.blocked { background: #fef3f2; color: #b42318; }
.card.is-blocked { border-left: 3px solid #d92d20; }
.notice.blocked { background: #fef3f2; color: #7a271a; border: 1px solid #fecdca; margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.blocked-note { white-space: pre-wrap; color: #3b1a14; }
.checks-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.checks-head h2 { margin: 0; }
.checks-head progress { flex: 1; max-width: 220px; height: 8px; accent-color: #1f7a4d; }
.checks { list-style: none; margin: 0 0 8px; padding: 0; }
.check-row { padding: 8px 0; border-top: 1px solid var(--line); }
.check-row:first-child { border-top: 0; }
.check-row label { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-weight: 400; cursor: pointer; }
.check-row input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.check-row.done label span { color: var(--muted); text-decoration: line-through; text-decoration-color: #98a2b3; }
.check-how { margin: 2px 0 0 24px; color: var(--muted); font-size: 12px; }
.check-row .faint.small { margin-left: 24px; }
.checks-all { color: #1f7a4d; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1.25; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; align-items: start; }
table.num td:not(:first-child), table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
table.num td.bad { color: #b42318; font-weight: 600; }
table.weekly .bar-col { text-align: left; width: 170px; }

.daysoff { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .daysoff { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { margin: 0 4px; min-width: 108px; text-align: center; font-variant-numeric: tabular-nums; }
.cal-legend { margin-left: auto; display: flex; gap: 6px; }
table.cal { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table.cal th { padding: 8px 10px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
table.cal th.sun, table.cal td.sun .cal-num, table.cal td.hol .cal-num { color: var(--danger); }
table.cal th.sat, table.cal td.sat .cal-num { color: var(--accent); }
table.cal td { height: 92px; padding: 6px 8px; vertical-align: top; border: 1px solid var(--line); }
table.cal td.off { background: #f8f9fb; }
table.cal td.out { background: #fbfbfc; }
table.cal td.out .cal-num { opacity: .45; }
table.cal td.out .cal-bar { opacity: .55; }
table.cal td.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px; color: var(--text, #1c2026); font-variant-numeric: tabular-nums; font-size: 13px; }
.cal-num:hover { background: var(--accent-soft); text-decoration: none; }
table.cal td.today .cal-num { background: var(--text); color: #fff; font-weight: 600; }
table.cal td.today.sun .cal-num, table.cal td.today.hol .cal-num { background: var(--danger); color: #fff; }
table.cal td.today.sat .cal-num { background: var(--accent); color: #fff; }
.cal-chip { display: block; margin-top: 4px; padding: 1px 7px; border-radius: 4px; font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-legend .cal-chip, table.list .cal-chip { display: inline-block; margin-top: 0; }
.cal-chip.holiday { background: var(--danger-soft); color: var(--danger); }
.cal-chip.leave { background: var(--ok-soft); color: var(--ok); }
.cal-chip.leave.mine { background: var(--ok); color: #fff; }
.cal-bar { display: block; position: relative; height: 20px; margin: 3px -9px 0; padding: 0 9px; font-size: 12px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-bar.start { margin-left: 0; padding-left: 7px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.cal-bar.end { margin-right: 0; padding-right: 7px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.cal-bar.empty { visibility: hidden; }
table.cal td.sun .cal-bar:not(.start) { margin-left: -8px; }
table.cal td.sat .cal-bar:not(.end) { margin-right: -8px; }
.cal-bar.holiday { background: var(--danger-soft); color: var(--danger); }
.cal-bar.leave { background: var(--ok-soft); color: var(--ok); }
.cal-bar.leave.mine { background: var(--ok); color: #fff; }
.cal-list-title { margin-top: 24px; }
.dayoff-form .kind { display: flex; gap: 16px; }
.dayoff-form .kind label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.dayoff-form:has(input[name="kind"][value="holiday"]:checked) .only-leave { display: none; }
.dayoff-form:not(:has(input[name="kind"][value="holiday"]:checked)) .only-holiday { display: none; }
details.bulk { margin-top: 16px; }
details.bulk summary { cursor: pointer; font-weight: 600; }
details.bulk form { margin-top: 12px; }
details.bulk textarea { width: 100%; font-family: inherit; }
form[data-dirty] .unsaved { display: none; color: var(--warn); font-size: 12.5px; font-weight: 600; }
form[data-dirty].dirty .unsaved { display: inline; }
form[data-dirty] .changed { border-color: var(--warn); background: var(--warn-soft); }
.save-notes { list-style: none; margin: 0 0 12px; padding: 0; font-size: 12.5px; color: var(--muted); }
.save-notes li { padding: 6px 10px; margin-top: 6px; border-radius: 6px; background: var(--warn-soft); color: #7a4406; }
.save-notes li[hidden] { display: none; }
.board .card[draggable="true"] { cursor: grab; }
.board .card[draggable="true"]:active { cursor: grabbing; }
.board .card.dragging { opacity: .45; }
.board .card.saving { opacity: .6; }
.board.moving .column { outline: 2px dashed transparent; outline-offset: -2px; transition: background-color .12s ease-out, outline-color .12s ease-out; }
.board .column.drop-over { background: var(--accent-soft); outline-color: var(--accent); }
.pr-line { flex-wrap: nowrap; }
.pr-line code { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #f8f9fb; font-family: Consolas, ui-monospace, monospace; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-list { list-style: none; margin: 12px 0 0; padding: 0; }
.pr-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.pr-list li a { font-weight: 600; margin-right: 6px; }
.pill.pr-open { background: var(--violet-soft); color: var(--violet); }
.pill.pr-merged { background: var(--ok-soft); color: var(--ok); }
.pill.pr-closed { background: #f2f4f7; color: #667085; }
