:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #f0f4f7;
  --ink: #17212b;
  --muted: #637083;
  --line: #dbe2e9;
  --blue: #1f6feb;
  --blue-deep: #0f3d77;
  --red: #d92d20;
  --red-soft: #fff1f0;
  --yellow: #b7791f;
  --yellow-soft: #fff8db;
  --green: #22863a;
  --green-soft: #eaf8ee;
  --grey: #68717d;
  --grey-soft: #eef1f4;
  --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  border: 0;
}

.app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
  background: #111827;
  padding: 22px 16px;
  color: #f8fafc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #34d399, #38bdf8 58%, #fbbf24);
  color: #0f172a;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand p {
  margin: 3px 0 0;
  color: #aeb9c8;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.nav button:hover,
.nav button.active {
  background: #243041;
  color: #ffffff;
}

.nav-count {
  min-width: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 7px;
  color: #e2e8f0;
  font-size: 12px;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 6px 0;
  color: #aeb9c8;
  font-size: 12px;
  line-height: 1.5;
}

.main {
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.notification-shell {
  position: relative;
}

.notification-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0 13px;
}

.notification-button strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.notification-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
}

.notification-dropdown-head,
.panel-header.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.notification-item.unread {
  background: #eff6ff;
}

.notification-item span,
.notification-item small {
  color: var(--muted);
}

.notification-table td {
  vertical-align: top;
}

.unread-row {
  background: #f8fbff;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acknowledgement-panel {
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 0 13px;
  white-space: nowrap;
}

.btn.primary {
  background: var(--blue);
  color: white;
}

.btn.danger {
  background: var(--red-soft);
  color: var(--red);
}

.btn.small {
  min-height: 32px;
  padding: 0 9px;
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 14px;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: 14px;
  margin-bottom: 18px;
}

