:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f9fbfa;
  --ink: #18231f;
  --muted: #61716c;
  --line: #d6e0dc;
  --line-strong: #aebcb7;
  --teal: #137c72;
  --teal-soft: #d9efeb;
  --red: #b94d3f;
  --red-soft: #f6ddd8;
  --amber: #a36e0e;
  --amber-soft: #f7e7c6;
  --green: #377b43;
  --green-soft: #dff0e2;
  --blue: #315f8f;
  --blue-soft: #dbe8f5;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(24, 35, 31, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 246, 0.97)),
    repeating-linear-gradient(90deg, rgba(24, 35, 31, 0.035) 0 1px, transparent 1px 84px);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.dash-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1760px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 0 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 2.4vw, 2.55rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.2;
}

.meta-line {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 980px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.status-pill.accent {
  border-color: #9bcfc7;
  background: var(--teal-soft);
  color: #0e625a;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.nav-pill:hover {
  border-color: #9bcfc7;
  color: #0e625a;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
}

.kpi {
  --card-color: var(--teal);
  --card-soft: var(--teal-soft);
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
  min-height: 108px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi::before {
  position: absolute;
  right: -32px;
  bottom: -44px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: conic-gradient(var(--card-color) calc(var(--value) * 1%), rgba(231, 239, 236, 0.95) 0);
  content: "";
  opacity: 0.18;
}

.kpi.teal {
  --card-color: var(--teal);
  --card-soft: var(--teal-soft);
}

.kpi.blue {
  --card-color: var(--blue);
  --card-soft: var(--blue-soft);
}

.kpi.green {
  --card-color: var(--green);
  --card-soft: var(--green-soft);
}

.kpi.amber {
  --card-color: var(--amber);
  --card-soft: var(--amber-soft);
}

.kpi.red {
  --card-color: var(--red);
  --card-soft: var(--red-soft);
}

.kpi-icon {
  position: relative;
  z-index: 1;
  grid-row: 1 / 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--card-soft), #ffffff);
  color: var(--card-color);
}

.kpi strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.kpi > span:not(.kpi-icon) {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 1.85rem;
  font-weight: 850;
  line-height: 1;
}

.kpi small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.attention-panel {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 0%, rgba(19, 124, 114, 0.09), transparent 34%),
    radial-gradient(circle at 92% 14%, rgba(185, 77, 63, 0.08), transparent 30%),
    var(--surface);
  box-shadow: var(--shadow);
}

.attention-head {
  min-height: 82px;
}

.attention-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.attention-mini {
  display: grid;
  min-width: 98px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
}

.attention-mini strong {
  font-size: 1.28rem;
  line-height: 1;
}

.attention-mini small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.attention-mini.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

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

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

.attention-mini.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.attention-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.attention-card {
  --attention-color: var(--teal);
  --attention-soft: var(--teal-soft);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 318px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--attention-color);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--attention-soft), var(--surface) 34%);
}

.attention-card.amber {
  --attention-color: var(--amber);
  --attention-soft: #fff5df;
}

.attention-card.red {
  --attention-color: var(--red);
  --attention-soft: #fff0ed;
}

.attention-card-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid rgba(214, 224, 220, 0.8);
}

.attention-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--attention-color);
}

.attention-card-head strong,
.attention-card-head span {
  display: block;
}

.attention-card-head strong {
  font-size: 0.98rem;
}

.attention-card-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.attention-filter {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.attention-filter:hover {
  border-color: var(--attention-color);
  color: var(--attention-color);
}

.attention-list {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
  padding: 12px;
  list-style: none;
}

.attention-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(214, 224, 220, 0.86);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
}

