:root {
  color-scheme: light;
  --canvas: #fff;
  --sidebar: #f6f7f5;
  --surface: #f8faf8;
  --ink: #1c2721;
  --muted: #5b665e;
  --soft: #647068;
  --line: #e2e7e1;
  --strong-line: #d6ded5;
  --accent: #246746;
  --accent-deep: #1e5139;
  --accent-soft: #e7f1e9;
  --dark: #202c24;
  --danger: #a2292c;
  --radius: 12px;
  --header: 68px;
  --icon-fill: white;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
.icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 4; top: 10px; left: 10px; background: white; padding: 9px; border-radius: 6px; transform: translateY(-150%); }
.skip:focus { transform: none; }
.topbar {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 25px 0 22px;
  border-bottom: 1px solid var(--line);
  background: #fcfdfc;
}
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; color: var(--ink); text-align: left; padding: 0; font-weight: 720; font-size: 16px; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.brand-mark { display: grid; justify-items: start; align-content: center; gap: 3px; width: 36px; height: 36px; padding-left: 9px; background: var(--dark); border-radius: 10px; }
.brand-mark span { height: 2px; background: #b8e7ba; border-radius: 2px; width: 18px; }
.brand-mark span:nth-child(2) { width: 13px; }
.brand-mark span:nth-child(3) { width: 7px; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; background: #f4f7f3; }
.login-wrap { width: min(100%, 434px); }
.login-brand { margin-bottom: 20px; justify-content: center; }
.login-card { padding: clamp(18px, 5vw, 29px); background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 38px #213b260c; }
.login-card h1 { margin-top: 12px; letter-spacing: -.035em; font-size: clamp(1.45rem, 5vw, 1.7rem); }
.login-card > p { margin-top: 7px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.login-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); }
.login-icon > .icon { width: 20px; height: 20px; }
#login-form { display: grid; gap: 12px; margin-top: 18px; }
#login-form .button { margin-top: 3px; min-height: 41px; }
.login-card .login-feedback { background: #edf4ed; color: var(--accent-deep); border-radius: 7px; margin-top: 12px; padding: 8px 10px; }
.login-card .login-feedback.is-error { background: #fdf0ef; color: var(--danger); }
.top-right, .header-actions, .button-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.local-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.local-status:hover { background: var(--sidebar); }
.local-status i { width: 7px; height: 7px; border-radius: 50%; background: #4b9165; }
.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 590;
  min-height: 36px;
  padding: 6px 12px;
  white-space: nowrap;
}
.button:hover:enabled, .icon-button:hover:enabled { background: #f2f5f1; border-color: #c4d0c4; }
.button .icon { width: 16px; height: 16px; }
.button-dark, .button-primary { border-color: transparent; color: #fff; background: var(--dark); }
.button-primary { background: var(--accent-deep); }
.button-dark:hover:enabled, .button-primary:hover:enabled { border-color: transparent; background: #315c45; }
.button-danger, .button-danger:hover:enabled { background: var(--danger); border-color: var(--danger); color: white; }
.button-compact { min-height: 29px; padding: 3px 8px; }
.icon-button { min-height: 30px; min-width: 30px; padding: 3px; }
.text-button, .row-link { border: 0; background: transparent; padding: 0; color: var(--accent-deep); display: inline-flex; gap: 5px; align-items: center; text-align: left; font-weight: 600; font-size: inherit; }
.text-button:hover, .row-link:hover { text-decoration: underline; }
.text-button.danger { color: var(--danger); }
.row-link { color: var(--ink); font-weight: 650; }
.workspace { display: grid; grid-template-columns: clamp(192px, 18vw, 232px) minmax(0, 1fr); height: calc(100dvh - var(--header)); overflow: hidden; }
.sidebar { background: var(--sidebar); display: flex; min-height: 0; flex-direction: column; border-right: 1px solid var(--line); --icon-fill: var(--sidebar); }
#nav { padding: 20px 14px; display: grid; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 11px;
  width: 100%;
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
}
.nav-item:hover { background: #edf1eb; color: var(--ink); }
.nav-item[aria-current] { color: #194930; background: #e5eee5; border-color: #dce8dc; font-weight: 690; }
.nav-item .icon { width: 17px; height: 17px; }
.search {
  display: flex; min-width: 0; min-height: 38px; align-items: center; gap: 8px;
  border: 1px solid var(--strong-line); border-radius: 8px; padding: 0 10px; color: var(--soft); background: white;
}
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search .icon { width: 16px; height: 16px; }
.search input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; font-size: 14px; color: var(--ink); outline: none; }
.task-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 245px) auto; align-items: end; gap: 9px; }
.task-toolbar > .button { min-height: 38px; }
.task-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 17px 0 9px; }
.task-caption h2 { font-size: 16px; font-weight: 690; }
.task-caption > span, .task-panel-heading small { color: var(--muted); font-size: 13px; }
.task-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: white; }
.task-entry + .task-entry { border-top: 1px solid var(--line); }
.task-row { display: flex; align-items: stretch; border-radius: 9px; }
.task-row:has(.task-summary[aria-expanded="true"]) { background: #f0f6ef; }
.task-summary {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  text-align: left; min-height: 62px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); scroll-margin-block: 16px;
}
.task-summary:hover { background: var(--surface); }
.task-summary:focus-visible { outline-offset: -3px; }
.task-summary > .icon { width: 17px; height: 17px; color: var(--accent-deep); transition: transform .18s ease; }
.task-summary[aria-expanded="true"] > .icon { transform: rotate(90deg); }
.task-copy { display: grid; gap: 4px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task-copy > strong { font-size: 15px; font-weight: 670; }
.task-copy small, .task-weight { color: var(--muted); font-size: 13px; line-height: 1.4; }
.task-weight { text-align: right; white-space: nowrap; }
.task-edit { align-self: center; min-height: 34px; margin-inline: 0 11px; padding-inline: 9px; }
.task-summary .compact-progress { width: clamp(96px, 17vw, 174px); flex: 0 0 auto; }
.task-panel { border-top: 1px solid var(--line); background: #f8faf7; }
.task-panel-opening { display: grid; grid-template-rows: 1fr; animation: task-dropdown .23s ease-out; }
.task-panel-opening > .task-panel-clip { min-height: 0; overflow: hidden; }
@keyframes task-dropdown { from { grid-template-rows: 0fr; opacity: .45; } to { grid-template-rows: 1fr; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .task-summary > .icon { transition: none; }
  .task-panel-opening { animation: none; }
}
.task-panel-body { padding: 13px 15px 15px 30px; }
.task-panel-compact { padding-inline: 4px; }
.task-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.task-panel-heading h3 { font-size: 15px; }
.task-panel-heading small { display: block; margin-top: 4px; }
.task-panel-heading .progress-track { height: 4px; margin-top: 5px; }
.nested-task-list { border-inline-start: 3px solid #c5d9c7; }
.segments { display: inline-flex; padding: 3px; gap: 2px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 8px; background: #eef1ec; }
.segments button { min-height: 32px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 14px; padding: 3px 11px; }
.segments button[aria-pressed="true"] { background: white; border-color: var(--line); color: var(--ink); font-weight: 660; }
.directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 184px), 1fr)); gap: 10px; }
.directory-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: var(--surface); color: var(--ink);
  text-align: left; min-width: 0; min-height: 100px; overflow-wrap: anywhere;
}
.directory-card:hover, .directory-card[aria-pressed="true"] { border-color: #a9c6ae; background: #edf5eb; }
.directory-card > strong { font-size: 16px; font-weight: 670; }
.directory-card > small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.directory-card .compact-progress { margin-top: 3px; width: min(100%, 202px); }
.module-panel { margin-top: 19px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; scroll-margin-block: 14px; outline: none; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 9px 13px; flex-wrap: wrap; margin-bottom: 13px; }
.panel-heading h2 { font-size: 22px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.panel-heading p { margin-top: 4px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.unit-branches { margin-top: 11px; border: 1px solid var(--line); border-radius: 9px; }
.unit-branches > summary { padding: 10px 12px; cursor: pointer; font-size: 14px; font-weight: 620; color: var(--accent-deep); }
.unit-branches .directory-grid { margin: 0 9px 9px; }
.inline-progress { margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.detail { overflow: auto; outline: none; }
.content { width: min(100%, 1240px); margin: 0 auto; padding: 30px clamp(24px, 3.8vw, 58px) 33px; }
.detail-head { margin-bottom: 24px; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.title-row > div:first-child { min-width: 0; }
.title-row h1 { font-size: clamp(1.65rem, 2.85vw, 2.22rem); line-height: 1.18; letter-spacing: -.044em; font-weight: 720; overflow-wrap: anywhere; }
.title-row p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.header-actions { flex: 0 1 auto; justify-content: flex-end; padding-top: 2px; }
.header-actions .button-group { justify-content: flex-end; }
.progress-card {
  padding: 16px 18px 14px; border: 1px solid #dce7dc; border-radius: var(--radius); background: #f5f9f5;
  color: var(--ink); margin-bottom: 3px;
}
.progress-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; font-size: 14px; font-weight: 630; }
.progress-visual { display: flex; align-items: center; gap: 15px; --progress-color: #398053; --progress-rail: #dce9dc; }
.progress-bottom { margin-top: 10px; }
.progress-body { flex: 1; min-width: 0; }
.progress-help { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.progress-track { display: block; height: 9px; overflow: hidden; border-radius: 30px; background: var(--progress-rail, #dce9dc); }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--progress-color, #398053); }
.progress-ring {
  --ring-size: 72px;
  --ring-width: 6px;
  --ring-text: 20px;
  display: grid; place-items: center; flex: 0 0 auto;
  width: var(--ring-size); height: var(--ring-size); border-radius: 50%; position: relative;
  color: var(--accent-deep);
  background: conic-gradient(var(--progress-color, #398053) var(--progress), var(--progress-rail, #dce9dc) 0);
}
.progress-ring::before { position: absolute; content: ''; inset: var(--ring-width); border-radius: 50%; background: white; }
.progress-ring > strong {
  position: relative; max-width: calc(100% - 2 * var(--ring-width) - 2px); overflow: hidden; text-overflow: ellipsis;
  font-size: clamp(8px, calc((var(--ring-size) - 2 * var(--ring-width) - 6px) / var(--label-chars) / .68), var(--ring-text));
  font-weight: 680; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap;
}
.compact-progress { width: 136px; max-width: 100%; gap: 8px; }
.compact-progress .progress-ring { --ring-size: 43px; --ring-width: 3px; --ring-text: 12px; }
.compact-progress .progress-track { height: 6px; }
.badge { display: inline-flex; gap: 4px; align-items: center; min-height: 24px; border-radius: 100px; padding: 2px 7px; font-size: 12px; font-weight: 640; white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.badge.neutral { background: #e8eee7; color: #505e52; }
.badge.warning { background: #f7ebcf; color: #744e18; }
.badge.success { background: #dbeedc; color: #215a39; }
.badge.active { background: #e0eee4; color: #295b3c; }
.section { padding-top: 20px; margin-top: 17px; border-top: 1px solid var(--line); }
.progress-card + .section, .overview-grid + .section, .detail-head + .section { border-top: 0; margin-top: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 11px; }
.section-heading h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.section-heading p, .prose { color: var(--muted); line-height: 1.52; white-space: pre-wrap; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 11px; margin: 0; }
.info-grid div { min-width: 0; }
.info-grid dt, .text-block > span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.info-grid dd { margin: 3px 0 0; font-size: 15px; font-weight: 580; overflow-wrap: anywhere; }
.info-grid + .info-grid, .text-block { margin-top: 13px; }
.text-block p { margin-top: 4px; line-height: 1.48; overflow-wrap: anywhere; white-space: pre-wrap; }
.empty { display: flex; align-items: center; gap: 9px; padding: 12px 13px; color: var(--muted); border: 1px dashed #dce4dc; border-radius: 8px; background: #fafbf9; font-size: 14px; min-height: 46px; }
.empty .icon { color: #657d6b; }
.item-list { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.item-row { display: flex; align-items: center; gap: 11px; padding: 10px 13px; min-height: 50px; background: white; }
.item-row + .item-row { border-top: 1px solid var(--line); }
.item-icon { color: var(--accent); display: grid; place-items: center; flex: 0 0 25px; min-height: 27px; }
.item-icon .icon { width: 17px; height: 17px; }
.item-main { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.item-sub { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.item-actions { display: flex; align-items: center; gap: 11px; color: var(--accent-deep); font-size: 14px; }
.item-actions strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-meta { color: var(--muted); font-size: 13px; }
.detail-footer { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; }
.overview-grid, .metric-grid { display: grid; gap: 10px; }
.overview-grid + .progress-card { margin-top: 16px; }
.overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.overview-card, .metric-card { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px; color: var(--ink); min-width: 0; }
.overview-card:hover { border-color: #b5cbb9; background: #f1f7f0; }
.overview-card .icon, .overview-card > span { color: var(--accent-deep); }
.overview-card > strong { display: block; font-size: 25px; margin: 8px 0 4px; letter-spacing: -.03em; }
.overview-card > span, .metric-card h3 { font-size: 15px; font-weight: 600; }
.metric-grid { grid-template-columns: 1fr 1fr; }
.metric-progress { margin: 11px 0 13px; gap: 10px; }
.metric-progress .progress-ring { --ring-size: 56px; --ring-width: 4px; --ring-text: 16px; }
.metric-progress .progress-track { height: 7px; }
.metric-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.period-field { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.period-field input, .field :is(input, textarea, select) {
  display: block;
  width: 100%; min-width: 0; min-height: 38px;
  border: 1px solid var(--strong-line); border-radius: 7px; padding: 7px 9px; background: white; color: var(--ink);
}
.period-field input { width: auto; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 620; cursor: pointer; line-height: 1.35; }
.check-row input, input[type="radio"] { accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; }

dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); border: 1px solid var(--strong-line); border-radius: 14px; padding: 0; box-shadow: 0 20px 70px #172b2237; color: var(--ink); background: white; }
dialog::backdrop { background: #1f2c244f; }
.dialog-heading, .dialog-footer { padding: 16px 19px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dialog-heading { border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 20px; letter-spacing: -.02em; }
.dialog-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.dialog-heading > div { min-width: 0; }
.dialog-close { flex: 0 0 auto; }
.dialog-body { padding: 17px 19px; }
.dialog-footer { border-top: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.dialog-spacer { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 590; }
.field-wide { grid-column: 1 / -1; }
.field textarea { resize: vertical; }
.field :is(input, textarea, select) { font-size: 16px; font-weight: 450; }
.field select { appearance: none; padding-right: 27px; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235b665e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") right 7px center / 16px 16px no-repeat; }
.form-help { margin: 0 0 11px; color: var(--muted); font-size: 14px; line-height: 1.48; }
.form-help:last-child { margin: 0; }
.form-error { line-height: 1.45; background: #fdf0ef; color: var(--danger); font-size: 14px; margin: 11px 0 0; border-radius: 7px; padding: 9px; overflow-wrap: anywhere; }
.weight-rows .field { display: grid; grid-template-columns: 1fr 105px; align-items: center; column-gap: 10px; margin-bottom: 8px; }
.weight-total { margin-top: 12px; font-weight: 650; color: var(--danger); }
.weight-total.valid { color: var(--accent); }
.weight-feedback { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.weight-feedback .weight-total { margin: 0; }
.task-progress-editor { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.task-progress-controls { display: grid; grid-template-columns: minmax(0, 1fr) 106px; gap: 11px; align-items: end; margin-top: 8px; }
.task-progress-controls input[type="range"] { accent-color: var(--accent); min-height: 38px; margin: 0; padding: 0; }
.task-progress-editor .form-help { display: block; margin-top: 7px; }
.task-edit-links { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.task-edit-links h3 { margin-bottom: 7px; font-size: 15px; }
.task-edit-links > p { color: var(--muted); font-size: 14px; line-height: 1.4; }
.task-link-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 9px; }
.task-link-note { margin-top: 7px; }
.task-delete-confirm { margin-top: 12px; padding: 10px; border: 1px solid #edd3d2; border-radius: 8px; background: #fdf3f2; }
.task-delete-confirm p { font-size: 14px; color: var(--danger); margin-bottom: 8px; }
.dialog-footer > [data-task-delete] { font-size: 14px; }
.upload-box { border: 1px dashed #cddccc; background: var(--surface); text-align: center; display: grid; justify-items: center; border-radius: 9px; padding: 19px; gap: 8px; }
.upload-box > .icon { color: var(--accent); width: 25px; height: 25px; }
.upload-box p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.mode-select { display: grid; gap: 8px; margin-bottom: 13px; }
.mode-select label { display: flex; align-items: flex-start; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 8px; font-size: 14px; cursor: pointer; }
.mode-select label:has(input:checked) { border-color: #b9cfbc; background: var(--surface); }
.mode-select small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.preview-table :is(th,td) { border-bottom: 1px solid var(--line); padding: 6px 4px; }
.preview-table td { text-align: center; }
.preview-table thead th:not(:first-child) { text-align: center; }
.toast { position: fixed; z-index: 3; bottom: 18px; right: 18px; max-width: min(430px, calc(100vw - 36px)); background: var(--dark); color: white; border-radius: 10px; padding: 11px 14px; box-shadow: 0 8px 24px #18332332; font-size: 14px; line-height: 1.45; }
.toast.error { background: #782b2b; }

@media (max-width: 850px) {
  .content { padding-inline: 26px; }
  .title-row { flex-wrap: wrap; }
  .header-actions { justify-content: flex-start; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-head { flex-wrap: wrap; }
}
@media (max-width: 680px) {
  :root { --header: 61px; }
  .topbar { padding-inline: 12px; gap: 8px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand small { font-size: 12px; }
  .brand-mark { width: 30px; height: 30px; padding-left: 6px; }
  .top-right { gap: 5px; flex-wrap: nowrap; }
  .top-right > .button { padding-inline: 7px; font-size: 13px; gap: 4px; }
  .top-right > .button .icon { display: none; }
  .top-right > .lock-control .icon { display: inline-block; }
  .lock-label { display: none; }
  .local-status { display: none; }
  .workspace { display: flex; flex-direction: column; }
  .sidebar { flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail { flex: 1; min-height: 0; }
  #nav { display: flex; padding: 7px 10px; overflow-x: auto; scrollbar-width: thin; }
  .nav-item { flex: 0 0 auto; width: auto; white-space: nowrap; gap: 6px; }
  .content { padding: 18px 14px 25px; }
  .detail-head { margin-bottom: 16px; }
  .section { padding-top: 15px; margin-top: 12px; }
  .section-heading { gap: 6px; flex-wrap: wrap; }
  .section-heading .button-group .button { padding-inline: 6px; }
  .item-row { padding-inline: 8px; gap: 6px; }
  .item-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .task-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .task-toolbar .search { grid-column: 1 / -1; }
  .task-summary { padding: 8px 6px; gap: 5px; }
  .task-summary > .icon { width: 14px; height: 14px; }
  .task-summary .compact-progress { width: 70px; gap: 4px; }
  .task-weight { white-space: normal; font-size: 11px; flex: 0 0 44px; }
  .task-copy small { font-size: 12px; }
  .task-edit { padding-inline: 6px; min-width: 32px; margin-inline-end: 5px; }
  .task-edit span { display: none; }
  .task-panel-body { padding-inline: 8px; }
  .task-panel-compact { padding-inline: 0; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .directory-card, .module-panel { padding: 10px; }
  .item-actions .compact-progress { width: 74px; }
  .compact-progress .progress-ring { --ring-size: 42px; }
  .metric-card { padding: 9px; }
}
@media (max-width: 350px) {
  .brand small { display: none; }
  .metric-grid, .form-grid { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .sidebar, .header-actions, .section-heading .button, .detail-footer, .toast { display: none !important; }
  .workspace, .detail { height: auto; overflow: visible; display: block; }
  .content { width: 100%; padding: 0; }
}