.stat {
  min-height: 106px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.stat.red {
  border-left: 5px solid var(--red);
}

.stat.yellow {
  border-left: 5px solid #d6a900;
}

.stat.green {
  border-left: 5px solid var(--green);
}

.stat.blue {
  border-left: 5px solid var(--blue);
}

.stat.grey {
  border-left: 5px solid var(--grey);
}

.stat-card {
  min-height: 108px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--grey);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.stat-card strong {
  display: block;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.stat-card.red {
  border-left-color: var(--red);
}

.stat-card.yellow {
  border-left-color: #d6a900;
}

.stat-card.green {
  border-left-color: var(--green);
}

.stat-card.blue {
  border-left-color: var(--blue);
}

.stat-card.grey {
  border-left-color: var(--grey);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

.project-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.project-dashboard-card {
  padding: 18px;
}

.overall-dashboard {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.overall-header,
.overall-actions,
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overall-header {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.overall-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.overall-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.overall-actions {
  justify-content: flex-end;
}

.dashboard-filters,
.dashboard-project-filter {
  align-items: end;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.dashboard-filters label,
.dashboard-project-filter label {
  display: grid;
  min-width: 180px;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.overall-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.overall-stat {
  border: 1px solid var(--line);
  border-left: 5px solid var(--grey);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
}

.overall-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.overall-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
}

.overall-stat.blue {
  border-left-color: var(--blue);
}

.overall-stat.green {
  border-left-color: var(--green);
}

.overall-stat.yellow {
  border-left-color: #d6a900;
}

.overall-stat.red {
  border-left-color: var(--red);
}

.overall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.overall-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.overall-card.wide {
  grid-column: 1 / -1;
}

.overall-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.progress-comparison-row {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.progress-project-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.green-text {
  color: var(--green);
}

.red-text {
  color: var(--red);
}

.progress-line {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 52px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-line-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--grey-soft);
}

.progress-line-track div {
  height: 100%;
}

.progress-line-track .blue,
.grouped-bar.blue {
  background: var(--blue);
}

.progress-line-track .yellow,
.grouped-bar.yellow {
  background: #d6a900;
}

.progress-line-track .green,
.grouped-bar.green {
  background: var(--green);
}

.progress-line-track .grey {
  background: var(--grey);
}

.grouped-chart {
  display: flex;
  min-height: 240px;
  align-items: end;
  gap: 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 12px 4px;
}

.grouped-project {
  display: grid;
  min-width: 150px;
  gap: 8px;
  justify-items: center;
}

.grouped-bars {
  display: flex;
  height: 170px;
  align-items: end;
  gap: 6px;
}

.grouped-bar {
  position: relative;
  width: 32px;
  border-radius: 6px 6px 0 0;
}

.grouped-bar span {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.grouped-project strong {
  max-width: 150px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.s-curve-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  padding: 10px;
}

.s-curve-wrap svg {
  display: block;
  min-width: 620px;
  width: 100%;
}

.s-grid {
  stroke: #e5eaf0;
  stroke-width: 1;
}

.s-axis {
  stroke: #8b98a8;
  stroke-width: 1.4;
}

.s-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.s-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.s-dot {
  stroke: #fff;
  stroke-width: 2;
}

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

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

.chart-legend span::before,
.status-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  content: "";
}

.blue-dot::before {
  background: var(--blue);
}

.yellow-dot::before {
  background: #d6a900;
}

.green-dot::before {
  background: var(--green);
}

.status-pie {
  display: grid;
  width: min(136px, 56vw);
  height: min(136px, 56vw);
  place-items: center;
  border-radius: 50%;
  justify-self: center;
  margin: 2px auto 4px;
  position: relative;
}

.status-pie::after {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--panel);
  content: "";
}

.status-pie span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.activity-notification-card {
  grid-column: span 2;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title-row h3 {
  margin: 0;
}

.card-title-row span {
  border-radius: 999px;
  background: var(--grey-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.activity-table-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.activity-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.activity-table th,
.activity-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.activity-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f3f6f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-table td {
  color: var(--ink);
  font-size: 13px;
}

.activity-table td strong,
.activity-table td span {
  display: block;
}

.activity-table td span {
  margin-top: 3px;
  color: var(--muted);
}

.activity-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
}

.activity-status.green {
  background: #dcfce7;
  color: #15803d;
}

.activity-status.red {
  background: #fee2e2;
  color: #dc2626;
}

.activity-status.yellow {
  background: #fef3c7;
  color: #b7791f;
}

.activity-status.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.activity-status.grey {
  background: #eef2f7;
  color: var(--muted);
}

.activity-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.status-summary-bars,
.urgent-summary-list {
  display: grid;
  gap: 9px;
}

.status-summary-row {
  display: grid;
  grid-template-columns: 150px minmax(100px, 1fr) 32px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-summary-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--grey-soft);
}

.status-summary-row i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.urgent-summary-row {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.urgent-summary-row strong {
  color: var(--ink);
}

.urgent-summary-row span {
  color: var(--muted);
  font-size: 13px;
}

.photo-upload {
  display: grid;
  gap: 10px;
}

.photo-preview-grid,
.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.photo-preview,
.report-photo {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.photo-preview img,
.report-photo img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
}

.photo-preview button {
  border: 0;
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
  cursor: pointer;
  font-weight: 800;
  padding: 7px;
}

.attachment-upload {
  display: grid;
  gap: 10px;
}

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

.attachment-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.attachment-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.attachment-chip small {
  color: var(--muted);
  font-weight: 700;
}

.attachment-chip button {
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
  cursor: pointer;
  font-weight: 800;
  padding: 6px 8px;
}

.submission-revision-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.submission-revision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.submission-revision-header h4 {
  margin: 0 0 4px;
}

.submission-revision-header > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.submission-revision-panel table input,
.submission-revision-panel table select {
  min-height: 36px;
  padding: 6px 8px;
}

.submission-task-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(160px, 220px);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

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

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.detail-item.full {
  grid-column: 1 / -1;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sheet-dashboard {
  display: grid;
  gap: 14px;
  border: 1px solid #b9c4d0;
  background: #fff;
  min-width: 0;
  overflow-x: auto;
  padding: 0 14px 14px;
  box-shadow: var(--shadow);
}

.sheet-title {
  margin: 0 -14px;
  background: #1455c9;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 900;
  padding: 7px 10px;
}

.sheet-top {
  display: grid;
  grid-template-columns: 200px 130px minmax(220px, 1fr) minmax(260px, 0.85fr);
  gap: 16px;
  align-items: end;
  min-width: 900px;
}

.sheet-metric,
.sheet-select-box {
  display: grid;
  gap: 2px;
  text-align: center;
}

.sheet-metric span,
.sheet-select-box label {
  color: #111827;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 900;
}

.sheet-metric strong,
.sheet-select-box select {
  min-width: 0;
  min-height: 20px;
  border: 1px solid #9aa6b2;
  background: #f3f0ed;
  color: #111827;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 900;
  padding: 2px 8px;
}

.sheet-metric.blue strong {
  background: #d8e7f4;
}

.sheet-metric.green strong {
  background: #dcebd4;
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(290px, 1fr) minmax(290px, 1fr) minmax(260px, 0.82fr);
  gap: 16px;
  align-items: start;
  min-width: 900px;
}

.sheet-card,
.sheet-table-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 10px;
}

.sheet-card h3,
.sheet-table-card h3 {
  margin: 0 0 8px;
  color: #555;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.sheet-bars {
  display: grid;
  min-height: 170px;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid #d4d4d4;
  padding: 18px 8px 0;
}

.sheet-bar-item {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  color: #555;
  font-size: 11px;
  text-align: center;
}

.sheet-bar-item span {
  min-height: 28px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sheet-bar {
  width: 38px;
  background: #3b82f6;
}

.sheet-bar.green,
.priority-track .green {
  background: #34a853;
}

.sheet-bar.yellow,
.priority-track .yellow {
  background: #fbbc04;
}

.sheet-bar.grey,
.priority-track .grey {
  background: #9ca3af;
}

.sheet-bar.red,
.priority-track .red {
  background: #ea4335;
}

.project-info-card {
  display: grid;
  gap: 8px;
}

.selected-project-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #c2c2c2;
  background: #f3f0ed;
  font-size: 12px;
  padding: 3px 8px;
  text-align: center;
}

.project-info-card p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  border-bottom: 1px dotted #a8a8a8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
}

.progress-track {
  height: 20px;
  border: 1px solid #c2a487;
  background: #fff;
}

.progress-track div {
  height: 100%;
  background: #34a853;
}

.sheet-table-card table {
  width: 100%;
  border-collapse: collapse;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.sheet-table-card th {
  border: 1px solid #bfa58d;
  background: #f1ece6;
  text-align: left;
}

.sheet-table-card td {
  max-width: 220px;
  overflow: hidden;
  border: 1px dotted #c9b19d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#4285f4 var(--pct), #e5e7eb 0);
  margin: 8px auto;
  position: relative;
}

.donut::after {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.donut span {
  position: relative;
  z-index: 1;
  font-weight: 900;
}

.sheet-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: #555;
  font-size: 11px;
}

.priority-bars {
  display: grid;
  gap: 8px;
}

.priority-row {
  display: grid;
  grid-template-columns: 58px minmax(100px, 1fr) 24px;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 12px;
}

.priority-track {
  height: 14px;
  background: #f3f4f6;
}

.priority-track div {
  height: 100%;
}

.project-metric-list {
  display: grid;
  gap: 10px;
}

.project-metric-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.project-metric-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-metric-row span {
  color: var(--muted);
  font-weight: 800;
}

.project-metric-row strong {
  color: var(--ink);
  font-size: 18px;
  text-align: right;
}

.project-metric-row.red strong {
  color: var(--red);
}

.project-metric-row.yellow strong {
  color: var(--yellow);
}

.project-metric-row.green strong {
  color: var(--green);
}

.project-metric-row.strong strong {
  color: var(--ink);
  font-size: 20px;
}

.claim-chart {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.claim-chart h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.claim-chart-row {
  display: grid;
  grid-template-columns: 72px minmax(80px, 1fr) 88px 78px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.claim-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--grey-soft);
}

.claim-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.claim-bar.under {
  background: var(--yellow);
}

.claim-value {
  color: var(--ink);
  text-align: right;
}

.claim-status {
  color: var(--green);
  text-align: right;
}

.claim-status.under {
  color: var(--yellow);
}

.claim-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.urgent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.urgent-tabs button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 0 10px;
}

.urgent-tabs button.active {
  background: var(--blue);
  color: #ffffff;
}

.urgent-tabs strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 12px;
}

.urgent-tabs button.active strong {
  background: rgba(255, 255, 255, 0.22);
}

.work-program-lookahead {
  margin-top: 16px;
}

.lookahead-header {
  align-items: flex-start;
}

.lookahead-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.lookahead-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.lookahead-tabs button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 0 10px;
}

.lookahead-tabs button.active {
  background: var(--blue);
  color: #fff;
}

.lookahead-tabs strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 12px;
}

.lookahead-tabs button.active strong {
  background: rgba(255, 255, 255, 0.22);
}

.lookahead-table-wrap {
  margin: 16px;
}

.lookahead-table {
  min-width: 1320px;
}

.lookahead-table td strong {
  color: var(--ink);
}

.lookahead-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  padding: 7px 10px;
}

.lookahead-status.green {
  background: #dcfce7;
  color: #15803d;
}

.lookahead-status.orange {
  background: #ffedd5;
  color: #c2410c;
}

.lookahead-status.amber {
  background: #fef3c7;
  color: #b7791f;
}

.lookahead-status.red {
  background: #fee2e2;
  color: #dc2626;
}

.lookahead-status.grey {
  background: #eef2f7;
  color: var(--muted);
}

.lookahead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.panel-body {
  padding: 14px 16px 16px;
}

.stack {
  display: grid;
  gap: 12px;
}

.task-row,
.project-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.task-row-top,
.project-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.urgent-row-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 210px;
  align-items: center;
  column-gap: 18px;
}

.urgent-subject-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.urgent-section-list {
  display: grid;
  gap: 10px;
}

.urgent-section-item {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.urgent-section-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.urgent-side {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 190px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.urgent-side-line {
  display: block;
  line-height: 1.25;
}

.urgent-toggle {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: var(--grey-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.urgent-toggle:hover {
  background: #dbe4ef;
  color: var(--blue-deep);
}

.urgent-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 210px;
  justify-self: end;
}

.task-title,
.project-title {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.urgent-item-type {
  display: inline-block;
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.meta-alert {
  color: var(--red);
  font-weight: 900;
}

.late-approval-note {
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: #fff5f5;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--grey-soft);
  color: var(--grey);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  white-space: nowrap;
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.yellow {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge.blue {
  background: #e8f0ff;
  color: var(--blue);
}

.badge.grey {
  background: var(--grey-soft);
  color: var(--grey);
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.summary-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.summary-bars span {
  min-height: 52px;
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.summary-bars strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.settings-status-editor {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.settings-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-collapse-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.settings-collapse-toggle .project-title {
  margin: 0 0 4px;
}

.settings-collapse-toggle strong {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--grey-soft);
  font-size: 16px;
}

.settings-section-content {
  display: grid;
  gap: 14px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.status-settings-row {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.status-settings-row h4 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.status-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-edit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--grey-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 8px 7px 12px;
}

.status-edit-chip.red {
  background: var(--red-soft);
  color: var(--red);
}

.status-edit-chip.yellow {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status-edit-chip.green {
  background: var(--green-soft);
  color: var(--green);
}

.status-edit-chip.blue {
  background: #e8f0ff;
  color: var(--blue);
}

.status-edit-chip.grey {
  background: var(--grey-soft);
  color: var(--grey);
}

.status-color-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.status-color-dot.red {
  background: var(--red);
}

.status-color-dot.yellow {
  background: var(--yellow);
}

.status-color-dot.green {
  background: var(--green);
}

.status-color-dot.blue {
  background: var(--blue);
}

.status-color-dot.grey {
  background: var(--grey);
}

.status-edit-chip button {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  cursor: pointer;
  font-weight: 900;
}

.status-add-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
}

.status-settings-row .status-add-row {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 160px) auto;
}

.member-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
}

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

.user-form .project-checklist {
  grid-column: 1 / -1;
}

.project-checklist {
  display: flex;
  min-height: 44px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.password-field {
  display: flex;
  gap: 8px;
}

.password-field input {
  min-width: 0;
  flex: 1;
}

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

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

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.member-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.user-row div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.user-main {
  min-width: 0;
}

.user-actions {
  justify-content: flex-end;
}

.member-row strong {
  color: var(--ink);
}

.user-row strong {
  color: var(--ink);
}

.profile-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.profile-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.online-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr);
  gap: 10px;
}

.online-settings-grid .full {
  grid-column: 1 / -1;
}

.migration-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.migration-preview-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.migration-preview-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.migration-preview-card strong {
  color: var(--ink);
  font-size: 28px;
}

.drive-status-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: linear-gradient(135deg, #f8fafc, #eef4fb);
  padding: 20px;
}

.login-card {
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-card h1 {
  margin: 0;
  font-size: 32px;
}

.login-error {
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
  padding: 10px;
}

.btn.full {
  width: 100%;
}

.link-button {
  justify-self: start;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

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

.member-picker {
  display: grid;
  gap: 10px;
}

.member-chip-list {
  display: flex;
  min-height: 46px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.user-permission-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-permission-tabs button {
  min-height: 38px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
}

.user-permission-tabs button.active {
  background: var(--blue);
  color: #fff;
}

.permission-editor,
.financial-permission-list {
  display: grid;
  gap: 12px;
}

.permission-matrix th,
.permission-matrix td {
  text-align: center;
  vertical-align: middle;
}

.permission-matrix th:first-child,
.permission-matrix td:first-child {
  min-width: 190px;
  text-align: left;
}

.permission-matrix input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 8px 7px 12px;
}

.member-chip button {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.report-card {
  min-height: 210px;
}

.report-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-export-menu {
  position: relative;
}

.report-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.rfi-summary-cards {
  margin-bottom: 14px;
}

.rfi-detail-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.rfi-detail-section h4 {
  margin: 0;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  border-left: 4px solid var(--blue);
  background: #f8fafc;
  padding: 8px 10px;
}

.timeline-item span {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.filters {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 10px;
}

.field,
.filters input,
.filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 11px;
}

.filters input {
  flex: 1 1 220px;
}

.filters select {
  flex: 0 1 210px;
}

.status-quick-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.status-quick-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px 0 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.status-quick-card:hover {
  transform: translateY(-1px);
}

.status-quick-card strong {
  min-width: 24px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  line-height: 24px;
  text-align: center;
}

.status-quick-card.blue {
  border-left-color: var(--blue);
}

.status-quick-card.green {
  border-left-color: var(--green);
}

.status-quick-card.yellow {
  border-left-color: var(--yellow);
}

.status-quick-card.red {
  border-left-color: var(--red);
}

.status-quick-card.grey {
  border-left-color: var(--muted);
}

.status-quick-card.active {
  border-color: var(--blue);
  border-left-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.status-quick-card.active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.checkbox-filter {
  position: relative;
  flex: 0 1 210px;
  min-width: 180px;
}

.checkbox-filter summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  padding: 0 11px;
}

.checkbox-filter summary::-webkit-details-marker {
  display: none;
}

.checkbox-filter summary::after {
  content: "⌄";
  color: var(--muted);
  font-weight: 900;
}

.checkbox-filter[open] summary::after {
  content: "⌃";
}

.checkbox-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: max(230px, 100%);
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.checkbox-filter-menu label {
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 8px;
}

.checkbox-filter-menu label:hover {
  background: var(--panel-soft);
}

.filter-tick {
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

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

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

tr.row-highlight-red td {
  background: #fff7f6;
}

tr.row-highlight-yellow td {
  background: #fffbed;
}

tr.row-highlight-green td {
  background: #f3fbf5;
}

tr.row-highlight-red td:first-child {
  border-left: 4px solid var(--red);
}

tr.row-highlight-yellow td:first-child {
  border-left: 4px solid #d6a900;
}

tr.row-highlight-green td:first-child {
  border-left: 4px solid var(--green);
}

.cell-title {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.status-update {
  display: flex;
  min-width: 170px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-update span {
  flex: 0 0 auto;
}

.status-update select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 4px 8px;
}

.empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed #c7d0d9;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.46);
  padding: 18px;
}

.modal {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: hidden;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 90px rgba(15, 23, 42, 0.26);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.modal-header h3 {
  margin: 0;
}

.form {
  display: grid;
  max-height: calc(92vh - 72px);
  overflow-y: auto;
  gap: 14px;
  padding: 18px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

label.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.bulk-task-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.bulk-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bulk-task-header h4 {
  margin: 0;
  font-size: 15px;
}

.bulk-task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 150px 150px minmax(200px, 1fr) 140px auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.bulk-issue-row {
  grid-template-columns: minmax(240px, 1.4fr) 160px 170px minmax(220px, 1fr) auto;
}

.bulk-issue-row textarea {
  min-height: 78px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-progress-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.work-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.work-progress-actions select {
  min-width: 220px;
}

.work-progress-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(145px, 1fr) minmax(170px, 1.2fr) 95px 95px 145px 135px minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.work-progress-row textarea {
  min-height: 52px;
}

.compact-table table {
  min-width: 820px;
}

.activity-update-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px) minmax(150px, 220px);
  gap: 10px;
  align-items: center;
}

.activity-update-header h4 {
  margin: 0;
}

.activity-update-header input,
.activity-update-header select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.progress-report-table table {
  min-width: 980px;
}

.progress-report-table th,
.progress-report-table td {
  vertical-align: top;
}

.progress-report-table input,
.progress-report-table textarea {
  width: 100%;
  min-width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

.progress-report-table textarea {
  min-width: 180px;
  min-height: 62px;
  resize: vertical;
}

.progress-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 178px;
}

.progress-stepper button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--grey-soft);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.progress-stepper input {
  min-width: 64px;
  max-width: 78px;
  text-align: center;
  font-weight: 900;
}

.progress-stepper span {
  color: var(--muted);
  font-weight: 900;
}

.progress-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.progress-status-badge.grey {
  background: var(--grey-soft);
  color: var(--muted);
}

.progress-status-badge.blue {
  background: #e8f0ff;
  color: var(--blue);
}

.progress-status-badge.red {
  background: #ffe8e6;
  color: var(--red);
}

.progress-status-badge.green {
  background: #e8f8ee;
  color: var(--green);
}

.report-preview-modal {
  width: min(1100px, calc(100vw - 32px));
}

.report-print-surface {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.report-print-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.report-print-title p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.report-print-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.15;
}

.report-print-title span,
.report-print-footer {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-print-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.report-print-surface .report-summary-strip,
.report-print-surface .report-preview-table,
.report-print-surface table,
.report-print-surface tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.report-print-surface.pdf-exporting {
  width: 1500px;
  max-width: none;
}

.report-print-surface.pdf-exporting .report-preview-table {
  max-height: none;
  overflow: visible;
}

.report-preview-backdrop {
  align-items: flex-start;
  overflow: auto;
}

.dashboard-report-modal {
  width: min(1280px, calc(100vw - 24px));
  max-height: none;
}

.dashboard-report-preview {
  min-height: 75vh;
  overflow: auto;
  background: #eef2f7;
  padding: 24px;
}

.dashboard-report-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: max-content;
  margin: 0 auto;
}

.dashboard-report-page {
  position: relative;
  width: 297mm;
  min-height: 210mm;
  background: #ffffff;
  box-sizing: border-box;
  border: 1px solid #dbe3ec;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  padding: 12mm;
  page-break-after: always;
  break-after: page;
}

.dashboard-report-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.dashboard-report-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dbe3ec;
  padding-bottom: 4mm;
  margin-bottom: 5mm;
}

.dashboard-report-page-header p {
  margin: 0 0 2mm;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.dashboard-report-page-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.dashboard-report-page-header span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.dashboard-report-page-content {
  padding-bottom: 12mm;
}

.dashboard-report-page-content > h3 {
  margin: 0 0 5mm;
  color: var(--ink);
  font-size: 18px;
}

.dashboard-report-page-footer {
  position: absolute;
  bottom: 5mm;
  left: 12mm;
  right: 12mm;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #dbe3ec;
  padding-top: 3mm;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.report-page-stack {
  display: grid;
  gap: 5mm;
}

.report-meta-grid,
.report-card-grid {
  display: grid;
  gap: 10px;
}

.report-meta-grid {
  grid-template-columns: repeat(5, 1fr);
}

.report-meta-grid span,
.report-mini-card,
.report-panel {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.report-meta-grid span {
  padding: 10px;
  color: var(--ink);
  font-size: 12px;
}

.report-meta-grid strong {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}

.report-card-grid.compact {
  grid-template-columns: repeat(4, 1fr);
}

.report-mini-card {
  border-left: 5px solid var(--muted);
  padding: 10px 12px;
}

.report-mini-card.blue {
  border-left-color: var(--blue);
}

.report-mini-card.green {
  border-left-color: var(--green);
}

.report-mini-card.red {
  border-left-color: var(--red);
}

.report-mini-card.yellow {
  border-left-color: #d6a900;
}

.report-mini-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.report-mini-card strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  margin-top: 6px;
}

.report-two-col,
.report-three-col {
  display: grid;
  gap: 5mm;
}

.report-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.report-panel h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
}

.report-chart-panel .overall-card {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.report-chart-panel .s-curve-wrap svg {
  min-width: 0;
}

.report-three-col .overall-card {
  min-height: 0;
  border: 1px solid #dbe3ec;
  box-shadow: none;
}

.report-three-col .status-pie {
  width: 118px;
  height: 118px;
}

.report-three-col .status-pie::after {
  width: 56px;
  height: 56px;
}

.report-status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.report-status-pill.blue {
  background: #e8f0ff;
  color: var(--blue);
}

.report-status-pill.green {
  background: #e8f8ee;
  color: var(--green);
}

.report-status-pill.red {
  background: #ffe8e6;
  color: var(--red);
}

.report-table-wrap {
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.report-table th {
  background: #f1f5f9;
  color: var(--muted);
  text-align: left;
  font-size: 9px;
  text-transform: uppercase;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid #dbe3ec;
  padding: 7px 8px;
  vertical-align: top;
}

.report-table-row,
.avoid-page-break {
  break-inside: avoid;
  page-break-inside: avoid;
}

.report-status-list {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.report-status-list span {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.claim-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 110px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
}

.claim-bar-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.claim-bar-row i {
  display: block;
  height: 100%;
  background: var(--green);
}

@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  html,
  body {
    margin: 0;
    padding: 0;
    background: #ffffff;
  }

  .no-print {
    display: none !important;
  }

  .dashboard-report-preview {
    background: #ffffff;
    padding: 0;
    overflow: visible;
  }

  .dashboard-report-pages {
    display: block;
    transform: none !important;
  }

  .dashboard-report-page {
    width: 297mm;
    height: 210mm;
    min-height: 210mm;
    margin: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
  }

  .dashboard-report-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}

.report-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: white;
}

.report-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.report-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.report-filter-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.report-filter-row input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.report-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.report-summary-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-summary-strip strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.report-preview-table {
  max-height: 52vh;
  overflow: auto;
}

.programme-toolbar .import-btn {
  position: relative;
  overflow: hidden;
}

.programme-toolbar .import-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.programme-simple-filters {
  grid-template-columns: minmax(220px, 1.1fr) minmax(150px, 0.7fr) minmax(240px, 1.2fr);
}

.more-actions {
  position: relative;
  z-index: 30;
}

.dropdown-scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: transparent;
}

.more-actions summary {
  list-style: none;
  cursor: pointer;
}

.more-actions summary::-webkit-details-marker {
  display: none;
}

.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.more-menu button,
.more-menu select,
.more-menu .import-menu-item {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: #f1f5f9;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.more-menu .import-menu-item {
  cursor: pointer;
  font-size: 14px;
}

.more-menu .import-menu-item input {
  display: none;
}

.more-menu label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--grey-soft);
  overflow: hidden;
}

.segmented button {
  min-width: 58px;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.segmented button.active {
  background: var(--blue);
  color: white;
}

.programme-stats .stat-card.blue,
.programme-fill.blue {
  border-left-color: var(--blue);
}

.programme-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.programme-stats .stat-card {
  min-height: 96px;
  padding: 15px 16px;
}

.programme-stats .stat-card strong {
  font-size: 30px;
}

.programme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.programme-chart-card {
  padding: 18px;
}

.programme-chart-card h3,
.programme-lookahead h3 {
  margin: 0 0 14px;
}

.programme-bars {
  display: grid;
  gap: 10px;
}

.programme-bar-row {
  display: grid;
  grid-template-columns: 140px minmax(160px, 1fr) 54px;
  gap: 10px;
  align-items: center;
}

.programme-track {
  height: 12px;
  border-radius: 999px;
  background: #e8edf3;
  overflow: hidden;
}

.programme-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--grey);
}

.programme-fill.green,
.legend-dot.green {
  background: var(--green);
}

.programme-fill.red,
.legend-dot.red {
  background: var(--red);
}

.programme-fill.yellow,
.legend-dot.yellow {
  background: var(--yellow);
}

.programme-fill.blue,
.legend-dot.blue {
  background: var(--blue);
}

.programme-donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.programme-donut {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue) 0 35%, var(--green) 35% 55%, var(--yellow) 55% 75%, var(--red) 75% 90%, #d7dde5 90% 100%);
  position: relative;
}

.programme-donut::after {
  content: "";
  position: absolute;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: white;
}

.programme-donut strong {
  position: relative;
  z-index: 1;
}

.programme-legend,
.programme-small-list,
.programme-lookahead {
  display: grid;
  gap: 8px;
}

.programme-legend span,
.programme-small-list div,
.lookahead-row {
  display: grid;
  gap: 3px;
  color: var(--muted);
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--grey);
}

.programme-gantt {
  margin-bottom: 14px;
  overflow: hidden;
}

.programme-sheet {
  overflow: hidden;
}

.programme-sheet-scroll {
  overflow: auto;
  max-height: 72vh;
  border-top: 1px solid var(--line);
}

.programme-sheet-grid {
  display: grid;
  min-width: 2502px;
  position: relative;
}

.programme-cell {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 7px 8px;
}

.programme-head {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 42px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  justify-content: center;
  text-align: center;
}

.programme-head span {
  flex: 1;
  text-align: center;
}

.column-move {
  width: 20px;
  height: 24px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 1000;
}

.column-move:hover {
  background: #dbeafe;
  color: var(--blue);
}

.programme-cell.freeze {
  position: sticky;
  z-index: 9;
  box-shadow: 1px 0 0 var(--line);
}

.programme-head.freeze {
  z-index: 12;
}

.freeze-0 {
  left: 0;
}

.freeze-1 {
  left: 74px;
}

.freeze-2 {
  left: 204px;
}

.programme-cell input,
.programme-cell select,
.programme-cell textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 7px 6px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.programme-cell input:focus,
.programme-cell select:focus,
.programme-cell textarea:focus {
  border-color: var(--blue);
  background: #eff6ff;
  outline: none;
}

.programme-cell textarea {
  min-height: 46px;
  resize: both;
  line-height: 1.25;
  overflow: auto;
}

.no-cell input,
.duration-cell input,
.programme-cell input[type="date"] {
  text-align: center;
}

.no-cell,
.duration-cell,
.handover-cell,
.status-cell,
.center-cell,
.freeze-1,
.programme-cell:has(input[type="date"]) {
  justify-content: center;
  text-align: center;
}

.freeze-1 input {
  text-align: center;
}

.activity-name-cell {
  align-items: flex-start;
  flex-direction: column;
}

.handover-cell {
  align-items: center;
  flex-direction: column;
}

.handover-delay,
.handover-ok,
.work-status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 1000;
}

.handover-delay {
  background: #fee2e2;
  color: var(--red);
}

.handover-ok {
  background: #dcfce7;
  color: var(--green);
}

.work-status-pill {
  max-width: 100%;
  justify-content: center;
  white-space: normal;
}

.work-status-pill.green {
  background: #dcfce7;
  color: var(--green);
}

.work-status-pill.yellow {
  background: #fef3c7;
  color: var(--yellow);
}

.work-status-pill.red {
  background: #fee2e2;
  color: var(--red);
}

.work-status-pill.grey {
  background: #eef2f7;
  color: var(--grey);
}

.row-move-actions {
  display: grid;
  gap: 3px;
}

.row-move-actions button {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #eef2f7;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
}

.row-move-actions button:hover {
  background: #dbeafe;
  color: var(--blue);
}

.column-resizer {
  align-self: stretch;
  width: 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: col-resize;
}

.column-resizer:hover {
  background: #cbd5e1;
}

.delay-cell {
  justify-content: center;
  color: var(--red);
  font-weight: 1000;
}

.remarks-cell {
  position: relative;
}

.sheet-delete {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--red);
  cursor: pointer;
  font-weight: 1000;
}

.gantt-head {
  position: sticky;
  top: 0;
  z-index: 7;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
}

.gantt-head span {
  min-width: 72px;
  text-align: center;
}

.gantt-cell {
  position: relative;
  min-height: 50px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px) 0 0 / 72px 100%, white;
}

.sheet-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--red);
  z-index: 3;
}

.sheet-planned-bar,
.sheet-actual-bar {
  position: absolute;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.sheet-planned-bar {
  top: 11px;
  height: 12px;
  background: rgba(37, 99, 235, 0.72);
}

.sheet-actual-bar {
  top: 27px;
  height: 10px;
  background: var(--green);
}

.sheet-actual-bar.green {
  background: var(--green);
}

.sheet-actual-bar.yellow,
.sheet-actual-bar.grey {
  background: var(--yellow);
}

.sheet-actual-bar.red {
  background: var(--red);
}

.gantt-body {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  overflow-x: auto;
}

.today-line {
  position: absolute;
  top: 50px;
  bottom: 8px;
  width: 2px;
  background: var(--red);
  z-index: 2;
}

.gantt-scale {
  display: grid;
  grid-template-columns: 260px minmax(520px, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 794px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gantt-scale-track {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.gantt-row {
  display: grid;
  grid-template-columns: 260px minmax(520px, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 794px;
}

.gantt-name {
  border: 0;
  background: transparent;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.gantt-name span {
  display: inline-block;
  min-width: 42px;
  color: var(--muted);
}

.gantt-track {
  position: relative;
  height: 26px;
  border-radius: 6px;
  background: #eef2f7;
}

.gantt-plan {
  position: absolute;
  top: 5px;
  height: 16px;
  min-width: 18px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  cursor: pointer;
  overflow: hidden;
}

.gantt-plan.green {
  background: #93d6a6;
}

.gantt-plan.yellow {
  background: #f59e0b;
}

.gantt-plan.red {
  background: #fca5a5;
}

.gantt-plan.blue {
  background: var(--blue);
}

.gantt-actual {
  height: 100%;
  background: rgba(37, 99, 235, 0.85);
}

.gantt-warning {
  position: absolute;
  right: 8px;
  top: 4px;
  font-size: 12px;
  font-weight: 900;
  color: var(--red);
}

.programme-groups {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.programme-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.programme-group-title {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 0;
  background: #f8fafc;
  padding: 12px 14px;
  text-align: left;
  color: var(--ink);
  font-size: 16px;
}

.programme-activity {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 90px 145px 145px 150px minmax(170px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.programme-activity.level-1 {
  padding-left: 30px;
}

.programme-activity.level-2 {
  padding-left: 46px;
}

.programme-activity-title {
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.programme-activity-title span {
  color: var(--muted);
  font-size: 13px;
}

.programme-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.programme-warnings span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--red);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.quick-activity-summary,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
}

.quick-activity-summary {
  display: grid;
  gap: 5px;
}

.quick-activity-summary span,
.notice {
  color: var(--muted);
}

.notice.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

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

.delay-comparison-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: var(--ink);
  font-weight: 900;
}

.delay-comparison-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .sidebar-foot {
    display: none;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .activity-notification-card {
    grid-column: 1 / -1;
  }

  .programme-grid {
    grid-template-columns: 1fr;
  }

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

  .programme-simple-filters {
    grid-template-columns: 1fr;
  }

  .programme-activity {
    grid-template-columns: 1fr 110px 145px 145px 150px minmax(170px, 1fr) auto auto;
  }

}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .topbar {
    display: grid;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .stats,
  .programme-stats,
  .form-grid,
  .summary-bars,
  .member-form,
  .user-form,
  .email-settings-grid,
  .online-settings-grid,
  .overall-grid,
  .bulk-task-row,
  .bulk-issue-row,
  .work-progress-row {
    grid-template-columns: 1fr;
  }

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

  .user-actions {
    justify-content: flex-start;
  }

  .work-progress-actions,
  .work-progress-actions select,
  .toolbar-actions {
    width: 100%;
  }

  .more-actions,
  .more-actions summary {
    width: 100%;
  }

  .more-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .programme-bar-row,
  .programme-activity,
  .mapping-grid,
  .delay-comparison-box,
  .submission-task-box {
    grid-template-columns: 1fr;
  }

  .submission-revision-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .programme-donut-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .gantt-row {
    grid-template-columns: 180px minmax(420px, 1fr);
  }

  .overall-card.wide {
    grid-column: auto;
  }

  .dashboard-filters label,
  .dashboard-project-filter label,
  .dashboard-filters .btn {
    width: 100%;
  }

  .progress-line,
  .status-summary-row {
    grid-template-columns: 1fr;
  }

  .urgent-row-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .urgent-side {
    margin-left: 0;
    margin-top: 0;
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .urgent-card-actions,
  .urgent-card-actions .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .sheet-table-card {
    overflow-x: auto;
  }

  .filters {
    flex-basis: 100%;
  }

  .btn {
    width: 100%;
  }

  .row-actions .btn,
  .top-actions .btn,
  .panel-header .btn {
    width: auto;
  }
}