.attention-list b {
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-list span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.attention-list em {
  min-width: 68px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.attention-list em.late {
  background: var(--red-soft);
  color: var(--red);
}

.attention-list .attention-empty {
  display: block;
  color: var(--muted);
  text-align: center;
}

.controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 230px) minmax(170px, 210px) minmax(170px, 210px) minmax(120px, 160px);
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.search-box,
.select-wrap {
  display: grid;
  gap: 6px;
}

.search-box span,
.select-wrap span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.search-box input,
.select-wrap select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.search-box input {
  padding: 0 12px;
}

.select-wrap select {
  padding: 0 34px 0 10px;
}

.reset-filter-btn {
  width: 100%;
  height: 40px;
  align-self: end;
  border: 1px solid rgba(249, 115, 22, 0.58);
  border-radius: var(--radius);
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
  font-weight: 850;
  cursor: pointer;
}

.reset-filter-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 251, 250, 0.95);
}

.progress-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.stage-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.stage-card strong,
.discipline-row strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.stage-line {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.bar-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7efec;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: var(--teal);
}

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

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

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

.discipline-board {
  display: grid;
  gap: 0;
}

.discipline-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 62px 62px 62px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

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

.discipline-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.count-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: #0e625a;
  font-weight: 850;
}

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

.count-pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

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

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

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

.dot.amber {
  background: var(--amber);
}

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

.table-scroll {
  max-height: calc(100vh - 430px);
  min-height: 420px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1540px;
  border-collapse: separate;
  border-spacing: 0;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #e6efec;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

td {
  background: rgba(255, 255, 255, 0.98);
  font-size: 0.86rem;
}

tr:nth-child(even) td {
  background: #f9fbfa;
}

.doc-no {
  width: 220px;
  font-weight: 840;
}

.title-cell {
  width: 330px;
  font-weight: 760;
  line-height: 1.28;
}

.small-muted {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.stage {
  min-width: 132px;
  line-height: 1.35;
}

.stage b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.stage .date {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
}

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

.status-chip.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

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

.empty-state {
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .controls,
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .progress-board {
    grid-template-columns: 1fr;
  }

  .attention-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 18px, 760px);
    padding-top: 10px;
  }

  .topbar {
    display: grid;
  }

  .status-stack {
    justify-content: flex-start;
  }

  .attention-head {
    display: grid;
    align-items: start;
  }

  .attention-summary {
    justify-content: flex-start;
  }

  .kpi-grid,
  .controls,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .discipline-row {
    grid-template-columns: 74px minmax(0, 1fr) 52px 52px 52px;
  }
}
/* Tuah brand theme layer */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-strong: #ffffff;
  --ink: #1c242c;
  --muted: #5e6a76;
  --line: #dce3ea;
  --line-strong: #aeb8c3;
  --teal: #f15b22;
  --teal-deep: #c74412;
  --teal-soft: #ffe5d6;
  --coral: #f15b22;
  --coral-soft: #ffe5d6;
  --amber: #f15b22;
  --amber-soft: #fff0e7;
  --blue: #264a80;
  --blue-soft: #e2ebf7;
  --green: #2f7a4f;
  --green-soft: #e1f1e8;
  --red: #c8442e;
  --red-soft: #fde4de;
  --charcoal: #1c242c;
  --shadow: 0 18px 42px rgba(28, 36, 44, 0.11);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 246, 248, 0.98)),
    repeating-linear-gradient(90deg, rgba(38, 74, 128, 0.035) 0 1px, transparent 1px 86px);
}

.topbar {
  border-bottom: 4px solid var(--teal);
}

.eyebrow {
  color: var(--teal);
  letter-spacing: 0.02em;
}

h1,
h2,
h3 {
  color: var(--ink);
}

.quick-nav a,
button,
.action-button,
.open-button,
.full-toggle {
  border-color: var(--line-strong);
  color: var(--ink);
}

.quick-nav a:hover,
.quick-nav a[aria-current="page"],
button:hover,
.action-button:hover,
.open-button:hover,
.full-toggle:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--ink);
}

