:root {
  color-scheme: light;
  --page: #f1f5f3;
  --panel: #fff;
  --ink: #172e2e;
  --muted: #516766;
  --line: #dfe8e5;
  --rail: #112a2b;
  --primary: #08665b;
  --primary-dark: #07514a;
  --violet: #805fda;
  --green: #24735b;
  --amber: #8e5514;
  --danger: #aa312c;
  --radius: 17px;
  --body: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.55 var(--body); }
a { color: var(--primary-dark); text-decoration: none; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.14; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -.015em; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #8a6fed; outline-offset: 3px; }
::selection { background: #e0d4ff; color: #291b62; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0,1fr); }
.sidebar {
  position: sticky; top: 0; height: 100dvh; align-self: start; display: flex; flex-direction: column;
  gap: 42px; padding: 28px 19px 18px; color: #edeaf9; background: var(--rail);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 7px; color: #fff; font-weight: 750; line-height: 1.15; font-size: 1.12rem; }
.brand-mark { width: 42px; height: 42px; flex: none; display: block; }
.navigation { display: grid; gap: 6px; }
.navigation a { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 8px 11px; color: #c7c7d9; border-radius: 10px; font-size: .935rem; font-weight: 590; }
.navigation a:hover { background: #203d3d; color: #fff; }
.navigation a.active { background: #2a4e4b; color: #fff; }
.nav-icon { width: 26px; text-align: center; color: #a8d7cb; font-size: 1.16rem; line-height: 1; }
.sidebar-user { margin-top: auto; border-top: 1px solid #35364a; display: flex; align-items: center; gap: 9px; padding: 16px 2px 0; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-weight: 750; background: #3a3159; color: #decfff; }
.user-details { min-width: 0; flex: 1; }
.user-details strong, .user-details a { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.user-details strong { font-size: .87rem; }
.user-details a { color: #cebee9; font-size: .8rem; }
.exit-button { border: 0; background: none; color: #e5dbf6; border-radius: 8px; width: 31px; height: 36px; font-size: 1.05rem; }
.exit-button:hover { background: #343249; }

.content { padding: 0 clamp(18px,4vw,48px) 44px; width: 100%; max-width: 1600px; margin-inline: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 66px; border-bottom: 1px solid var(--line); margin-bottom: 27px; gap: 12px; }
.top-home { color: var(--muted); font-size: .88rem; font-weight: 620; }
.top-breadcrumb { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: .88rem; }
.top-breadcrumb strong { color: var(--ink); font-weight: 690; }
.top-date { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.date-dot { width: 7px; height: 7px; background: #8a70db; border-radius: 50%; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 23px; }
.page-head .muted { margin-top: 7px; }
.muted { color: var(--muted); }
.actions, .form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 15px;
  border-radius: 9px; border: 1px solid transparent; font-size: .9rem; line-height: 1.4; font-weight: 700; white-space: nowrap;
}
.primary { color: #fff; background: var(--primary); }
.primary:hover:not(:disabled) { background: var(--primary-dark); }
.secondary { color: var(--primary-dark); background: #fff; border-color: #dedbed; }
.secondary:hover { background: #f3effd; border-color: #c8bae9; }
.back-link, .text-link { font-size: .89rem; font-weight: 670; }
.back-link { display: inline-block; margin-bottom: 12px; }
.text-link:hover, .back-link:hover, .entry-link:hover, .project-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.description { margin-bottom: 18px; }
.notice { margin-bottom: 15px; padding: 11px 14px; border-radius: 9px; border: 1px solid #dcd3f5; background: #f1ebff; }
.notice.error { background: #fff0ee; border-color: #fad7d2; color: var(--danger); }
.notice.success { background: #edf9f3; border-color: #ceebdc; color: var(--green); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: 15px; margin-bottom: 19px; }
.metric {
  --accent: #8370c5;
  display: flex; flex-direction: column; min-width: 0; min-height: 127px; gap: 5px; padding: 15px 17px 14px;
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; background: var(--panel);
}
.metric.violet { --accent: #9671ea; }
.metric.blue { --accent: #6c92df; }
.metric.green { --accent: #51ad8f; }
.metric.amber { --accent: #e3b175; }
.metric > span { color: var(--muted); font-size: .86rem; font-weight: 630; line-height: 1.27; }
.metric strong { color: var(--ink); font-size: clamp(1.25rem,2.1vw,1.86rem); letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.metric small { color: var(--muted); font-size: .79rem; line-height: 1.32; margin-top: auto; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,1fr); gap: 17px; align-items: stretch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 17px 19px; }
.panel-head > div { min-width: 0; }
.panel-head h2 { overflow-wrap: anywhere; }
.panel-head p { color: var(--muted); font-size: .87rem; margin-top: 3px; }
.panel-note { padding: 12px 19px; font-size: .89rem; color: var(--muted); overflow-wrap: anywhere; }
.empty { padding: 27px 18px 31px; text-align: center; min-height: 135px; display: grid; justify-items: center; align-content: center; }
.empty-mark { width: 39px; height: 39px; background: #f0ebfb; color: #6547b3; display: grid; place-items: center; border-radius: 11px; margin-bottom: 8px; font-size: 1.15rem; }
.empty p { margin-top: 3px; color: var(--muted); font-size: .89rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
td, th { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
td:first-child, th:first-child { padding-left: 19px; }
td:last-child, th:last-child { padding-right: 19px; }
th { font-weight: 680; font-size: .83rem; color: var(--muted); background: #faf9fd; white-space: nowrap; }
td small { display: block; color: var(--muted); font-size: .795rem; line-height: 1.35; margin-top: 4px; }
tbody tr:hover td { background: #fbfaff; }
.entry-link { font-weight: 710; color: #2e2852; }
.sum-row td { background: #f6f3fb; font-weight: 690; }
.nowrap { white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; border-radius: 7px; padding: 4px 8px; background: #eef0f7; color: #4f5273; font-size: .79rem; line-height: 1.3; font-weight: 700; white-space: nowrap; }
.phase-plan { background: #efe7fc; color: #6344a0; }
.phase-work { background: #e8effe; color: #2e50a0; }
.phase-accept { background: #e4f4f0; color: #246453; }
.phase-closed { background: #e9f4e7; color: #3a6731; }
.phase-hold { background: #fff0da; color: #80521b; }
.danger-text { color: var(--danger); }
.positive-text { color: var(--green); }
.warning-text { color: var(--amber); }

.cash-legend { display: flex; flex-wrap: wrap; gap: 15px; padding: 0 19px; font-size: .82rem; color: var(--muted); }
.cash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cash-legend i { background: var(--violet); width: 10px; height: 10px; border-radius: 2px; }
.cash-legend span + span i { background: #75aecc; }
.bar-chart { display: flex; min-height: 159px; padding: 14px 19px 15px; gap: 11px; }
.bar-column { flex: 1; min-width: 0; display: grid; grid-template-rows: 105px auto; justify-items: center; color: var(--muted); font-size: .75rem; }
.bar-group { align-self: stretch; width: 100%; display: flex; gap: 4px; justify-content: center; align-items: end; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 25px, #f0eef8 26px 27px); }
.bar { width: min(32%,28px); height: var(--size); border-radius: 5px 5px 0 0; }
.bar.income { background: var(--violet); }
.bar.expense { background: #75aecc; }
.deadline-list { display: grid; }
.deadline { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 10px 17px; border-top: 1px solid var(--line); color: var(--ink); }
.deadline:hover { background: #faf8ff; }
.deadline-mark { color: #755ac4; background: #f0ebfa; border-radius: 7px; text-align: center; font-size: .73rem; width: 25px; height: 25px; line-height: 25px; }
.deadline-mark.late { color: var(--danger); background: #faebe9; }
.deadline strong, .deadline small { display: block; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.3; }
.deadline time, .deadline small { font-size: .78rem; }
.deadline small { color: var(--muted); margin-top: 3px; }

.editor { width: min(100%,850px); padding: clamp(17px,3vw,28px); }
.editor > p { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 19px; }
.full { grid-column: 1/-1; }
.fields { display: grid; gap: 15px; }
label { display: grid; gap: 5px; color: #353651; font-size: .88rem; font-weight: 650; min-width: 0; }
label small { font-weight: 480; color: var(--muted); font-size: .81rem; line-height: 1.3; }
.required { color: var(--primary); }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 43px; background: #fff; color: var(--ink);
  border: 1px solid #d8d9e6; border-radius: 8px; padding: 8px 10px; font-size: .94rem; font-weight: 480;
}
select:not([multiple]) {
  appearance: none; padding-right: 29px;
  background-image: linear-gradient(45deg,transparent 50%,#645a82 52%),linear-gradient(135deg,#645a82 50%,transparent 52%);
  background-position: calc(100% - 16px) 50%,calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
select[multiple] { padding: 4px; }
select[multiple] option { padding: 5px 7px; }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: baseline; gap: 7px; }
.checkbox input { width: 16px; min-height: 16px; flex: none; accent-color: var(--primary); }
.checkbox small { display: block; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 15px 19px; }
.filters > label:first-child { flex: 1 1 220px; }
.filters .text-link { align-self: end; padding-bottom: 9px; }
.filter-portfolio details { border: 1px solid #d8d9e6; border-radius: 8px; padding: 8px 10px; min-height: 43px; }
.filter-portfolio summary { cursor: pointer; font-size: .9rem; }
.filter-portfolio label { margin-top: 6px; }

.project-meta { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; padding: 15px 19px; }
.project-meta span { display: block; color: var(--muted); font-size: .8rem; }
.project-meta strong { display: block; font-size: .9rem; margin-top: 2px; overflow-wrap: anywhere; }
.project-meta p { border-top: 1px solid var(--line); padding-top: 12px; }
.tabs { display: flex; gap: 11px; overflow-x: auto; margin: 6px 0 16px; border-bottom: 1px solid #e0deeb; }
.tabs a { flex: none; padding: 9px 9px 10px; border-bottom: 3px solid transparent; font-size: .9rem; font-weight: 630; color: var(--muted); white-space: nowrap; }
.tabs a:hover, .tabs a[aria-current] { color: var(--primary-dark); }
.tabs a[aria-current] { border-color: var(--primary); }
.gantt th:nth-child(4) { min-width: 320px; width: 45%; }
.gantt-range { font-weight: 700; }
.gantt-axis { position: relative; height: 21px; margin-top: 3px; }
.gantt-axis span { position: absolute; top: 0; left: var(--at); font-size: .72rem; font-variant-numeric: tabular-nums; }
.wbs-row th { width: 32%; text-align: left; color: var(--ink); white-space: normal; min-width: 195px; }
.wbs-title { padding-inline-start: calc(var(--depth) * 13px); }
.wbs-title small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; font-size: .76rem; }
.wbs-code { color: #5c4b90; font-variant-numeric: tabular-nums; margin-inline-end: 6px; font-size: .77rem; }
.wbs-stage > * { background: #f0ecfa; }
.wbs-substage > * { background: #f7f4fc; }
.wbs-task th { background: #fff; }
.gantt-cell { padding-block: 8px; }
.gantt-track { height: 28px; border-radius: 4px; position: relative; background: repeating-linear-gradient(90deg,#f9f8fc 0,#f9f8fc calc(var(--tick) - 1px),#e8e4f1 calc(var(--tick) - 1px),#e8e4f1 var(--tick)); }
.gantt-bar { position: absolute; left: var(--left); width: var(--size); min-width: 1px; border-radius: 3px; }
.schedule-contract { top: 4px; height: 6px; background: #bab2d3; }
.schedule-forecast { top: 14px; height: 10px; background: #a496d0; }
.schedule-forecast::before { content: ""; display: block; height: 100%; width: var(--progress); border-radius: inherit; background: #6953ad; }
.schedule-forecast.critical { background: #db9a89; }
.schedule-forecast.critical::before { background: #9f4138; }
.schedule-forecast.milestone { height: 9px; border-radius: 1px; }
.wbs-stage .schedule-forecast, .wbs-substage .schedule-forecast { background: #755cb3; }
.gantt-actual { position: absolute; top: 14px; left: var(--left); width: 9px; height: 9px; margin-inline-start: -4px; rotate: 45deg; background: #207759; border: 1px solid #fff; }
.gantt-actual-late { background: var(--danger); }
.schedule-actions { padding: 15px 19px; }
.gantt td small.danger-text { color: var(--danger); }
.gantt-legend { display: flex; gap: 10px 17px; flex-wrap: wrap; padding: 12px 19px; color: var(--muted); font-size: .83rem; }
.gantt-legend span { display: flex; align-items: center; gap: 6px; }
.gantt-legend i { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }
.legend-contract { background: #bab2d3; }
.legend-forecast { background: #a496d0; }
.legend-critical { background: #db9a89; }
.gantt-legend .legend-actual { background: #207759; rotate: 45deg; }
.wbs-lock { padding: 12px 19px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.budget-vat td:first-child { padding-inline-start: 28px; color: var(--muted); }
.compact-list > p, .alert-group { padding: 9px 19px; border-top: 1px solid var(--line); font-size: .89rem; }
.compact-list strong { margin-inline-end: 8px; }
.alert-group ul { margin: 5px 0; padding-left: 19px; }
.alert-group li { margin-bottom: 4px; }
.version { border-top: 1px solid var(--line); }
.version summary { cursor: pointer; padding: 13px 19px; }
.version summary span { display: inline-block; margin-left: 10px; color: var(--muted); font-size: .84rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); gap: 15px; }
.portfolio-card { padding: 18px; display: grid; align-content: start; gap: 7px; margin-bottom: 0; }
.portfolio-card h2 a:hover { text-decoration: underline; }
.portfolio-card p { color: var(--muted); font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.section-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #6547b3; background: #f0ebfb; }
.option-links, .tag-list { display: flex; gap: 9px; flex-wrap: wrap; padding: 4px 19px 16px; }
.option-links a { display: inline-flex; align-items: center; border-radius: 8px; border: 1px solid #e0d9f2; padding: 7px 10px; font-size: .9rem; }
.option-links a:hover { background: #f4effe; }
.code-sample { margin: 0 0 18px; overflow-x: auto; padding: 13px; border-radius: 7px; background: #f5f2fb; font-size: .83rem; line-height: 1.65; }
.assistant-fields { padding: 0 19px 17px; }
.assistant-fields .button { justify-self: start; }
.answer { color: var(--ink); font-size: .96rem; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(390px,1.04fr); background: #fff; }
.auth-visual {
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  padding: clamp(25px,5vw,75px); color: #fff; background: radial-gradient(ellipse at 73% 58%,#382961,#191a32 62%,#17182b);
}
.auth-visual .brand { padding: 0; }
.auth-message { margin: 55px 0 max(11vh,65px); }
.auth-message h1 { font-size: clamp(2rem,5vw,4.25rem); font-weight: 760; }
.auth-art { display: flex; flex-direction: column; gap: 11px; width: min(100%,390px); margin-bottom: 37px; }
.auth-art i { height: 16px; width: 52%; background: #aa8cf5; border-radius: 4px; }
.auth-art i:nth-child(2) { width: 47%; margin-left: 25%; background: #8261cf; }
.auth-art i:nth-child(3) { width: 34%; margin-left: 62%; background: #c8b5f5; }
.auth-side { display: grid; place-items: center; padding: 30px clamp(22px,5vw,85px); }
.auth-form { width: min(100%,410px); }
.auth-form h2 { font-size: 1.85rem; margin-bottom: 6px; }
.auth-form > p { margin-bottom: 15px; }
.auth-form .fields { margin-top: 17px; }
.auth-form .button { margin-top: 4px; }

.portfolio-head { margin: 0 0 18px; }
.portfolio-head .page-head { margin-bottom: 16px; }
.portfolio-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.portfolio-filters label { min-width: 134px; }
.compact-filters { padding: 0 19px 12px; }
.portfolio-summary {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px;
  background: #d9e7e0; border: 1px solid #d9e7e0; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.portfolio-summary > * { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; padding: 11px 17px; background: #f9fcfa; color: var(--ink); }
.portfolio-summary > a:hover { background: #edf6f0; }
.portfolio-summary span { color: var(--muted); font-size: .84rem; font-weight: 640; }
.portfolio-summary strong { color: var(--ink); font-size: 1.55rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.portfolio-summary .attention { background: #fffaf1; }
.portfolio-summary .attention strong, .attention-text { color: #805119; }
.covered-text { color: var(--primary-dark); }
.portfolio-grid, .resource-grid { display: grid; grid-template-columns: minmax(0,1.38fr) minmax(295px,1fr); gap: 16px; align-items: start; }
.portfolio-grid { grid-template-columns: minmax(0,1.56fr) minmax(295px,1fr); }
.queue-tabs { padding: 0 12px; margin: 0; gap: 0 4px; flex-wrap: wrap; overflow: visible; }
.queue-tabs a { padding-inline: 6px; font-size: .83rem; }
.queue-tabs a span { margin-inline-start: 2px; color: var(--muted); font-size: .74rem; }
.queue-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 13px; border-top: 1px solid var(--line); padding: 14px 17px; scroll-margin-top: 12px; }
.queue-entry:first-of-type { border-top: 0; }
.queue-selected { background: #eaf4ee; }
.queue-entry h3 { margin: 3px 0; font-size: 1.03rem; overflow-wrap: anywhere; }
.queue-entry h3 a { color: var(--ink); }
.queue-entry h3 a:hover { color: var(--primary-dark); text-decoration: underline; }
.queue-entry p, .queue-deadline span, .queue-impact { color: var(--muted); font-size: .81rem; overflow-wrap: anywhere; }
.queue-deadline { display: grid; align-content: start; text-align: right; font-size: .88rem; white-space: nowrap; }
.queue-impact { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.decision-status { display: inline-flex; padding: 3px 7px; border-radius: 6px; background: #eff3f2; color: #425b58; font-weight: 670; font-size: .75rem; line-height: 1.3; }
.decision-review { background: #e0efe8; color: #125b4d; }
.decision-approved, .decision-status.implemented { background: #def3e7; color: #1e654d; }
.decision-returned { background: #fbefdc; color: #74511d; }
.decision-rejected { background: #fbe9e8; color: #96332c; }
.portfolio-milestone { padding: 8px 19px 6px; border-top: 1px solid var(--line); }
.portfolio-milestone > small { display: block; color: var(--muted); font-size: .81rem; margin-bottom: 2px; }
.mini-legend { display: flex; gap: 11px; margin: 0 19px 5px; color: var(--muted); font-size: .78rem; }
.mini-legend span { display: flex; align-items: center; gap: 4px; }
.mini-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.planned-dot { background: #fff; border: 2px solid #7c629d; }
.forecast-dot { background: #08786c; border: 1px solid #d9f4ec; }
.mini-axis { height: 20px; margin: 0 21px 0 19px; position: relative; color: var(--muted); font-size: .7rem; }
.mini-axis span { position: absolute; left: var(--at); transform: translateX(-50%); }
.mini-axis span:first-child { transform: none; }
.mini-axis span:last-child { transform: translateX(-100%); }
.mini-track { position: relative; height: 18px; margin: 0 3px 0 4px; }
.mini-track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; border-top: 1px solid #dae7e2; }
.mini-track i { position: absolute; width: 9px; height: 9px; border-radius: 50%; left: var(--at); top: 5px; translate: -50%; }
.mini-track i.planned-dot { z-index: 1; }
.mini-track i.forecast-dot { top: 8px; }
.drawer-shade { position: fixed; z-index: 10; inset: 0; background: rgb(15 32 32 / 20%); }
.decision-drawer {
  position: fixed; z-index: 11; inset: 0 0 0 auto; width: min(100%,500px);
  background: #fff; box-shadow: -12px 0 38px rgb(16 42 43 / 15%); overflow-y: auto;
  padding: 19px clamp(12px,3vw,25px) 100px; color: var(--ink);
}
.drawer-header { display: flex; justify-content: space-between; gap: 13px; align-items: flex-start; margin-bottom: 10px; }
.drawer-header h2 { margin-top: 6px; font-size: 1.4rem; overflow-wrap: anywhere; }
.drawer-close { padding-inline: 12px; font-size: 1.35rem; min-height: 36px; }
.drawer-deadline { color: var(--muted); margin-bottom: 7px; }
.drawer-footer { position: fixed; bottom: 0; right: 0; width: min(100%,500px); padding: 13px 22px; background: #fff; border-top: 1px solid var(--line); }
.decision-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 3px 19px 13px; }
.decision-drawer .decision-options { display: grid; padding: 13px 0; }
.decision-option {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; flex: 1 1 160px; min-width: 0;
  color: var(--ink); border: 1px solid #d8e5df; background: #f8fbf9; padding: 9px 12px; border-radius: 9px; overflow-wrap: anywhere;
}
.decision-option.selected, .decision-option:hover { background: #e5f3eb; border-color: #8fbcad; }
.decision-option small, .decision-option span { color: var(--muted); font-size: .79rem; }
.decision-context, .project-milestone { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 15px 18px; }
.decision-context h2 { margin: 6px 0; }
.project-milestone { background: #edf7f1; border-color: #cae4d7; }
.project-milestone span, .project-milestone strong { display: block; }
.project-milestone span { color: var(--muted); font-size: .78rem; }
.project-milestone > div:first-child { flex: 1 1 240px; }
.decision-matrix th { vertical-align: baseline; }
.decision-matrix th, .decision-matrix td { min-width: 116px; }
.decision-matrix th:first-child { min-width: 160px; white-space: normal; }
.decision-matrix th small { display: block; font-weight: 490; }
.decision-matrix .selected-column { background: #edf7f1; }
.implementation-list > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 18px; padding: 11px 19px; border-top: 1px solid var(--line); }
.implementation-list > div form { margin-inline-start: auto; }
.decision-history article { border-top: 1px solid var(--line); display: grid; gap: 2px; padding: 10px 19px; font-size: .86rem; }
.decision-footer {
  position: sticky; z-index: 2; bottom: 5px; display: flex; align-items: end; justify-content: space-between; gap: 10px;
  padding: 12px 14px; box-shadow: 0 -6px 21px rgb(15 42 37 / 9%);
}
.decision-footer label { flex: 1 1 220px; }
.capacity-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(98px,1fr)); gap: 1px; margin: 0 18px 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); }
.capacity-day { display: grid; gap: 2px; min-width: 0; padding: 8px; background: #fff; }
.capacity-day small { font-size: .74rem; color: var(--muted); }
.capacity-track { height: 5px; background: #e8f1ed; border-radius: 3px; overflow: hidden; }
.capacity-track i { display: block; width: var(--used); height: 100%; background: #167c6b; }
.booking-form { display: grid; gap: 11px; padding: 6px 19px 17px; }
.booking-rows { display: grid; gap: 7px; }
.booking-row { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) auto; gap: 7px; align-items: end; }
.legacy-links summary { cursor: pointer; padding: 13px 19px; font-weight: 700; }
.wbs-row:target > * { background: #e6f3ec; }

@media (max-width: 1170px) {
  .portfolio-grid, .resource-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 690px) {
  .portfolio-summary > * { padding: 8px; }
  .portfolio-summary span { font-size: .75rem; }
  .portfolio-summary strong { font-size: 1.18rem; }
  .queue-entry { padding-inline: 11px; }
  .decision-footer { bottom: 0; flex-wrap: wrap; }
  .capacity-grid { grid-template-columns: repeat(auto-fit,minmax(88px,1fr)); }
}

@media (max-width: 1090px) {
  .layout { grid-template-columns: 187px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .dashboard-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 810px) {
  .layout { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; gap: 13px; display: grid; grid-template-columns: 1fr auto; padding: 11px 17px 9px; }
  .brand { padding: 0; }
  .brand-mark { width: 34px; height: 34px; }
  .brand br { display: none; }
  .navigation { grid-row: 2; grid-column: 1/-1; display: flex; overflow-x: auto; gap: 5px; }
  .navigation a { flex: none; min-height: 36px; padding: 6px 9px; gap: 6px; font-size: .84rem; }
  .nav-icon { width: auto; font-size: .99rem; }
  .sidebar-user { border-top: none; margin: 0; padding: 0; }
  .user-details strong { max-width: 100px; }
  .topbar { min-height: 48px; margin-bottom: 18px; }
  .page-head { align-items: start; }
  .auth-layout { grid-template-columns: minmax(0,1fr); }
  .auth-visual { padding: 22px 25px; }
  .auth-message { margin: 30px 0 10px; }
  .auth-art { margin-bottom: 17px; max-width: 225px; gap: 5px; }
  .auth-art i { height: 8px; }
  .auth-message h1 { font-size: 2.2rem; }
  .auth-message h1 br { display: none; }
  .auth-side { place-items: start center; padding-block: 24px 40px; }
}
@media (max-width: 545px) {
  .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
  .page-head { flex-direction: column; gap: 11px; }
  .panel-head { padding: 14px 12px; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric { padding: 10px; min-height: 107px; }
  .metric strong { font-size: 1.24rem; }
  .user-details strong { display: none; }
}
