:root {
  color-scheme: light;
  --ink: #182938;
  --second: #4a5d6f;
  --muted: #617384;
  --line: #dbe2e8;
  --surface: #fff;
  --page: #f3f5f7;
  --nav: #142331;
  --accent: #235887;
  --accent-muted: #edf4fb;
  --green: #22674f;
  --danger: #a43b33;
  --radius: 8px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #4781bd; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 10px; left: 12px; z-index: 10; padding: .65rem .9rem; transform: translateY(-160%); background: white; border-radius: 6px; }
.skip-link:focus { transform: none; }
.loading { display: grid; min-height: 90vh; place-items: center; color: var(--muted); }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 25px 16px 16px; background: var(--nav); color: #e7eef5; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 24px; border-bottom: 1px solid #ffffff26; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand small { font-size: .75rem; color: #a9bdce; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; background: #30495f; color: #f1f6fb; border-radius: 7px; font-weight: 750; letter-spacing: -.01em; font-size: .83rem; }
.workspace-name { margin: 19px 6px 9px; color: #a9bdce; font-weight: 650; font-size: .75rem; letter-spacing: .065em; text-transform: uppercase; }
.rail nav { display: grid; gap: 4px; }
.nav-item { color: #dce7f2; text-align: left; background: transparent; border: 0; border-radius: 5px; padding: 9px 10px; font-size: .9rem; font-weight: 550; }
.nav-item:hover, .nav-item[aria-current="page"] { background: #2b4256; color: white; }
.rail-bottom { margin-top: auto; display: grid; gap: 8px; }
.rail-bottom a, .rail-bottom button { color: #cedbea; text-align: left; padding: 8px 6px; text-decoration: none; background: transparent; border: 0; border-radius: 5px; font-size: .86rem; }
.rail-bottom a:hover, .rail-bottom button:hover { background: #2b4256; color: white; }
.page { min-width: 0; max-width: 1750px; width: 100%; margin: 0 auto; }
.topbar { background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 62px; border-bottom: 1px solid var(--line); padding: 10px 28px; font-size: .88rem; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); }
.crumb strong { color: var(--ink); overflow-wrap: anywhere; }
.demo-notice { color: var(--muted); font-size: .78rem; }
.content { padding: 26px 28px; }
.page-title { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 18px; }
.page-title h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); letter-spacing: -.04em; font-weight: 680; line-height: 1.18; margin-bottom: 5px; }
.page-title p { color: var(--muted); max-width: 72ch; font-size: .9rem; }
.actionbar { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; gap: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid #ccd8e2; border-radius: 6px; background: var(--surface); color: var(--ink); min-height: 37px; padding: 7px 12px; white-space: nowrap; text-decoration: none; font-size: .87rem; font-weight: 600; }
.button:hover { background: #f3f7fa; border-color: #9db3c5; }
.button.primary { background: #235887; border-color: #235887; color: #fff; }
.button.primary:hover { background: #204a6f; border-color: #204a6f; }
.button.danger { color: var(--danger); }
.summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stat { padding: 12px 15px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat span { color: var(--second); font-size: .82rem; }
.stat strong { display: block; margin-top: 1px; font-size: 1.4rem; line-height: 1.3; letter-spacing: -.025em; font-weight: 650; font-variant-numeric: tabular-nums; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; align-items: start; gap: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 15px; }
.panel-head h2 { font-size: 1rem; letter-spacing: -.015em; font-weight: 650; }
.segments { display: inline-flex; padding: 2px; gap: 2px; background: #eaf0f5; border-radius: 6px; white-space: nowrap; }
.segments button { background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 5px 9px; line-height: 1.2; font-size: .83rem; color: var(--second); }
.segments button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #dbe2e8; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 15px; }
.control { display: block; width: 100%; min-width: 0; min-height: 37px; padding: 6px 10px; border: 1px solid #ccd8e2; border-radius: 6px; color: var(--ink); background: #fff; font-size: .88rem; }
.control::placeholder { color: var(--muted); }
select.control { appearance: none; padding-right: 31px; background-image: linear-gradient(45deg,transparent 50%,#52687b 50%), linear-gradient(135deg,#52687b 50%,transparent 50%); background-size: 4px 4px; background-position: calc(100% - 14px) 16px, calc(100% - 10px) 16px; background-repeat: no-repeat; }
.filters .control { width: auto; max-width: 100%; }
.filters input { flex: 1; min-width: 180px; }
.count-meta { font-size: .78rem; color: var(--muted); margin-left: auto; }
.overflow { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 630; font-size: .79rem; color: var(--second); background: #f7f9fb; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e8edf1; }
td:first-child, th:first-child { padding-left: 15px; }
td:last-child, th:last-child { padding-right: 15px; }
tbody tr:last-child td { border-bottom: 0; }
.selected { background: #eff5fb; }
tbody tr:hover { background: #f6f9fc; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-name { display: block; background: transparent; border: 0; padding: 0; text-align: left; color: #244d74; font-size: .89rem; font-weight: 650; line-height: 1.33; }
.row-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 3px; }
.status { font-size: .79rem; font-weight: 620; white-space: nowrap; color: #3e5b72; }
.status.closed { color: var(--green); }
.detail { overflow: hidden; }
.detail .panel-head { border-bottom: 1px solid var(--line); }
.detail-body { padding: 15px; }
.detail-body h3 { font-size: 1rem; line-height: 1.35; }
.record-id { display: block; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.detail-fields { margin: 14px 0; display: grid; }
.detail-fields div { display: grid; gap: 2px; border-top: 1px solid #e6edf2; padding: 8px 0; }
.detail-fields dt { color: var(--muted); font-size: .77rem; }
.detail-fields dd { margin: 0; font-size: .88rem; font-weight: 550; overflow-wrap: anywhere; }
.detail-foot { margin-top: 9px; }
.detail-foot .button { width: 100%; }
.fine { margin: 12px 0 0; color: var(--muted); font-size: .8rem; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px,1fr); align-items: start; gap: 9px; padding: 12px; overflow-x: auto; }
.lane { background: #f3f6f9; border: 1px solid #dfe7ee; border-radius: 6px; padding: 8px; min-height: 105px; }
.lane h3 { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: .82rem; font-weight: 650; margin-bottom: 7px; }
.lane h3 span { color: var(--muted); font-weight: 500; }
.card { background: #fff; border: 1px solid #dce5ed; border-radius: 5px; padding: 8px; margin: 7px 0 0; }
.card .control { margin-top: 8px; font-size: .77rem; min-height: 32px; }
.empty { padding: 18px 14px; font-size: .9rem; color: var(--muted); }
.task-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.task-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 11px 15px; border-bottom: 1px solid #e8edf1; }
.task-row:last-child { border-bottom: 0; }
.task-row input { width: 15px; height: 15px; accent-color: var(--accent); }
.task-row label { flex: 1; min-width: 100px; font-size: .88rem; cursor: pointer; }
.task-row .done { text-decoration: line-through; color: var(--muted); }
.task-row time { color: var(--muted); font-size: .8rem; }
.meta.late, .task-row time.late { color: var(--danger); }
.task-row .row-name { font-size: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
dialog { width: min(95vw, 620px); max-height: 90dvh; padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; }
dialog::backdrop { background: #14233176; }
.editor-head, .editor-foot { display: flex; align-items: center; gap: 9px; padding: 14px 18px; }
.editor-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.editor-head h2 { font-size: 1.15rem; font-weight: 650; }
.editor-body { padding: 16px 18px; }
.editor-foot { justify-content: end; border-top: 1px solid var(--line); }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field { display: grid; align-content: start; gap: 4px; font-size: .85rem; font-weight: 560; }
.field.wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select { font-weight: 400; }
.field textarea { min-height: 66px; resize: vertical; }
.notice { position: fixed; right: 18px; bottom: 18px; max-width: min(450px,calc(100vw - 36px)); z-index: 4; padding: 10px 14px; border-radius: 6px; color: #fff; background: #23394d; font-size: .88rem; }
.notice.error { background: #8f3731; }
.invalid-link { max-width: 560px; margin: 12vh auto; padding: 24px; }
.invalid-link h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.invalid-link p { color: var(--second); margin-bottom: 1rem; }
@media (min-width: 1500px) { .layout { grid-template-columns: minmax(0,1fr) 305px; } th, td { padding: 12px; } }
@media (max-width: 1180px) { .shell { grid-template-columns: 190px minmax(0,1fr); } .layout { grid-template-columns: minmax(0,1fr) 235px; } .topbar, .content { padding-left: 18px; padding-right: 18px; } }
@media (max-width: 950px) { .layout { grid-template-columns: minmax(0,1fr); } .detail-fields { grid-template-columns: 1fr 1fr; gap: 0 15px; } }
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .rail { position: static; height: auto; padding: 11px 12px 10px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
  .brand { padding: 0; border: 0; }
  .workspace-name { display: none; }
  .rail nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
  .rail-bottom { grid-column: 2; grid-row: 1; display: flex; margin-top: 0; }
  .rail-bottom a, .rail-bottom button { margin: 0; padding: 5px; }
  .topbar { min-height: 46px; }
  .content { padding-top: 17px; }
}
@media (max-width: 470px) {
  .page-title { flex-direction: column; }
  .topbar { align-items: start; flex-wrap: wrap; gap: 3px; }
  .stat { padding: 8px; }
  .stat span { font-size: .76rem; }
  .stat strong { font-size: 1.15rem; }
  .field-grid, .detail-fields { grid-template-columns: 1fr; }
  .rail-bottom { gap: 3px; }
  .rail-bottom a, .rail-bottom button { font-size: .78rem; }
}