.panel,
.kpi-card,
.control-panel,
.stat-card,
.metric-card,
.money-focus,
.progress-hero,
.curve-hero,
.countdown-card,
.manhours-card,
.timeline-card,
.vessel-card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.panel-head,
th {
  background: linear-gradient(90deg, rgba(255, 229, 214, 0.82), rgba(249, 250, 251, 0.96));
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(241, 91, 34, 0.28);
  border-color: var(--teal);
}

.status-chip.critical,
.status-pill.state-rejected,
.variance.bad,
.variance-pill.bad {
  background: var(--red-soft);
  color: var(--red);
}

/* ════════════════════════════════════════
   UNIFIED LAYOUT OVERRIDES (20260524)
   ════════════════════════════════════════ */
:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-strong: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #1a202c;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --teal: #f15b22;
  --teal-deep: #c74412;
  --teal-soft: #fff1eb;
  --coral: #f15b22;
  --coral-soft: #fff1eb;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --charcoal: #1e293b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
}
html, body { background: var(--bg); color: var(--ink); }
.app-shell {
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr);
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
}
.main-content .topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.main-content .topbar h1 { font-size: 1.2rem; margin-bottom: 0; }
.main-content main {
  padding: 24px 28px 40px;
  display: flex; flex-direction: column; gap: 20px;
  width: auto;
  max-width: none;
}
.quick-nav, .nav-pill, .status-stack { display: none !important; }

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr !important; }
  .main-content main { padding: 18px 16px 32px; }
  .main-content .topbar { padding: 12px 16px; }
}

/* ── MDR mobile responsive ── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .controls { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .attention-summary { flex-wrap: wrap; gap: 8px; }
  .attention-board { grid-template-columns: 1fr; }
  .progress-board, .discipline-board { grid-template-columns: 1fr; }
  .table-scroll { overflow-x: auto; }
  .table-scroll table { font-size: 0.75rem; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   MDR MODERN POLISH (20260524-modern)
   Refined dark palette for management view.
   Soft status colors, clean cards, no
   muddy teals or dated cream tints.
   ════════════════════════════════════════ */

/* ── KPI grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: all 200ms ease;
}
.kpi:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.kpi strong,
.kpi-card strong {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.kpi span,
.kpi-card div > span {
  color: #f97316;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 1.7rem;
}
.kpi small,
.kpi-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.kpi-icon {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border-radius: 10px;
}

/* ── Attention panel ── */
.attention-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.attention-head {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
}
.attention-head h2 {
  color: var(--ink);
  font-weight: 800;
}
.attention-head .eyebrow { color: #fb923c; }

/* Attention summary chips (counts) */
.attention-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.attention-mini {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 100px;
  transition: all 200ms ease;
}
.attention-mini:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(249, 115, 22, 0.25);
}
.attention-mini strong {
  color: var(--ink);
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}
.attention-mini small {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.attention-mini.amber {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}
.attention-mini.amber strong { color: #fbbf24; }
.attention-mini.red {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}
.attention-mini.red strong { color: #f87171; }
.attention-mini.green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}
.attention-mini.green strong { color: #34d399; }
.attention-mini.blue {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}
.attention-mini.blue strong { color: #38bdf8; }

/* Attention board grid */
.attention-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 18px 20px;
}

/* Attention card with state colors */
.attention-card {
  --attention-color: #fb923c;
  --attention-soft: rgba(249, 115, 22, 0.08);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--attention-color);
  border-radius: 10px;
  transition: all 200ms ease;
  overflow: hidden;
}
.attention-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.attention-card.amber {
  --attention-color: #fbbf24;
  --attention-soft: rgba(251, 191, 36, 0.08);
}
.attention-card.red {
  --attention-color: #ef4444;
  --attention-soft: rgba(239, 68, 68, 0.08);
}
.attention-card.green {
  --attention-color: #10b981;
  --attention-soft: rgba(16, 185, 129, 0.08);
}
.attention-card.blue {
  --attention-color: #38bdf8;
  --attention-soft: rgba(56, 189, 248, 0.08);
}

.attention-card-head {
  background: var(--attention-soft);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--ink);
}
.attention-card-head b,
.attention-card-head strong {
  color: var(--ink);
  font-weight: 800;
}
.attention-card-head small {
  color: var(--muted);
}

.attention-icon {
  background: var(--attention-soft);
  color: var(--attention-color);
  border-radius: 10px;
  width: 40px;
  height: 40px;
}

.attention-filter,
.attention-list {
  padding: 12px 14px;
}
.attention-list b,
.attention-list strong { color: var(--ink); font-weight: 700; }
.attention-list small,
.attention-list span { color: var(--muted); }

/* ── Filter controls ── */
.controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.search-box span,
.select-wrap span {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.search-box input,
.select-wrap select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
  color-scheme: dark;
  border-radius: 8px;
  transition: all 200ms ease;
}

.reset-filter-btn {
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.45);
  transition: all 200ms ease;
}

