:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #eef3ed;
  --line: #cfd9cf;
  --text: #1d2a22;
  --muted: #627064;
  --green: #236b4c;
  --blue: #2563a8;
  --amber: #b7791f;
  --red: #b33a3a;
  --track: 34px;
  --day: 28px;
  --topbar-height: 77px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--green);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--topbar-height);
  padding: 10px 18px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  flex: 0 1 auto;
}

.brand > div {
  min-width: 0;
}

.brand-logo {
  width: 132px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand .eyebrow,
.brand h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow,
h1,
h2 {
  margin: 0;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  font-size: 21px;
  font-weight: 700;
}

h2 {
  font-size: 15px;
}

.actions,
.toolbar,
.panel-header,
.segmented {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .actions {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.topbar .actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  white-space: nowrap;
}

.shell {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  padding: 16px;
  max-width: 100vw;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

.panel,
.workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 14px;
  margin-bottom: 16px;
}

.inspector {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.sidebar {
  min-height: 0;
  overflow-y: auto;
}

.panel-header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.property-sort {
  margin: -4px 0 10px;
}

.property-sort button {
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.icon-button {
  width: 32px;
  padding: 0;
  font-size: 20px;
}

.visibility-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  vertical-align: middle;
}

.subproject-list {
  display: grid;
  gap: 8px;
}

.subproject {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.subproject-delete {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.subproject-delete:hover {
  border-color: var(--red);
  color: var(--red);
}

.subproject.active {
  background: #e5f0ea;
  border-color: var(--green);
}

.swatch {
  width: 12px;
  height: 36px;
  border-radius: 3px;
}

.subproject strong {
  display: block;
  font-size: 13px;
}

.subproject span {
  color: var(--muted);
  font-size: 12px;
}

.subproject-line {
  display: block;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--muted);
  font-size: 11px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}

.metrics div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.metrics dt {
  color: var(--muted);
  font-size: 11px;
}

.metrics dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.checklist li {
  padding-left: 18px;
  position: relative;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.checklist li.warning::before {
  background: var(--amber);
}

.workspace {
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gantt-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.toolbar {
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.segmented {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.segmented button {
  border: 0;
  background: transparent;
  min-height: 28px;
}

.segmented .active {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(29, 42, 34, 0.12);
}

.timeline-header {
  display: grid;
  grid-template-columns: var(--task-col-width, 280px) 1fr;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
}

.timeline-header .label {
  position: sticky;
  left: 0;
  z-index: 21;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.column-resizer {
  width: 8px;
  height: 22px;
  margin: -4px -8px -4px 8px;
  border-left: 2px solid var(--line);
  cursor: col-resize;
}

.days {
  display: grid;
  overflow: hidden;
  min-width: 0;
  width: max-content;
  will-change: transform;
}

.time-header {
  overflow: hidden;
  min-width: 0;
}

.day {
  height: 22px;
  padding-top: 4px;
  text-align: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
}

.day.top {
  height: 18px;
  padding-top: 3px;
  color: var(--text);
  font-weight: 700;
  background: var(--surface-2);
}

.gantt-body {
  display: grid;
  grid-template-columns: var(--task-col-width, 280px) 1fr;
  flex: 1;
  height: auto;
  min-height: 0;
  overflow: auto;
  max-width: 100%;
}

.task-table {
  position: sticky;
  left: 0;
  z-index: 20;
  border-right: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 4px 0 0 var(--surface);
}

.task-row {
  display: grid;
  grid-template-columns: 54px 1fr 44px;
  align-items: center;
  height: var(--track);
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.task-row.active {
  background: #e5f0ea;
}

.task-row.group-row {
  background: var(--surface-2);
  font-weight: 700;
}

.task-row .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
}

.owner-pill {
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.toggle {
  display: inline-block;
  width: 14px;
  color: var(--muted);
}

.task-row .meta,
.task-row .progress {
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  position: relative;
  min-width: 100%;
  overflow: hidden;
  background-image: linear-gradient(to right, rgba(207, 217, 207, 0.8) 1px, transparent 1px);
  background-size: var(--day) 100%;
}

.bars-layer {
  position: relative;
}

.bar-track {
  position: relative;
  height: var(--track);
  border-bottom: 1px solid var(--line);
}

.bar {
  position: absolute;
  top: 7px;
  height: 20px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--bar-color, var(--blue)) 22%, white);
  border: 1px solid color-mix(in srgb, var(--bar-color, var(--blue)) 70%, white);
  overflow: visible;
  cursor: grab;
}

.bar.critical {
  background: color-mix(in srgb, var(--red) 22%, white);
  border-color: color-mix(in srgb, var(--red) 70%, white);
}

.bar .fill {
  height: 100%;
  border-radius: 5px 0 0 5px;
  background: var(--bar-color, var(--blue));
  pointer-events: none;
}

.bar.critical .fill {
  background: var(--red);
}

.bar.summary {
  height: 12px;
  top: 11px;
  border-radius: 3px;
  cursor: default;
}

.bar .handle {
  position: absolute;
  top: 0;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  z-index: 3;
}

.bar .handle.left {
  left: 0;
}

.bar .handle.right {
  right: 0;
}

.link-point {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 1px rgba(29, 42, 34, 0.24);
  transform: translateY(-50%);
  cursor: alias;
}

.link-point.start {
  left: -6px;
}

.link-point.end {
  right: -6px;
}

.baseline {
  position: absolute;
  top: 29px;
  height: 3px;
  border-radius: 3px;
  background: var(--amber);
}

.dependency-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.dependency-layer path {
  fill: none;
  stroke: #50665a;
  stroke-width: 2;
  cursor: pointer;
  pointer-events: stroke;
}

.dependency-layer path.selected {
  stroke: var(--red);
  stroke-width: 3;
}

.dependency-layer .dependency-preview {
  stroke: var(--green);
  stroke-dasharray: 4 3;
  stroke-width: 2;
  pointer-events: none;
}

.task-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.task-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-form input,
.task-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: var(--surface);
}

.task-form input[readonly] {
  background: var(--surface-2);
}

.check-field {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--text);
  font-weight: 600;
}

.check-field input {
  min-height: auto;
  width: auto;
  min-width: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.task-form button,
#addTaskBtn {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.matrix-area {
  padding: 12px;
  overflow: auto;
}

.dashboard-area,
.finance-area {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.dashboard-head,
.dashboard-summary,
.dashboard-grid,
.kpi-strip,
.progress-comparison,
.quantity-plan-grid,
.bar-list,
.risk-list,
.rank-list {
  display: grid;
  gap: 10px;
}

.dashboard-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 12px;
}

.dashboard-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.metric-card,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.metric-card span,
.metric-card small,
.muted,
.dashboard-bar p {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  font-size: 24px;
}

.finance-metric {
  align-content: start;
}

.finance-kpi {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.finance-kpi-main {
  color: var(--text);
  font-size: 18px;
  line-height: 1.12;
  word-break: break-word;
}

.metric-card .finance-kpi-main {
  font-size: 22px;
}

.finance-kpi-main span {
  color: var(--text);
  font-size: 0.72em;
  font-weight: 800;
}

.metric-card .finance-kpi-mid,
.slide-card .finance-kpi-mid {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.metric-card .finance-kpi-total,
.slide-card .finance-kpi-total {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

.mini-meter,
.bar-meter,
.value-track,
.comparison-row div {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.mini-meter i,
.bar-meter i,
.value-track span,
.comparison-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar-meter em {
  position: absolute;
  inset: -1px 6px auto auto;
  color: var(--text);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-dashboard-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.project-dashboard-charts .span-2 {
  grid-column: auto;
}

.project-dashboard-charts > .dashboard-panel.span-2 {
  grid-column: 1 / -1;
}

.executive-slide {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(36, 83, 166, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(22, 129, 92, 0.1), transparent 38%),
    var(--surface);
}

.slide-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.slide-title span,
.slide-title strong,
.slide-card span,
.slide-card small {
  color: var(--muted);
  font-size: 12px;
}

.slide-title h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.slide-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.slide-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.slide-card.span-2 {
  grid-column: span 2;
}

.slide-card.span-3 {
  grid-column: span 3;
}

.slide-card strong {
  font-size: 23px;
}

.slide-hero {
  grid-row: span 2;
  align-content: center;
}

.donut-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.donut {
  --value: 0;
  --donut: var(--green);
  display: grid;
  place-items: center;
  width: min(126px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--donut) calc(var(--value) * 1%), var(--surface-2) 0);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: var(--surface);
}

.donut span,
.donut small {
  position: relative;
  z-index: 1;
}

.donut span {
  font-size: 21px;
  font-weight: 800;
}

.donut small {
  margin-top: 28px;
}

.hero-copy {
  display: grid;
  gap: 2px;
  text-align: center;
}

.hero-copy strong {
  font-size: 34px;
}

.paired-bars,
.capacity-stack {
  display: grid;
  gap: 9px;
}

.paired-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.paired-row div:first-child {
  display: grid;
  gap: 2px;
}

.paired-row strong {
  font-size: 13px;
}

.paired-row span {
  color: var(--muted);
  font-size: 12px;
}

.paired-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.paired-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.paired-track .planned {
  background: rgba(36, 83, 166, 0.28);
}

.paired-track .actual {
  height: 6px;
  margin: 3px 0;
  background: var(--green);
}

.capacity-stack span {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.capacity-stack strong {
  color: var(--text);
  font-size: 17px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-panel {
  padding: 12px;
  min-width: 0;
}

.dashboard-panel.span-2 {
  grid-column: span 2;
}

.dashboard-panel.span-3 {
  grid-column: span 3;
}

.panel-header.compact {
  margin-bottom: 10px;
}

.progress-comparison {
  margin-bottom: 12px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.comparison-row.actual i,
.value-track.actual span {
  background: var(--blue);
}

.kpi-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-strip span {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.kpi-strip strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.dashboard-bar {
  display: grid;
  gap: 5px;
}

.dashboard-bar div:first-child,
.value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-bar p {
  margin: 0;
}

.value-row {
  grid-template-columns: 28px minmax(0, 1fr) 118px;
  margin: 10px 0;
  font-size: 12px;
}

.quantity-plan-row {
  display: grid;
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.quantity-plan-row:last-child {
  border-bottom: 0;
}

.quantity-plan-row div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
}

.quantity-plan-row strong {
  font-size: 13px;
}

.quantity-plan-row span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.risk-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: var(--surface-2);
}

.risk-list li.warn {
  border-left-color: var(--amber);
}

.risk-list li.danger {
  border-left-color: var(--red);
}

.risk-list span {
  color: var(--muted);
  font-size: 12px;
}

.rank-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
}

.rank-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashflow-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 8px;
  height: 190px;
  align-items: end;
}

.cash-month {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.cash-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 150px;
  padding: 8px 4px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.cash-bars span {
  display: block;
  position: relative;
  width: 10px;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
}

.cash-bars em,
.monthly-pair-bars em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  color: var(--text);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-58deg);
  transform-origin: left center;
  pointer-events: none;
}

.cash-bars .revenue {
  background: var(--green);
}

.cash-bars .cost {
  background: var(--red);
}

.cash-month strong {
  color: var(--muted);
  font-size: 12px;
}

.monthly-projection {
  display: grid;
  gap: 8px;
}

.activity-projection-item {
  min-width: 0;
}

.monthly-pair-chart {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  min-height: 204px;
  align-items: end;
}

.monthly-projection.compact .monthly-pair-chart {
  min-height: 142px;
  gap: 5px;
}

.monthly-pair {
  display: grid;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.monthly-pair-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 163px;
  padding: 8px 4px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.monthly-projection.compact .monthly-pair-bars {
  height: 103px;
  padding-inline: 3px;
}

.monthly-pair-bars span {
  display: block;
  position: relative;
  width: 10px;
  min-height: 0;
  border-radius: 4px 4px 0 0;
}

.monthly-projection.compact .monthly-pair-bars span {
  width: 8px;
}

.monthly-pair-bars .planned,
.chart-legend .planned {
  background: var(--blue);
}

.monthly-pair-bars .executed,
.chart-legend .executed {
  background: var(--green);
}

.monthly-pair strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.milestone-donuts-section {
  margin-bottom: 12px;
}

.milestone-donut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.milestone-donut-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: center;
}

.milestone-donut-card strong {
  min-height: 34px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.milestone-donut-card > span {
  color: var(--muted);
  font-size: 12px;
}

.milestone-donut {
  width: min(92px, 100%);
  height: 92px;
}

.blocked-donut {
  background: conic-gradient(var(--red) calc(var(--blocked) * 1%), var(--green) 0);
}

.milestone-donut::after {
  inset: 14px;
}

.milestone-donut small {
  margin-top: 25px;
  font-size: 11px;
}

.activity-projection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.finance-table-wrap {
  max-height: 300px;
  overflow: auto;
}

.finance-table {
  min-width: 980px;
}

.project-config-table {
  min-width: 1320px;
}

.finance-table .positive {
  color: var(--green);
  font-weight: 700;
}

.finance-table .negative {
  color: var(--red);
  font-weight: 700;
}

.finance-assumptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.finance-assumptions div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.finance-assumptions dt {
  color: var(--muted);
  font-size: 12px;
}

.finance-assumptions dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.finance-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cost-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cost-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cost-form input,
.input-cost-row input,
.inputs-table input,
.resource-table input,
.project-config-table input,
.project-config-table textarea {
  min-height: 34px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface);
  color: var(--text);
}

.project-config-table textarea {
  min-width: 220px;
  resize: vertical;
}

.project-config-table input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--blue);
}

.project-lock-toggle {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.input-cost-list {
  display: grid;
  gap: 8px;
}

.input-cost-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 86px 100px 110px 110px 34px;
  gap: 8px;
  align-items: center;
}

.input-cost-row button {
  width: 34px;
  padding: 0;
}

.cost-help {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cost-help span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.inputs-table,
.resource-table,
.project-config-table {
  min-width: 1180px;
}

.inputs-table td,
.resource-table td,
.project-config-table td {
  vertical-align: middle;
}

.inputs-table button {
  width: 34px;
  padding: 0;
}

.resource-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.resource-rate-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.resource-rate-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resource-rate-row input {
  min-height: 34px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface);
  color: var(--text);
}

.measurement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.measurement-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.measurement-service {
  display: grid;
  gap: 6px;
}

.measurement-service > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.measurement-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.measurement-checks label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 6px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
}

.measurement-main {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.measurement-checks input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.measurement-month {
  min-height: 28px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
}

.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .dashboard-summary,
  .dashboard-grid,
  .finance-grid,
  .project-dashboard-charts,
  .slide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panel.span-2,
  .dashboard-panel.span-3,
  .slide-card.span-2,
  .slide-card.span-3 {
    grid-column: span 2;
  }

  .slide-hero {
    grid-row: auto;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-help,
  .finance-bars,
  .resource-rate-grid,
  .activity-projection-grid,
  .milestone-donut-grid,
  .measurement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .slide-grid,
  .dashboard-summary,
  .dashboard-grid,
  .finance-grid,
  .project-dashboard-charts,
  .activity-projection-grid {
    grid-template-columns: 1fr;
  }

  .slide-card.span-2,
  .slide-card.span-3,
  .dashboard-panel.span-2,
  .dashboard-panel.span-3,
  .project-dashboard-charts .span-2 {
    grid-column: auto;
  }

  .milestone-donut-grid {
    grid-template-columns: 1fr;
  }

  .paired-row {
    grid-template-columns: 1fr;
  }
}

.project-dashboard-charts,
.activity-projection-grid {
  grid-template-columns: 1fr;
}

.project-dashboard-charts > .dashboard-panel.span-2 {
  grid-column: 1 / -1;
}