.reset-filter-btn:not(:disabled):hover,
.reset-filter-btn:not(:disabled):focus-visible {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.8);
  outline: 2px solid rgba(249, 115, 22, 0.22);
}

.select-wrap select option {
  background: #151d2e;
  color: #e5edf7;
}

.select-wrap select option:checked {
  background: #24324b;
  color: #ffffff;
}
.search-box input:focus,
.select-wrap select:focus {
  outline: 2px solid rgba(249, 115, 22, 0.3);
  border-color: rgba(249, 115, 22, 0.5);
}
.search-box input::placeholder { color: rgba(255, 255, 255, 0.35); }

/* ── Summary grid (progress + discipline) ── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.panel-head {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
}
.panel-head h2 {
  color: var(--ink);
  font-weight: 800;
}
.panel-head .eyebrow { color: #fb923c; }
.panel-head .meta-line { color: var(--muted); }

/* Progress board (per-area bars) */
.progress-board {
  padding: 16px 20px;
  background: transparent;
  display: grid;
  gap: 10px;
}
.progress-row,
.progress-board > div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.progress-row b,
.progress-board b {
  color: var(--ink);
  font-weight: 700;
}
.progress-row small,
.progress-board small { color: var(--muted); }

/* Generic progress bar */
.progress-bar,
.bar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  height: 8px;
}
.progress-fill,
.bar-fill {
  background: linear-gradient(90deg, #f97316, #ea580c);
  border-radius: 999px;
  height: 100%;
}

/* Discipline board */
.discipline-board {
  padding: 16px 20px;
  background: transparent;
  display: grid;
  gap: 8px;
}
.discipline-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  transition: all 200ms ease;
}
.discipline-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(249, 115, 22, 0.25);
}
.discipline-row b { color: var(--ink); font-weight: 700; }
.discipline-row small { color: var(--muted); }
.discipline-row span {
  color: #fb923c;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}

/* ── Table panel ── */
.table-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.table-scroll {
  background: var(--surface);
  overflow-x: auto;
  max-height: none;
}
.table-scroll table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.table-scroll th {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  padding: 12px 14px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-scroll td {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 14px;
}
.table-scroll tbody tr:nth-child(even) td {
  background: var(--surface-soft);
}
.table-scroll tbody tr:hover td {
  background: rgba(249, 115, 22, 0.06);
}

/* ── Legend dots ── */
.legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  align-items: center;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot.green {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.dot.amber {
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}
.dot.red {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.dot.blue {
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Document status pills inside table */
.status-pill,
.doc-status,
.state-pill {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.status-pill.complete,
.status-pill.closed,
.doc-status.complete,
.doc-status.closed {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}
.status-pill.overdue,
.status-pill.critical,
.doc-status.overdue,
.doc-status.critical {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.status-pill.pending,
.status-pill.amber,
.doc-status.pending {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.25);
}
.status-pill.in-progress,
.doc-status.in-progress,
.status-pill.ifr,
.status-pill.iaf {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}
.status-pill.approved,
.doc-status.approved,
.status-pill.good,
.status-pill.green {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

/* Date cell colors in table */
td.overdue,
td.danger {
  color: #f87171;
  font-weight: 700;
}
td.warn,
td.amber {
  color: #fbbf24;
  font-weight: 700;
}
td.good,
td.green {
  color: #34d399;
  font-weight: 700;
}

/* ── Mobile responsive ── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .controls { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .attention-board { grid-template-columns: 1fr; }
  .attention-summary { gap: 8px; }
  .attention-mini { min-width: 0; }
  .panel-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .table-scroll { overflow-x: auto; }
  .table-scroll table { font-size: 0.75rem; }
  .legend { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   MDR ATTENTION LIST FIX (20260524-fix1)
   Fix washed-out white document cards
   inside Pending IFR / Return / IAF lists.
   ════════════════════════════════════════ */

/* The list itself */
.attention-list {
  padding: 14px;
  display: grid;
  gap: 8px;
}

/* Each document card */
.attention-list li {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 200ms ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: start;
}
.attention-list li:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
}

/* Title — bright readable */
.attention-list li b {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  white-space: normal;       /* allow wrapping for long titles */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Meta line — muted but readable */
.attention-list li span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Status badge (Pending / Overdue) — refined */
.attention-list li em {
  align-self: start;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.attention-list li em.late {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Empty state */
.attention-list .attention-empty,
.attention-list li.attention-empty {
  background: transparent !important;
  border: 1px dashed var(--line) !important;
  color: var(--muted);
  text-align: center;
  padding: 18px;
  font-size: 0.82rem;
}

/* Attention card colored accent strip — make it pop more */
.attention-card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-left: 0 !important;
  position: relative;
  overflow: hidden;
}
.attention-card::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--attention-color);
}
.attention-card.amber::before { background: #fbbf24; }
.attention-card.red::before { background: #ef4444; }
.attention-card.green::before { background: #10b981; }
.attention-card.blue::before { background: #38bdf8; }

/* Attention card head — colored tint band */
.attention-card-head {
  background: var(--attention-soft) !important;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.attention-card.amber .attention-card-head { background: rgba(251, 191, 36, 0.08) !important; }
.attention-card.red .attention-card-head { background: rgba(239, 68, 68, 0.08) !important; }
.attention-card.green .attention-card-head { background: rgba(16, 185, 129, 0.08) !important; }
.attention-card.blue .attention-card-head { background: rgba(56, 189, 248, 0.08) !important; }

.attention-card-head b,
.attention-card-head strong {
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.attention-card-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

/* "Show" toggle button in attention head */
.attention-filter,
.attention-card-head button,
.attention-card button {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #fb923c;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 200ms ease;
}
.attention-filter:hover,
.attention-card-head button:hover,
.attention-card button:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.45);
  color: #f97316;
}

/* Attention icon refined */
.attention-icon {
  background: var(--attention-soft);
  color: var(--attention-color);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.attention-card.amber .attention-icon { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.attention-card.red .attention-icon { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.attention-card.green .attention-icon { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.attention-card.blue .attention-icon { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }

/* MDR lower summary cards */
.summary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr) !important;
  align-items: stretch;
}

.progress-board {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 16px !important;
}

.stage-card {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.035) !important;
}

.stage-card[data-progress-filter] {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.stage-card[data-progress-filter]:hover,
.stage-card[data-progress-filter]:focus-visible,
.stage-card[data-progress-filter].active {
  outline: none;
  border-color: color-mix(in srgb, var(--stage-color) 72%, var(--line)) !important;
  background: color-mix(in srgb, var(--stage-color) 9%, rgba(255, 255, 255, 0.04)) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--stage-color) 18%, transparent), 0 18px 36px rgba(2, 8, 23, 0.24);
  transform: translateY(-1px);
}

.stage-card.blue { --stage-color: #38bdf8; }
.stage-card.amber { --stage-color: #fbbf24; }
.stage-card.green { --stage-color: #22c55e; }

.stage-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
}

.stage-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--stage-color);
  background: color-mix(in srgb, var(--stage-color) 14%, transparent);
  flex: 0 0 auto;
}

.stage-card-head strong {
  margin: 0 !important;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
}

.stage-card-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-ring {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
  background: conic-gradient(var(--stage-color) var(--pct), rgba(51, 65, 85, 0.72) 0);
  box-shadow: 0 0 28px color-mix(in srgb, var(--stage-color) 26%, transparent);
}

.stage-ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: #111827;
}

.stage-ring b,
.stage-ring span {
  position: relative;
  z-index: 1;
}

.stage-ring b {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
}

.stage-ring span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stage-total {
  text-align: center;
  color: var(--ink);
  font-weight: 900;
}

.stage-total strong {
  margin: 0 !important;
  display: inline;
  font-size: 1.05rem;
}

.stage-total span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.stage-lines {
  margin-top: auto;
  display: grid;
  gap: 7px;
}

.stage-line {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) 58px !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bar-track {
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(51, 65, 85, 0.8) !important;
}

.bar-fill {
  display: block !important;
  width: var(--value) !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: #f97316 !important;
}

.bar-fill.green { background: #22c55e !important; }
.bar-fill.amber { background: #fbbf24 !important; }
.bar-fill.red { background: #f87171 !important; }

.discipline-board {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 16px !important;
}

.discipline-row {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 10px !important;
  min-height: 84px !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  overflow: hidden;
}

.discipline-row::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316 var(--value), rgba(51, 65, 85, 0.8) 0);
}

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

.discipline-row-head strong {
  margin: 0 !important;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.discipline-pct {
  padding-right: 46px;
  color: #fb923c !important;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
}

.discipline-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.count-pill {
  min-width: 0 !important;
  min-height: 30px;
  display: grid !important;
  place-items: center;
  gap: 1px;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(249, 115, 22, 0.34) !important;
  background: rgba(249, 115, 22, 0.12) !important;
  color: #fb923c !important;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.05;
}

.count-pill strong {
  margin: 0 !important;
  color: currentColor;
  font-size: 0.78rem;
  font-weight: 900;
}

.count-pill small {
  color: rgba(226, 232, 240, 0.62);
  font-family: inherit;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.count-pill.green {
  border-color: rgba(16, 185, 129, 0.34) !important;
  background: rgba(16, 185, 129, 0.13) !important;
  color: #34d399 !important;
}

.count-pill.amber {
  border-color: rgba(251, 191, 36, 0.36) !important;
  background: rgba(251, 191, 36, 0.13) !important;
  color: #fbbf24 !important;
}

.count-pill.red {
  border-color: rgba(248, 113, 113, 0.36) !important;
  background: rgba(248, 113, 113, 0.13) !important;
  color: #f87171 !important;
}

/* Keep KPI icon, label, value, and note aligned consistently */
.kpi {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  grid-template-areas:
    "icon label"
    "icon value"
    "icon note" !important;
  column-gap: 14px !important;
  row-gap: 2px !important;
  align-items: center !important;
  min-height: 108px !important;
  padding: 18px 20px !important;
}

.kpi-icon {
  grid-area: icon !important;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-self: center !important;
}

.kpi-icon .dash-icon {
  width: 22px !important;
  height: 22px !important;
}

.kpi > strong {
  grid-area: label !important;
  margin: 0 !important;
  line-height: 1.05 !important;
}

.kpi > span:not(.kpi-icon) {
  grid-area: value !important;
  margin: 0 !important;
  line-height: 1 !important;
  align-self: center !important;
}

.kpi > small {
  grid-area: note !important;
  margin: 0 !important;
  line-height: 1.28 !important;
  align-self: start !important;
}

button.count-pill {
  appearance: none;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

button.count-pill:hover,
button.count-pill:focus-visible,
button.count-pill.active {
  outline: none;
  border-color: rgba(249, 115, 22, 0.78) !important;
  background: rgba(249, 115, 22, 0.22) !important;
  transform: translateY(-1px);
}

.kpi::before {
  top: auto !important;
  right: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  width: calc(var(--value) * 1%) !important;
  height: 3px !important;
  border-radius: 0 999px 999px 0 !important;
  background: var(--card-color) !important;
  opacity: 1 !important;
}

@media (max-width: 1280px) {
  .summary-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .progress-board,
  .discipline-board {
    grid-template-columns: 1fr !important;
  }
}

/* Keep MDR filters and document table context visible during page scroll */
:root {
  --mdr-sticky-top: 66px;
  --mdr-doc-title-top: 158px;
  --mdr-doc-header-top: 230px;
}

.controls {
  position: sticky;
  top: var(--mdr-sticky-top);
  z-index: 46;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 210px)) minmax(120px, 160px);
  border-bottom: 0 !important;
  border-radius: 14px 14px 0 0 !important;
  background: #182235 !important;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.28);
}

.table-panel {
  overflow: visible !important;
}

.table-panel > .panel-head {
  position: sticky;
  top: var(--mdr-doc-title-top);
  z-index: 45;
  border-radius: 0;
  background: #182235 !important;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.28);
}

.table-scroll {
  overflow: visible !important;
}

.table-scroll table {
  overflow: visible;
}

.table-scroll thead,
.table-scroll thead tr {
  position: sticky;
  top: var(--mdr-doc-header-top);
  z-index: 44;
}

.table-scroll thead th {
  position: sticky !important;
  top: var(--mdr-doc-header-top) !important;
  z-index: 44 !important;
  background: #1c293d !important;
  box-shadow: inset 0 -1px 0 var(--line), 0 8px 18px rgba(2, 8, 23, 0.22);
}

/* MDR document table alignment: keep right-side workflow columns readable */
.table-panel {
  max-width: 100%;
}

.table-panel .table-scroll {
  overflow: visible !important;
  max-width: 100%;
}

.table-panel .table-scroll table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.table-panel .table-scroll th,
.table-panel .table-scroll td {
  box-sizing: border-box;
}

.table-panel .table-scroll th:nth-child(1),
.table-panel .table-scroll td:nth-child(1) {
  width: 7%;
}

.table-panel .table-scroll th:nth-child(2),
.table-panel .table-scroll td:nth-child(2) {
  width: 6%;
}

.table-panel .table-scroll th:nth-child(3),
.table-panel .table-scroll td:nth-child(3) {
  width: 13%;
}

.table-panel .table-scroll th:nth-child(4),
.table-panel .table-scroll td:nth-child(4) {
  width: 18%;
}

.table-panel .table-scroll th:nth-child(5),
.table-panel .table-scroll td:nth-child(5),
.table-panel .table-scroll th:nth-child(6),
.table-panel .table-scroll td:nth-child(6),
.table-panel .table-scroll th:nth-child(8),
.table-panel .table-scroll td:nth-child(8),
.table-panel .table-scroll th:nth-child(9),
.table-panel .table-scroll td:nth-child(9) {
  width: 10%;
}

.table-panel .table-scroll th:nth-child(7),
.table-panel .table-scroll td:nth-child(7) {
  width: 5%;
}

.table-panel .table-scroll th:nth-child(10),
.table-panel .table-scroll td:nth-child(10) {
  width: 11%;
}

.table-panel .stage {
  min-width: 0;
}

.table-panel .stage b,
.table-panel .status-chip {
  white-space: normal;
}

.table-panel .status-chip {
  max-width: 100%;
  text-align: left;
  text-transform: none;
  line-height: 1.2;
}

.table-panel td:nth-child(10) .small-muted {
  max-width: 100%;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .controls {
    grid-template-columns: 1fr !important;
  }

  .table-panel > .panel-head {
    top: 58px;
  }

  .table-scroll thead th {
    top: 154px !important;
  }
}
