:root {
  color-scheme: dark;
  --page: #091018;
  --page-deep: #070c12;
  --sidebar: #0b121a;
  --surface: #101923;
  --surface-raised: #141f2b;
  --surface-soft: #182431;
  --surface-hover: #1b2936;
  --line: #233240;
  --line-strong: #314453;
  --text: #edf3f5;
  --text-soft: #c5d0d5;
  --muted: #84959e;
  --muted-strong: #a2b0b7;
  --accent: #71d6c8;
  --accent-strong: #90e6da;
  --accent-ink: #061310;
  --blue: #70b6e8;
  --violet: #aa9bea;
  --warning: #e9bb69;
  --danger: #eb818a;
  --success: #70d4a0;
  --shadow: 0 22px 70px rgba(0, 0, 0, .27);
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --sidebar-width: 226px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

::selection {
  background: rgba(113, 214, 200, .25);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eyebrow {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.2;
}

.muted-text { color: var(--muted) !important; }
.active-text { color: var(--accent) !important; }
.info-text { color: var(--blue) !important; }
.violet-text { color: var(--violet) !important; }
.warning-text { color: var(--warning) !important; }
.danger-text { color: var(--danger) !important; }
.success-text { color: var(--success) !important; }

.primary-button,
.secondary-button,
.text-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  padding: 8px 16px;
  border: 1px solid rgba(113, 214, 200, .72);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 26px rgba(113, 214, 200, .12);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--text-soft);
}

.secondary-button:hover {
  border-color: rgba(113, 214, 200, .38);
  color: var(--accent);
}

.text-button {
  padding: 8px 5px;
  color: var(--muted-strong);
}

.text-button:hover {
  color: var(--text);
}

.status-pill,
.panel-chip,
.filter-count,
.summary-chips span {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill.active,
.summary-chips .active {
  border-color: rgba(113, 214, 200, .32);
  background: rgba(113, 214, 200, .09);
  color: var(--accent);
}

.status-pill.info,
.summary-chips .info {
  border-color: rgba(112, 182, 232, .32);
  background: rgba(112, 182, 232, .09);
  color: var(--blue);
}

.status-pill.violet,
.summary-chips .violet {
  border-color: rgba(170, 155, 234, .34);
  background: rgba(170, 155, 234, .09);
  color: var(--violet);
}

.status-pill.warning,
.summary-chips .warning {
  border-color: rgba(233, 187, 105, .34);
  background: rgba(233, 187, 105, .09);
  color: var(--warning);
}

.status-pill.danger,
.summary-chips .danger {
  border-color: rgba(235, 129, 138, .34);
  background: rgba(235, 129, 138, .09);
  color: var(--danger);
}

.status-pill.success,
.summary-chips .success {
  border-color: rgba(112, 212, 160, .32);
  background: rgba(112, 212, 160, .09);
  color: var(--success);
}

.tone-dot {
  width: 7px;
  height: 7px;
  display: block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(132, 149, 158, .07);
}

.tone-dot.active { background: var(--accent); box-shadow: 0 0 0 4px rgba(113, 214, 200, .08); }
.tone-dot.info { background: var(--blue); box-shadow: 0 0 0 4px rgba(112, 182, 232, .08); }
.tone-dot.violet { background: var(--violet); box-shadow: 0 0 0 4px rgba(170, 155, 234, .08); }
.tone-dot.warning { background: var(--warning); box-shadow: 0 0 0 4px rgba(233, 187, 105, .08); }
.tone-dot.danger { background: var(--danger); box-shadow: 0 0 0 4px rgba(235, 129, 138, .08); }
.tone-dot.success { background: var(--success); box-shadow: 0 0 0 4px rgba(112, 212, 160, .08); }

/* Shared brand */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand > span {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(144, 230, 218, .45);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent-strong), #54baaF);
  color: #071310;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(113, 214, 200, .14);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: .02em;
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Login */
.login-body {
  background:
    radial-gradient(circle at 13% 12%, rgba(113, 214, 200, .1), transparent 27rem),
    radial-gradient(circle at 88% 92%, rgba(112, 182, 232, .07), transparent 30rem),
    var(--page-deep);
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr);
}

.login-story {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(36px, 6vw, 78px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(113, 214, 200, .04), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0, transparent 99px, rgba(255, 255, 255, .015) 100px),
    repeating-linear-gradient(0deg, transparent 0, transparent 99px, rgba(255, 255, 255, .012) 100px);
}

.login-story::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -240px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(113, 214, 200, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(113, 214, 200, .018), 0 0 0 160px rgba(113, 214, 200, .012);
  pointer-events: none;
}

.brand-large > span {
  width: 44px;
  height: 44px;
  font-size: 19px;
}

.brand-large strong {
  font-size: 19px;
}

.login-story-copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
  padding: 50px 0;
}

.login-story-copy h1 {
  max-width: 660px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 5.7vw, 78px);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: .98;
}

.login-story-copy p {
  max-width: 610px;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.65;
}

.login-story-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.login-story-grid div {
  min-height: 104px;
  padding: 18px;
  background: rgba(11, 18, 26, .91);
}

.login-story-grid strong,
.login-story-grid span {
  display: block;
}

.login-story-grid strong {
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 12px;
}

.login-story-grid span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-card {
  width: min(100%, 410px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(21, 32, 44, .96), rgba(14, 22, 31, .98));
  box-shadow: var(--shadow);
}

.login-card-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
  border: 1px solid rgba(113, 214, 200, .18);
  border-radius: 15px;
  background: rgba(113, 214, 200, .055);
}

.login-card-mark i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(113, 214, 200, .07);
}

.login-card h2 {
  margin: 9px 0 7px;
  font-size: 25px;
  letter-spacing: -.035em;
}

.login-lead {
  margin: 0 0 26px;
  color: var(--muted);
}

.form-alert {
  display: grid;
  gap: 2px;
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid rgba(235, 129, 138, .27);
  border-radius: 9px;
  background: rgba(235, 129, 138, .07);
  color: var(--danger);
  font-size: 11px;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-form label,
.filter-panel label {
  display: grid;
  gap: 6px;
}

.login-form label > span,
.filter-panel label > span:first-child {
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: #0d151e;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.login-form input {
  min-height: 46px;
  padding: 10px 12px;
}

.login-form input:hover,
.filter-panel input:hover,
.filter-panel select:hover {
  border-color: var(--line-strong);
}

.login-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(113, 214, 200, .57);
  box-shadow: 0 0 0 3px rgba(113, 214, 200, .075);
  background: #101a24;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  justify-content: space-between;
  margin-top: 7px;
}

.login-submit span {
  font-size: 17px;
}

.login-help {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

/* Application shell */
.app-body {
  background:
    radial-gradient(circle at 75% 0, rgba(112, 182, 232, .035), transparent 28rem),
    var(--page);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 14px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(113, 214, 200, .025), transparent 28%),
    var(--sidebar);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.sidebar > .brand {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 8px 18px;
}

.main-nav {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.nav-group {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
}

.nav-group[open] {
  border-color: rgba(113, 214, 200, .1);
  background: rgba(255, 255, 255, .018);
}

.nav-group summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary i { font-style: normal; transition: transform .16s ease; }
.nav-group[open] summary i { transform: rotate(180deg); }

.nav-group-items {
  display: grid;
  gap: 3px;
  padding: 0 5px 5px;
}

.nav-group-items a { padding-left: 12px; }

.main-nav a {
  min-height: 37px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted-strong);
  font-size: 11px;
  text-decoration: none;
}

.main-nav a i {
  width: 24px;
  color: #526675;
  font-size: 8px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, .025);
  color: var(--text);
}

.main-nav a.active {
  border-color: rgba(113, 214, 200, .22);
  background: rgba(113, 214, 200, .065);
  color: var(--accent);
}

.main-nav a.active i {
  color: var(--accent);
}

.sidebar-context {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: 16px;
  padding: 12px 10px;
  border: 1px solid rgba(112, 182, 232, .14);
  border-radius: 10px;
  background: rgba(112, 182, 232, .035);
}

.context-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(112, 182, 232, .06);
}

.sidebar-context strong,
.sidebar-context small {
  display: block;
}

.sidebar-context strong {
  color: var(--text-soft);
  font-size: 9px;
}

.sidebar-context small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.sidebar-user {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
}

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

.user-copy strong,
.user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 9px;
}

.user-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.logout-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.logout-button:hover {
  background: var(--surface-soft);
  color: var(--danger);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px clamp(18px, 2.3vw, 34px);
  border-bottom: 1px solid rgba(35, 50, 64, .88);
  background: rgba(9, 16, 24, .88);
  backdrop-filter: blur(18px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.topbar-title span,
.topbar-title strong {
  display: block;
}

.topbar-title span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.topbar-title strong {
  margin-top: 3px;
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.filter-count {
  border-color: rgba(113, 214, 200, .2);
  color: var(--accent);
}

.presentation-launch {
  padding: 7px 10px;
  border: 1px solid rgba(113, 214, 200, .24);
  border-radius: 8px;
  background: rgba(113, 214, 200, .055);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.presentation-launch:hover { border-color: rgba(113, 214, 200, .52); background: rgba(113, 214, 200, .1); }

.system-state {
  color: var(--muted-strong);
  font-size: 9px;
  white-space: nowrap;
}

.system-state b {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(112, 212, 160, .07);
}

.menu-button {
  width: 36px;
  height: 36px;
  display: none;
  place-items: center;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.menu-button span {
  width: 15px;
  height: 1px;
  display: block;
  background: var(--text-soft);
}

.content {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px clamp(18px, 2.3vw, 34px) 42px;
}

.page-heading {
  min-height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
}

.page-heading h1 {
  margin: 7px 0 5px;
  font-size: clamp(23px, 2.1vw, 32px);
  font-weight: 680;
  letter-spacing: -.038em;
  line-height: 1.12;
}

.page-heading p {
  max-width: 770px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.heading-meta {
  min-width: 116px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1px 8px;
  padding: 11px 13px;
  border-left: 1px solid var(--line-strong);
}

.heading-meta span,
.heading-meta small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .08em;
}

.heading-meta strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1.7fr) repeat(4, minmax(122px, .75fr)) auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 25, 35, .9);
}

.filter-panel input,
.filter-panel select {
  min-height: 38px;
  padding: 7px 10px;
}

.filter-panel select {
  padding-right: 28px;
  cursor: pointer;
}

.input-with-icon {
  position: relative;
  display: block;
}

.input-with-icon i {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  width: 9px;
  height: 9px;
  transform: translateY(-60%);
  border: 1px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.input-with-icon i::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 5px;
  height: 1px;
  transform: rotate(45deg);
  background: var(--muted);
}

.input-with-icon input {
  padding-left: 33px;
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-card {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 10px;
  padding: 13px 15px;
  border-left: 1px solid var(--line);
}

.metric-card:first-child {
  border-left: 0;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 1px;
  background: transparent;
}

.metric-card.warning::after { background: rgba(233, 187, 105, .38); }
.metric-card.danger::after { background: rgba(235, 129, 138, .38); }
.metric-card.success::after { background: rgba(112, 212, 160, .32); }
.metric-card.info::after { background: rgba(112, 182, 232, .34); }

.metric-card span,
.metric-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
}

.metric-card strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--text);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric-card.warning strong { color: var(--warning); }
.metric-card.danger strong { color: var(--danger); }
.metric-card.success strong { color: var(--success); }
.metric-card.info strong { color: var(--blue); }

.metric-card small {
  color: var(--muted);
  font-size: 8px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.08fr .9fr .96fr;
  gap: 12px;
  margin-bottom: 12px;
}

.panel,
.detail-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .07);
}

.panel-header,
.detail-panel > header {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.detail-panel > header h2 {
  margin: 4px 0 0;
  font-size: 13px;
  letter-spacing: -.015em;
}

.panel-header > strong {
  color: var(--accent);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.bars {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(96px, .9fr) minmax(80px, 1.2fr) 54px;
  align-items: center;
  gap: 10px;
}

.bar-row > span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row > b {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar-row > b i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--muted);
}

.bar-row.active > b i { background: var(--accent); }
.bar-row.info > b i { background: var(--blue); }
.bar-row.violet > b i { background: var(--violet); }
.bar-row.warning > b i { background: var(--warning); }
.bar-row.danger > b i { background: var(--danger); }
.bar-row.success > b i { background: var(--success); }

.bar-row > strong {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.bar-row > strong small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
}

.attention-list {
  display: grid;
}

.attention-row {
  min-height: 55px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
}

.attention-row:first-child {
  border-top: 0;
}

.attention-row > span,
.attention-row strong,
.attention-row small {
  display: block;
  min-width: 0;
}

.attention-row strong {
  color: var(--text-soft);
  font-size: 9px;
}

.attention-row small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-row > b {
  min-width: 25px;
  text-align: right;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.estimate-book {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.estimate-book span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.estimate-book strong {
  color: var(--text-soft);
  font-size: 12px;
}

.estimate-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.estimate-stats div {
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface);
}

.estimate-stats span {
  color: var(--muted);
  font-size: 8px;
}

.estimate-stats strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.estimate-panel > p {
  margin: 0;
  padding: 11px 14px 13px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.portfolio-panel {
  scroll-margin-top: 78px;
}

.portfolio-header {
  min-height: 61px;
}

.result-summary {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  max-height: min(62vh, 700px);
  scrollbar-color: var(--line-strong) var(--surface);
}

.table-wrap:focus-visible {
  outline-offset: -3px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-panel table {
  min-width: 1440px;
}

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

th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #111b25;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--text-soft);
  font-size: 9px;
}

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

tbody tr:hover td {
  background: rgba(255, 255, 255, .015);
}

td > strong,
td > small {
  display: block;
}

td > strong {
  font-size: 9px;
  line-height: 1.4;
}

td > small {
  max-width: 240px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-name {
  width: 285px;
  display: block;
  text-decoration: none;
}

.project-name span,
.project-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-name span {
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
}

.project-name small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.project-name:hover span {
  color: var(--accent);
}

.open-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted-strong);
  font-size: 14px;
  text-decoration: none;
}

.open-button:hover {
  border-color: rgba(113, 214, 200, .38);
  color: var(--accent);
}

.pagination {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.pagination > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pagination a,
.pagination > div > span,
.pagination > div > strong {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
}

.pagination a:hover {
  border-color: rgba(113, 214, 200, .35);
  color: var(--accent);
}

.pagination > div > span[aria-disabled="true"] {
  opacity: .42;
}

.pagination > div > strong {
  min-width: 30px;
  justify-content: center;
  border-color: rgba(113, 214, 200, .22);
  color: var(--accent);
}

.empty-state {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  text-align: center;
}

.empty-orbit {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.empty-orbit i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(113, 214, 200, .045);
}

.empty-state h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.empty-state p {
  max-width: 520px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-scrim {
  display: none;
}

/* Project detail */
.detail-body {
  background: var(--page-deep);
}

.detail-backdrop {
  min-height: 100vh;
  padding: clamp(12px, 2.2vw, 34px);
  background:
    radial-gradient(circle at 16% 2%, rgba(113, 214, 200, .07), transparent 27rem),
    radial-gradient(circle at 94% 15%, rgba(170, 155, 234, .05), transparent 24rem),
    var(--page-deep);
}

.detail-dialog {
  width: min(1540px, 100%);
  min-height: calc(100vh - clamp(24px, 4.4vw, 68px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0d151e;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .38);
}

.detail-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 67px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 21, 30, .92);
  backdrop-filter: blur(18px);
}

.back-button,
.close-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 16px;
  text-decoration: none;
}

.back-button:hover,
.close-button:hover {
  border-color: rgba(113, 214, 200, .34);
  color: var(--accent);
}

.detail-topbar-copy {
  min-width: 0;
}

.detail-topbar-copy span,
.detail-topbar-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-topbar-copy strong {
  margin-top: 3px;
  font-size: 11px;
}

.detail-topbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-topbar-status > span:last-child {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.detail-content {
  padding: clamp(17px, 2.3vw, 32px);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr);
  align-items: end;
  gap: 36px;
  padding: 6px 3px 23px;
}

.project-kicker {
  display: block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
}

.detail-hero h1 {
  max-width: 970px;
  margin: 9px 0 13px;
  font-size: clamp(23px, 2.5vw, 37px);
  font-weight: 660;
  letter-spacing: -.04em;
  line-height: 1.12;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-tags > span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .015);
  color: var(--muted-strong);
  font-size: 8px;
}

.hero-owner {
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--line-strong);
}

.hero-owner span,
.hero-owner strong,
.hero-owner small {
  display: block;
}

.hero-owner span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}

.hero-owner strong {
  margin: 5px 0 4px;
  font-size: 13px;
}

.hero-owner small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-metrics article {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  border-left: 1px solid var(--line);
}

.detail-metrics article:first-child {
  border-left: 0;
}

.detail-metrics span,
.detail-metrics small {
  color: var(--muted);
  font-size: 8px;
}

.detail-metrics strong {
  margin: 4px 0 2px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 25, 35, .67);
}

.process-rail > div {
  position: relative;
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.process-rail > div::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  right: calc(100% - 6px);
  left: -100%;
  height: 1px;
  background: var(--line-strong);
}

.process-rail > div:first-child::before {
  display: none;
}

.process-rail i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.process-rail .complete {
  color: var(--muted-strong);
}

.process-rail .complete::before,
.process-rail .complete i {
  border-color: var(--success);
  background: var(--success);
}

.process-rail .current {
  color: var(--accent);
}

.process-rail .current::before {
  background: var(--success);
}

.process-rail .current i {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(113, 214, 200, .08);
}

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

.detail-panel {
  align-self: start;
}

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

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

.definition-grid > div {
  min-width: 0;
  min-height: 62px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.definition-grid > div:nth-child(-n + 2) {
  border-top: 0;
}

.definition-grid > div:nth-child(odd) {
  border-left: 0;
}

.definition-grid > div.wide {
  grid-column: span 2;
  border-left: 0;
}

.definition-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.definition-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 650;
}

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

.finance-values div {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  background: var(--surface);
}

.finance-values span {
  color: var(--muted);
  font-size: 8px;
}

.finance-values strong {
  margin-top: 6px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.finance-panel > p {
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.summary-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.detail-table-wrap {
  overflow: auto;
}

.detail-table {
  min-width: 930px;
}

.detail-table th {
  position: static;
}

.detail-table td {
  min-width: 112px;
}

.detail-table td:first-child {
  min-width: 190px;
}

.detail-table td:last-child {
  max-width: 320px;
  white-space: normal;
}

.detail-table td span,
.detail-table td small {
  display: block;
}

.detail-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.review-list,
.deadline-list {
  display: grid;
}

.review-list article,
.deadline-list article {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
}

.review-list article:first-child,
.deadline-list article:first-child {
  border-top: 0;
}

.review-list .tone-dot,
.deadline-list .tone-dot {
  margin-top: 5px;
}

.review-list strong,
.review-list span,
.deadline-list strong,
.deadline-list span,
.deadline-list small {
  display: block;
}

.review-list strong,
.deadline-list strong {
  color: var(--text-soft);
  font-size: 10px;
}

.review-list strong small {
  min-height: 17px;
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(113, 214, 200, .08);
  color: var(--accent);
  font-size: 7px;
}

.review-list span,
.deadline-list span,
.deadline-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.review-list p,
.deadline-list p {
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.55;
}

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

.estimate-card-grid > article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1720;
}

.estimate-card-grid > article > header,
.estimate-card-grid > article > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.estimate-card-grid header span:first-child,
.estimate-card-grid header strong,
.estimate-card-grid header small,
.estimate-card-grid footer span,
.estimate-card-grid footer small {
  display: block;
  min-width: 0;
}

.estimate-card-grid header strong {
  font-size: 10px;
}

.estimate-card-grid header small,
.estimate-card-grid footer small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.estimate-card-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.estimate-card-values div {
  padding: 10px 12px;
  background: var(--surface);
}

.estimate-card-values span,
.estimate-card-values strong {
  display: block;
}

.estimate-card-values span {
  color: var(--muted);
  font-size: 8px;
}

.estimate-card-values strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.match-bar > span {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-soft);
}

.match-bar i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

.match-bar strong {
  color: var(--accent);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.estimate-card-grid > article > footer {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 8px;
}

.estimate-card-grid > article > footer small {
  max-width: 45%;
  margin: 0;
  text-align: right;
}

.characteristic-list {
  display: grid;
}

.characteristic-list > div {
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
}

.characteristic-list > div:first-child {
  border-top: 0;
}

.characteristic-list span,
.characteristic-list strong,
.characteristic-list small {
  display: block;
}

.characteristic-list strong {
  color: var(--text-soft);
  font-size: 9px;
}

.characteristic-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.characteristic-list b {
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.timeline {
  margin: 0;
  padding: 5px 14px 8px 37px;
  list-style: none;
}

.timeline li {
  position: relative;
  min-height: 60px;
  padding: 11px 0 11px 7px;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -17px;
  width: 1px;
  background: var(--line-strong);
}

.timeline li:first-child::before {
  top: 19px;
}

.timeline li:last-child::before {
  bottom: calc(100% - 20px);
}

.timeline li > i {
  position: absolute;
  z-index: 1;
  top: 17px;
  left: -21px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  color: var(--text-soft);
  font-size: 9px;
}

.timeline span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.timeline p {
  margin: 6px 0 0;
  color: var(--muted-strong);
  font-size: 9px;
}

.inline-empty {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
}

.inline-empty.roomy {
  min-height: 175px;
}

.inline-empty strong,
.inline-empty span {
  display: block;
}

.inline-empty strong {
  color: var(--text-soft);
  font-size: 11px;
}

.inline-empty span {
  max-width: 520px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1320px) {
  .filter-panel {
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, .7fr)) auto;
  }

  .filter-panel label:nth-of-type(4),
  .filter-panel label:nth-of-type(5) {
    grid-row: 2;
  }

  .filter-actions {
    grid-column: -2;
    grid-row: 2;
  }

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

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

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

@media (max-width: 1030px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    width: var(--sidebar-width);
    box-shadow: 25px 0 60px rgba(0, 0, 0, .32);
    transition: transform .18s ease;
  }

  .menu-button {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    border: 0;
    background: rgba(4, 8, 12, .66);
    backdrop-filter: blur(3px);
    cursor: pointer;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  body.menu-open .sidebar-scrim {
    display: block;
  }

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

  .detail-metrics article:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-metrics article:nth-child(5) {
    grid-column: span 2;
    border-top: 1px solid var(--line);
  }

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

  .detail-panel.span-2 {
    grid-column: auto;
  }
}

@media (max-width: 790px) {
  .login-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-story {
    min-height: auto;
    padding: 32px 24px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-story-copy {
    padding: 70px 0 50px;
  }

  .login-story-grid div {
    min-height: 90px;
    padding: 13px;
  }

  .login-panel {
    min-height: auto;
    padding: 38px 20px 54px;
  }

  .topbar-actions .filter-count {
    display: none;
  }

  .page-heading {
    min-height: 0;
    align-items: start;
    margin-bottom: 14px;
  }

  .heading-meta {
    min-width: 98px;
  }

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

  .filter-panel label,
  .filter-panel label:nth-of-type(4),
  .filter-panel label:nth-of-type(5) {
    grid-row: auto;
  }

  .filter-panel .search-field,
  .filter-actions {
    grid-column: span 2;
  }

  .filter-actions {
    grid-row: auto;
  }

  .filter-actions .primary-button {
    min-width: 120px;
  }

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

  .metric-card {
    border-top: 1px solid var(--line);
  }

  .metric-card:nth-child(-n + 2) {
    border-top: 0;
  }

  .metric-card:nth-child(odd) {
    border-left: 0;
  }

  .metric-card:last-child {
    grid-column: span 2;
  }

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

  .estimate-panel {
    grid-column: auto;
  }

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

  .detail-backdrop {
    padding: 0;
  }

  .detail-dialog {
    min-height: 100vh;
    border-width: 0;
    border-radius: 0;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .hero-owner {
    padding-left: 0;
    border-left: 0;
  }

  .process-rail {
    grid-template-columns: repeat(6, minmax(118px, 1fr));
    overflow-x: auto;
  }

  .estimate-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .login-story-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-story-grid div {
    min-height: auto;
  }

  .login-card {
    padding: 27px 22px;
  }

  .topbar {
    min-height: 58px;
    padding: 8px 13px;
  }

  .topbar-title span {
    display: none;
  }

  .topbar-actions {
    display: none;
  }

  .content {
    padding: 19px 13px 32px;
  }

  .page-heading {
    display: block;
  }

  .heading-meta {
    width: fit-content;
    margin-top: 15px;
    padding: 7px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .filter-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-panel .search-field,
  .filter-actions {
    grid-column: auto;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .primary-button {
    flex: 1;
  }

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

  .metric-card,
  .metric-card:nth-child(-n + 2) {
    min-height: 66px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-card:first-child {
    border-top: 0;
  }

  .metric-card:last-child {
    grid-column: auto;
  }

  .bar-row {
    grid-template-columns: minmax(84px, 1fr) minmax(65px, 1fr) 46px;
  }

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

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

  .result-summary {
    white-space: normal;
    text-align: right;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .detail-topbar-status {
    display: none;
  }

  .detail-content {
    padding: 15px 12px 28px;
  }

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

  .detail-metrics article,
  .detail-metrics article:nth-child(4),
  .detail-metrics article:nth-child(5) {
    grid-column: auto;
    border-top: 1px solid var(--line);
  }

  .detail-metrics article:nth-child(-n + 2) {
    border-top: 0;
  }

  .detail-metrics article:nth-child(odd) {
    border-left: 0;
  }

  .detail-metrics article:last-child {
    grid-column: span 2;
  }

  .definition-grid,
  .finance-values,
  .estimate-card-values {
    grid-template-columns: minmax(0, 1fr);
  }

  .definition-grid > div,
  .definition-grid > div:nth-child(-n + 2),
  .definition-grid > div:nth-child(odd),
  .definition-grid > div.wide {
    grid-column: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .definition-grid > div:first-child {
    border-top: 0;
  }

  .summary-chips {
    display: none;
  }

  .estimate-card-grid > article > footer {
    display: grid;
  }

  .estimate-card-grid > article > footer small {
    max-width: 100%;
    text-align: left;
  }
}

/* Authorized editing and account surfaces */
.user-actions,
.detail-topbar-actions,
.panel-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.account-button,
.logout-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  text-decoration: none;
}

.account-button:hover {
  background: var(--surface-soft);
  color: var(--accent);
}

.message-stack {
  position: fixed;
  z-index: 200;
  top: 14px;
  right: 14px;
  width: min(390px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
}

.app-message {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 13px;
  border: 1px solid rgba(112, 182, 232, .28);
  border-radius: 10px;
  background: rgba(16, 25, 35, .97);
  color: var(--text-soft);
  box-shadow: var(--shadow);
  font-size: 10px;
  backdrop-filter: blur(16px);
}

.app-message.success { border-color: rgba(112, 212, 160, .3); }
.app-message.error { border-color: rgba(235, 129, 138, .32); }
.app-message.warning { border-color: rgba(233, 187, 105, .32); }

.app-message button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  cursor: pointer;
}

.app-message.is-closing {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .15s ease, transform .15s ease;
}

.detail-edit-button,
.panel-edit-button,
.row-edit-button {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid rgba(113, 214, 200, .28);
  border-radius: 8px;
  background: rgba(113, 214, 200, .07);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.detail-edit-button:hover,
.panel-edit-button:hover,
.row-edit-button:hover {
  border-color: rgba(113, 214, 200, .5);
  background: rgba(113, 214, 200, .12);
}

.detail-edit-button {
  min-height: 34px;
  padding-inline: 12px;
}

.row-edit-button {
  min-height: 27px;
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--muted-strong);
}

.finance-values.four-values {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-values.four-values strong {
  font-size: 13px;
}

.financial-stats strong {
  max-width: 155px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dialog-open {
  overflow: hidden;
}

.edit-dialog {
  width: min(820px, calc(100vw - 28px));
  max-width: none;
  max-height: min(88vh, 900px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  outline: 0;
  background: #0e1720;
  color: var(--text);
  box-shadow: 0 35px 110px rgba(0, 0, 0, .58);
  scrollbar-color: var(--line-strong) var(--surface);
}

.edit-dialog::backdrop {
  background: rgba(3, 7, 11, .76);
  backdrop-filter: blur(6px);
}

.dialog-shell.compact-dialog {
  max-width: 680px;
  margin: 0 auto;
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 23, 32, .96);
  backdrop-filter: blur(16px);
}

.dialog-header h2 {
  margin: 4px 0 2px;
  font-size: 16px;
  letter-spacing: -.025em;
}

.dialog-header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.dialog-header > button {
  width: 31px;
  height: 31px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 15px;
}

.dialog-header > button:hover {
  border-color: rgba(235, 129, 138, .34);
  color: var(--danger);
}

.dialog-form {
  padding: 18px;
}

.dialog-form > .form-alert {
  margin-bottom: 13px;
}

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

.form-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field.form-wide,
.form-wide {
  grid-column: span 2;
}

.form-field > label,
.form-field > legend {
  padding: 0;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: #0a121a;
  color: var(--text);
  resize: vertical;
}

.form-field input[type="file"] {
  min-height: 48px !important;
  padding: 8px !important;
  cursor: pointer;
}

.form-field input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-soft);
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(113, 214, 200, .57);
  box-shadow: 0 0 0 3px rgba(113, 214, 200, .075);
}

.form-field > small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: rgba(235, 129, 138, .52);
}

.field-error {
  color: var(--danger);
  font-size: 8px;
  line-height: 1.4;
}

.check-control {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a121a;
  color: var(--text-soft) !important;
  cursor: pointer;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.check-control input,
.choice-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.choice-grid > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.choice-grid label {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a121a;
  color: var(--text-soft);
  font-size: 9px;
  cursor: pointer;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin: 18px -18px -18px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: rgba(9, 16, 24, .5);
}

.upload-note {
  display: grid;
  gap: 3px;
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid rgba(112, 182, 232, .17);
  border-radius: 9px;
  background: rgba(112, 182, 232, .04);
}

.upload-note strong {
  color: var(--blue);
  font-size: 9px;
}

.upload-note span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.errorlist {
  margin: 0;
  padding: 0;
  color: var(--danger);
  font-size: 9px;
  list-style: none;
}

.account-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.account-card {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-card > .brand {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.account-heading {
  padding: 24px 22px 5px;
}

.account-heading h1 {
  margin: 7px 0 5px;
  font-size: 23px;
  letter-spacing: -.035em;
}

.account-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.account-form {
  padding: 18px 22px 22px;
}

.account-form .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.account-form .form-field {
  grid-column: auto;
  margin-bottom: 13px;
}

.account-form .dialog-actions {
  margin: 20px -22px -22px;
  padding-inline: 22px;
}

@media (max-width: 790px) {
  .detail-edit-button {
    min-width: 34px;
    padding-inline: 8px;
    font-size: 0;
  }

  .detail-edit-button::before {
    content: "✎";
    font-size: 12px;
  }

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

@media (max-width: 560px) {
  .user-actions {
    gap: 2px;
  }

  .detail-topbar-actions {
    gap: 5px;
  }

  .edit-dialog {
    width: 100vw;
    max-height: 100vh;
    border-width: 0;
    border-radius: 0;
  }

  .form-grid,
  .choice-grid > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-field.form-wide,
  .form-wide {
    grid-column: auto;
  }

  .dialog-header,
  .dialog-form {
    padding-inline: 14px;
  }

  .dialog-actions {
    margin-right: -14px;
    margin-left: -14px;
    padding-inline: 14px;
  }

  .finance-values.four-values {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Dashboard: analytical overview stays separate from the operational pool. */
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 18px;
  margin-top: 18px;
}

.province-panel,
.operation-gateways { min-height: 390px; }

.province-bars { max-height: 470px; overflow: auto; padding-right: 4px; }

.province-bars .bar-row {
  display: grid;
  grid-template-columns: minmax(155px, 1fr) minmax(110px, 1.8fr) 46px;
  align-items: center;
  gap: 12px;
  padding: 8px 3px;
  color: inherit;
  text-decoration: none;
}

.province-bars .bar-row > span small {
  display: block;
  margin-top: 3px;
  color: #7f94a2;
  font-size: .63rem;
}

.province-bars .bar-row:hover > span { color: #62ddd2; }

.gateway-list {
  display: grid;
  gap: 11px;
  margin-top: 13px;
}

.gateway-list > a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid rgba(115, 143, 163, .18);
  border-radius: 14px;
  color: #dce9ed;
  background: rgba(8, 18, 26, .45);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.gateway-list > a:hover {
  border-color: rgba(69, 207, 195, .42);
  background: rgba(35, 122, 116, .09);
  transform: translateY(-1px);
}

.gateway-list i {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(81, 210, 198, .25);
  border-radius: 11px;
  color: #5dd8ce;
  font-size: .65rem;
  font-style: normal;
}

.gateway-list span strong,
.gateway-list span small { display: block; }
.gateway-list span strong { font-size: .86rem; }
.gateway-list span small { margin-top: 4px; color: #8497a4; font-size: .68rem; line-height: 1.35; }
.gateway-list > a > b { color: #58d5ca; font-size: 1rem; }

@media (max-width: 1050px) {
  .dashboard-lower-grid { grid-template-columns: 1fr; }
  .province-panel,
  .operation-gateways { min-height: auto; }
}

@media (max-width: 620px) {
  .province-bars .bar-row { grid-template-columns: minmax(130px, 1fr) 38px; }
  .province-bars .bar-row > b { display: none; }
}

/* Executive dashboard v2: compact decision view, scoped to the dashboard only. */
.dashboard-content {
  max-width: 1500px;
  padding-top: 20px;
}

.dashboard-heading {
  min-height: 78px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 14px;
}

.dashboard-heading h1 {
  margin: 6px 0 4px;
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.dashboard-heading p,
.panel-header p,
.exception-intro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.scope-summary {
  min-width: 230px;
  display: grid;
  gap: 2px;
  padding: 11px 0 5px 18px;
  border-left: 1px solid var(--line-strong);
}

.scope-summary span,
.scope-summary small {
  color: var(--muted);
  font-size: 9px;
}

.scope-summary span {
  font-weight: 800;
  letter-spacing: .1em;
}

.scope-summary strong {
  font-size: 14px;
}

.dashboard-scope-bar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(160px, .68fr) minmax(150px, .58fr) auto;
  align-items: end;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(20, 31, 43, .96), rgba(14, 23, 32, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

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

.dashboard-scope-bar label > span {
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.dashboard-scope-bar select {
  min-height: 38px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #0c151e;
  color: var(--text-soft);
  cursor: pointer;
}

.dashboard-scope-bar select:focus {
  border-color: rgba(113, 214, 200, .54);
  box-shadow: 0 0 0 3px rgba(113, 214, 200, .07);
}

.scope-bar-copy {
  align-self: center;
}

.scope-bar-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.scope-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auto-filter-note {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.live-filter-panel.is-submitting input,
.live-filter-panel.is-submitting select {
  opacity: .62;
}

.dashboard-scope-bar.is-submitting select { opacity: .62; }

.dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 15, 22, .72);
}

.dashboard-tab {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted-strong);
  text-decoration: none;
}

.dashboard-tab:hover {
  background: rgba(255, 255, 255, .02);
  color: var(--text);
}

.dashboard-tab.active {
  border-color: rgba(113, 214, 200, .26);
  background: linear-gradient(135deg, rgba(113, 214, 200, .095), rgba(112, 182, 232, .035));
  color: var(--text);
  box-shadow: inset 0 -1px rgba(113, 214, 200, .15);
}

.dashboard-tab > i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.dashboard-tab.active > i {
  border-color: rgba(113, 214, 200, .35);
  color: var(--accent);
}

.dashboard-tab strong,
.dashboard-tab small {
  display: block;
}

.dashboard-tab strong { font-size: 11px; }
.dashboard-tab small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.dashboard-tab-panel {
  display: grid;
  gap: 12px;
}

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

.portfolio-kpi-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.monetary-kpi-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.decision-kpi {
  position: relative;
  min-width: 0;
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(155deg, rgba(20, 31, 43, .96), rgba(14, 23, 32, .97));
}

.decision-kpi-link {
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}

.decision-kpi-link:hover {
  border-color: rgba(235, 129, 138, .34);
  transform: translateY(-1px);
}

.decision-kpi::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 0 0 0 44px;
  background: rgba(132, 149, 158, .06);
}

.decision-kpi.info::after { background: rgba(112, 182, 232, .08); }
.decision-kpi.warning::after { background: rgba(233, 187, 105, .08); }
.decision-kpi.danger::after { background: rgba(235, 129, 138, .08); }
.decision-kpi.success::after { background: rgba(112, 212, 160, .08); }
.decision-kpi.violet::after { background: rgba(170, 155, 234, .08); }

.decision-kpi span,
.decision-kpi small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-kpi span {
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 750;
}

.decision-kpi strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.decision-kpi.info strong { color: var(--blue); }
.decision-kpi.warning strong { color: var(--warning); }
.decision-kpi.danger strong { color: var(--danger); }
.decision-kpi.success strong { color: var(--success); }
.decision-kpi.violet strong { color: var(--violet); }
.decision-kpi small { color: var(--muted); font-size: 8px; }

.decision-kpi-value {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 3px 0 2px;
}

.decision-kpi-value > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-kpi-value > b {
  min-height: 20px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, .025);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.decision-kpi.info .decision-kpi-value > b { border-color: rgba(112, 182, 232, .24); color: var(--blue); }
.decision-kpi.warning .decision-kpi-value > b { border-color: rgba(233, 187, 105, .24); color: var(--warning); }
.decision-kpi.danger .decision-kpi-value > b { border-color: rgba(235, 129, 138, .24); color: var(--danger); }
.decision-kpi.success .decision-kpi-value > b { border-color: rgba(112, 212, 160, .22); color: var(--success); }
.decision-kpi.violet .decision-kpi-value > b { border-color: rgba(170, 155, 234, .24); color: var(--violet); }

.monetary-kpi-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -3px 1px -5px;
  color: var(--muted);
}

.monetary-kpi-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
}

.monetary-kpi-heading i {
  width: 18px;
  height: 1px;
  display: inline-block;
  background: var(--accent);
}

.monetary-kpi-heading small {
  color: var(--muted);
  font-size: 8px;
}

.decision-kpi.monetary {
  min-height: 82px;
  border-color: rgba(49, 68, 83, .76);
  background: linear-gradient(155deg, rgba(17, 29, 39, .94), rgba(12, 21, 29, .96));
}

.decision-kpi.monetary::after {
  width: 34px;
  height: 34px;
  border-radius: 0 0 0 34px;
}

.decision-kpi.monetary strong {
  font-size: clamp(16px, 1.25vw, 20px);
  letter-spacing: -.02em;
}

.decision-kpi.monetary > span {
  color: var(--muted-strong);
}

.dashboard-data-alerts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-data-alerts.single { grid-template-columns: minmax(0, 1fr); }

.dashboard-data-alerts > a {
  min-height: 48px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: inherit;
  background: rgba(16, 25, 35, .68);
  text-decoration: none;
}

.dashboard-data-alerts > a:hover { border-color: rgba(113, 214, 200, .28); }
.dashboard-data-alerts span strong,
.dashboard-data-alerts span small { display: block; }
.dashboard-data-alerts span strong { color: var(--text-soft); font-size: 9px; }
.dashboard-data-alerts span small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.dashboard-data-alerts > a > b { font-size: 16px; font-variant-numeric: tabular-nums; }

/* Scoped executive diagnostics: modification values and realised performance. */
.program-diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(220px, .28fr) minmax(0, 1.72fr);
  gap: 12px;
}

.program-diagnostic-grid > .decision-kpi { min-height: 154px; }

.modification-diagnostic-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, var(--specular), transparent 30%),
    var(--glass);
  box-shadow: var(--shadow-layered);
}

.modification-diagnostic-card > header {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}

.modification-diagnostic-card > header span,
.modification-diagnostic-card > header small,
.modification-diagnostic-card > header strong { display: block; }
.modification-diagnostic-card > header span > small {
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
}
.modification-diagnostic-card > header span > strong { margin-top: 3px; font-size: 16px; }
.modification-diagnostic-card > header > b {
  flex: none;
  color: var(--text);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.modification-diagnostic-card > header > b small {
  margin-top: 1px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 650;
}

.modification-diagnostic-values {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.modification-diagnostic-values > div {
  min-width: 0;
  min-height: 83px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
}
.modification-diagnostic-values > div:last-child { border-right: 0; }
.modification-diagnostic-values span,
.modification-diagnostic-values strong,
.modification-diagnostic-values small { display: block; }
.modification-diagnostic-values span { color: var(--muted-strong); font-size: 10px; }
.modification-diagnostic-values strong {
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(13px, 1.05vw, 17px);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.modification-diagnostic-values small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.performance-overview-card { overflow: hidden; }
.performance-overview-card .panel-header { align-items: center; }
.performance-legend { display: flex; align-items: center; gap: 13px; color: var(--muted-strong); font-size: 11px; }
.performance-legend span { display: inline-flex; align-items: center; gap: 6px; }
.performance-legend i { width: 10px; height: 10px; border-radius: 3px; }
.performance-legend .drawing i,
.performance-period span.drawing { background: var(--blue); }
.performance-legend .approval i,
.performance-period span.approval { background: var(--success); }

.performance-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.performance-chart {
  min-width: 0;
  margin: 0;
  padding: 13px 14px 15px;
  background: var(--surface);
}

.performance-chart figcaption {
  min-height: 39px;
  display: flex;
  align-items: start;
  gap: 13px;
  color: var(--text-soft);
}
.performance-chart figcaption > span { margin-right: auto; }
.performance-chart figcaption strong,
.performance-chart figcaption small { display: block; }
.performance-chart figcaption > span strong { font-size: 14px; }
.performance-chart figcaption > span small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.performance-chart figcaption > b { color: var(--blue); font-size: 17px; font-variant-numeric: tabular-nums; }
.performance-chart figcaption > b:last-child { color: var(--success); }
.performance-chart figcaption > b small { display: inline; color: var(--muted); font-size: 9px; font-weight: 650; }

.performance-bars {
  min-height: 207px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: clamp(3px, .55vw, 8px);
  margin-top: 8px;
  padding: 16px 7px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    repeating-linear-gradient(to top, transparent 0, transparent 46px, rgba(122, 145, 155, .1) 47px),
    rgba(8, 14, 19, .23);
}
.performance-bars.monthly { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.performance-period { min-width: 0; display: grid; align-items: end; gap: 7px; }
.performance-period > div {
  height: 155px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.performance-period span {
  position: relative;
  width: min(39%, 18px);
  min-width: 5px;
  height: max(2px, var(--performance-height));
  display: block;
  border-radius: 4px 4px 1px 1px;
  opacity: .9;
}
.performance-period:hover span { opacity: 1; filter: brightness(1.12); }
.performance-period span b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  color: var(--muted-strong);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}
.performance-period > small {
  min-height: 24px;
  color: var(--muted);
  font-size: clamp(7px, .52vw, 9px);
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .program-diagnostic-grid { grid-template-columns: minmax(0, 1fr); }
  .program-diagnostic-grid > .decision-kpi { min-height: 112px; }
  .performance-chart-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .modification-diagnostic-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modification-diagnostic-values > div { border-bottom: 1px solid var(--line); }
  .modification-diagnostic-values > div:nth-child(even) { border-right: 0; }
  .modification-diagnostic-values > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .performance-bars { gap: 2px; padding-inline: 3px; }
  .performance-period > small { font-size: 7px; }
  .performance-period span b { display: none; }
}

.stale-overview-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) auto minmax(260px, .85fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 14px;
  border: 1px solid rgba(235, 129, 138, .2);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0, rgba(235, 129, 138, .075), transparent 32%),
    linear-gradient(145deg, rgba(20, 30, 40, .95), rgba(13, 22, 30, .96));
}

.stale-overview-card.success { border-color: rgba(112, 212, 160, .17); }

.stale-overview-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.stale-overview-heading > span > strong,
.stale-overview-heading > span > small {
  display: block;
}

.stale-overview-heading > span > strong {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
}

.stale-overview-heading > span > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.stale-overview-total {
  display: grid;
  color: var(--danger);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
}

.stale-overview-card.success .stale-overview-total { color: var(--success); }

.stale-overview-total small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.stale-bucket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 6px;
}

.stale-bucket-grid > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 15, 22, .34);
}

.stale-bucket-grid span { color: var(--muted); font-size: 7px; white-space: nowrap; }
.stale-bucket-grid strong { color: var(--warning); font-size: 11px; font-variant-numeric: tabular-nums; }
.stale-bucket-grid .danger strong { color: var(--danger); }

.stale-overview-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .025);
  font-size: 8px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.stale-overview-link:hover { border-color: rgba(235, 129, 138, .34); color: var(--danger); }

.portfolio-gantt-card { min-width: 0; overflow: hidden; }

.portfolio-gantt-card > .panel-header {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

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

.gantt-legend i {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-block;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.gantt-legend i.baseline { border-radius: 1px; border-color: var(--muted-strong); transform: rotate(45deg); }
.gantt-legend i.completed { border-color: var(--success); background: var(--success); }
.gantt-legend i.revision { width: 18px; height: 4px; border: 0; border-radius: 99px; background: rgba(112, 182, 232, .35); }
.gantt-legend i.today { width: 2px; height: 11px; border: 0; border-radius: 0; background: var(--accent); }

.portfolio-gantt-scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.portfolio-gantt { min-width: 940px; }

.gantt-axis-row,
.gantt-row {
  display: grid;
  grid-template-columns: 260px minmax(430px, 1fr) 205px;
  align-items: stretch;
}

.gantt-axis-row {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 14, 21, .32);
}

.gantt-label-head,
.gantt-date-head {
  display: flex;
  align-items: center;
  padding: 8px 13px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gantt-date-head { justify-content: flex-end; }

.gantt-axis-track,
.gantt-track {
  position: relative;
  min-width: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(10% - 1px),
    rgba(49, 68, 83, .22) calc(10% - 1px),
    rgba(49, 68, 83, .22) 10%
  );
}

.gantt-axis-start,
.gantt-axis-end {
  position: absolute;
  bottom: 7px;
  color: var(--muted);
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.gantt-axis-start { left: 0; }
.gantt-axis-end { right: 0; }

.gantt-today-axis,
.gantt-today-line {
  position: absolute;
  z-index: 1;
  left: var(--gantt-position);
  width: 1px;
  transform: translateX(-50%);
  background: rgba(113, 214, 200, .38);
}

.gantt-today-axis { top: 0; bottom: 0; }

.gantt-today-axis b,
.gantt-today-axis small {
  position: absolute;
  left: 5px;
  display: block;
  color: var(--accent);
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.gantt-today-axis b { top: 6px; }
.gantt-today-axis small { top: 17px; color: var(--muted-strong); font-weight: 500; }

.gantt-row {
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  transition: background .14s ease;
}

.gantt-row:last-child { border-bottom: 0; }
.gantt-row:hover { background: rgba(255, 255, 255, .012); }

.gantt-project {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 13px;
}

.gantt-project a { min-width: 0; color: inherit; text-decoration: none; }
.gantt-project a > span,
.gantt-project a > strong,
.gantt-project a > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-project a > span { color: var(--accent); font-size: 7px; font-weight: 800; }
.gantt-project a > strong { margin-top: 2px; color: var(--text); font-size: 9px; }
.gantt-project a > small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.gantt-project a:hover > strong { color: var(--accent); }

.gantt-project > em {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-row.danger .gantt-project > em { color: var(--danger); }
.gantt-row.warning .gantt-project > em { color: var(--warning); }
.gantt-row.success .gantt-project > em { color: var(--success); }

.gantt-track::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 99px;
  transform: translateY(-50%);
  background: rgba(49, 68, 83, .42);
}

.gantt-today-line { top: 0; bottom: 0; }

.gantt-revision-span {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: var(--gantt-position);
  width: var(--gantt-width);
  min-width: 4px;
  height: 6px;
  border-radius: 99px;
  transform: translateY(-50%);
  background: rgba(112, 182, 232, .35);
}

.gantt-marker {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: var(--gantt-position);
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface-raised);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(112, 182, 232, .22);
}

.gantt-marker.baseline {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  background: var(--muted-strong);
  box-shadow: 0 0 0 2px rgba(149, 166, 176, .16);
  transform: translate(-50%, -50%) rotate(45deg);
}

.gantt-row.danger .gantt-marker.current { background: var(--danger); box-shadow: 0 0 0 3px rgba(235, 129, 138, .16); }
.gantt-row.warning .gantt-marker.current { background: var(--warning); box-shadow: 0 0 0 3px rgba(233, 187, 105, .14); }
.gantt-marker.completed { width: 12px; height: 12px; background: var(--success); box-shadow: 0 0 0 3px rgba(112, 212, 160, .14); }

.gantt-dates {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: 3px 7px;
  padding: 8px 13px;
  text-align: right;
}

.gantt-dates span small,
.gantt-dates span b { display: block; }
.gantt-dates span small { color: var(--muted); font-size: 6px; text-transform: uppercase; }
.gantt-dates span b { margin-top: 2px; color: var(--text-soft); font-size: 7px; font-variant-numeric: tabular-nums; }
.gantt-dates > em { grid-column: 1 / -1; color: var(--blue); font-size: 6px; font-style: normal; }

.executive-chart-grid,
.executive-detail-grid {
  display: grid;
  gap: 12px;
}

.executive-chart-grid { grid-template-columns: minmax(0, 1.65fr) minmax(330px, .78fr); }
.executive-detail-grid { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr); }

.count-comparison-card,
.finance-comparison-card,
.health-card,
.process-breakdown-card {
  min-height: 390px;
}

.count-comparison-card,
.finance-comparison-card {
  margin: 0;
}

.count-comparison-card .panel-header,
.finance-comparison-card .panel-header,
.health-card .panel-header,
.process-breakdown-card .panel-header,
.management-matrix .panel-header,
.exception-section-card .panel-header {
  min-height: 65px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding: 10px 14px 0;
  color: var(--muted-strong);
  font-size: 9px;
}

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

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--series-color, var(--muted));
}

.series-total { --series-color: #607484; }
.series-ready { --series-color: var(--blue); }
.series-design { --series-color: var(--warning); }
.series-missing { --series-color: var(--danger); }
.series-approved { --series-color: var(--success); }

.cluster-chart {
  min-height: 292px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  align-items: end;
  gap: 9px;
  overflow-x: auto;
  margin: 8px 14px 14px;
  padding: 18px 10px 0;
  border: 1px solid rgba(49, 68, 83, .52);
  border-radius: 10px;
  background:
    repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(89, 111, 126, .12) 50px),
    linear-gradient(180deg, rgba(8, 15, 22, .38), rgba(13, 22, 30, .1));
}

.cluster-group {
  width: 100%;
  min-width: 86px;
  max-width: 176px;
  display: grid;
  justify-self: center;
  gap: 9px;
}

.cluster-bars {
  height: 225px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.cluster-bar {
  position: relative;
  width: min(15%, 18px);
  min-width: 8px;
  height: max(2px, var(--bar-height));
  display: block;
  border-radius: 4px 4px 1px 1px;
  background: var(--series-color);
  opacity: .9;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--series-color) 12%, transparent);
}

.cluster-bar:hover { opacity: 1; }

.cluster-bar b {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center;
  color: var(--muted-strong);
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cluster-group > a {
  overflow: hidden;
  padding-bottom: 9px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-group > a:hover { color: var(--accent); }

.health-ring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.health-ring-item {
  --ring-color: var(--accent);
  min-height: 142px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 12px;
  background: var(--surface);
}

.health-ring-item.success { --ring-color: var(--success); }
.health-ring-item.violet { --ring-color: var(--violet); }
.health-ring-item.blue { --ring-color: var(--blue); }

.health-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--ring-value) * 1%), rgba(43, 60, 73, .62) 0);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

.health-ring.empty { background: rgba(43, 60, 73, .62); }

.health-ring > span {
  width: 64px;
  height: 64px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, .025);
  border-radius: 50%;
  background: #101923;
  text-align: center;
}

.health-ring strong,
.health-ring small { display: block; }
.health-ring strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.health-ring small { max-width: 56px; margin-top: 2px; color: var(--muted); font-size: 7px; line-height: 1.25; }
.health-ring-item > p { margin: 0; color: var(--muted-strong); font-size: 8px; text-align: center; }

.coverage-note,
.exception-guidance {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-top: 1px solid var(--line);
  background: rgba(112, 182, 232, .035);
}

.coverage-note > i,
.exception-guidance > i,
.matrix-note > i {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(112, 182, 232, .28);
  border-radius: 50%;
  color: var(--blue);
  font-size: 9px;
  font-style: normal;
}

.coverage-note > i::before { content: "i"; }
.coverage-note strong,
.coverage-note small,
.exception-guidance strong,
.exception-guidance small { display: block; }
.coverage-note strong,
.exception-guidance strong { color: var(--text-soft); font-size: 9px; }
.coverage-note small,
.exception-guidance small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.45; }

.finance-headline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.finance-headline > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  background: var(--surface);
}

.finance-headline span,
.finance-headline small { color: var(--muted); font-size: 8px; }
.finance-headline strong { overflow: hidden; font-size: 14px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

.finance-province-bars {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.finance-province-row {
  display: grid;
  grid-template-columns: 80px minmax(180px, 1fr) 53px;
  align-items: center;
  gap: 10px;
}

.finance-province-row > a {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-province-row > a:hover { color: var(--accent); }
.finance-province-row > strong { font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }

.finance-tracks { display: grid; gap: 4px; }

.finance-track {
  position: relative;
  height: 12px;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(40, 56, 69, .62);
}

.finance-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--series-color);
  opacity: .8;
}

.finance-track.project { --series-color: var(--blue); }
.finance-track.tender { --series-color: #607484; }

.finance-track b {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  color: #dce6e9;
  font-size: 7px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.finance-legend {
  margin-top: auto;
  padding-bottom: 11px;
  border-top: 1px solid var(--line);
}

.process-breakdown {
  display: grid;
  gap: 13px;
  padding: 17px 15px;
}

.process-breakdown-row {
  display: grid;
  grid-template-columns: minmax(108px, .9fr) minmax(90px, 1.15fr) 52px;
  align-items: center;
  gap: 9px;
}

.process-breakdown-row > span { color: var(--text-soft); font-size: 9px; }
.process-breakdown-row > b { height: 6px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.process-breakdown-row > b i { height: 100%; display: block; border-radius: inherit; background: var(--muted); }
.process-breakdown-row.active > b i { background: var(--accent); }
.process-breakdown-row.info > b i { background: var(--blue); }
.process-breakdown-row.violet > b i { background: var(--violet); }
.process-breakdown-row.warning > b i { background: var(--warning); }
.process-breakdown-row.success > b i { background: var(--success); }
.process-breakdown-row > strong { display: flex; justify-content: flex-end; gap: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.process-breakdown-row > strong small { color: var(--muted); font-size: 7px; }

.attention-gateway {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(113, 214, 200, .18);
  border-radius: 9px;
  background: rgba(113, 214, 200, .04);
  text-decoration: none;
}

.attention-gateway:hover { border-color: rgba(113, 214, 200, .4); }
.attention-gateway strong,
.attention-gateway small { display: block; }
.attention-gateway strong { color: var(--text-soft); font-size: 9px; }
.attention-gateway small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.attention-gateway > b { color: var(--accent); }

.management-matrix { margin-top: 0; }

.management-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 21, 19, .34);
}

.management-view-tab {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 248, 230, .018);
  color: var(--muted-strong);
  cursor: pointer;
  text-align: left;
}

.management-view-tab:hover,
.management-view-tab:focus-visible {
  border-color: rgba(113, 214, 200, .42);
  outline: 0;
}

.management-view-tab.active {
  border-color: rgba(113, 214, 200, .48);
  background: rgba(113, 214, 200, .065);
  color: var(--text);
  box-shadow: inset 0 -2px var(--accent);
}

.management-view-tab > span {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.management-view-tab strong,
.management-view-tab small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-view-tab strong { font-size: 13px; }
.management-view-tab small { color: var(--muted); font-size: 12px; }
.management-view-panel[hidden] { display: none; }

.management-table-wrap {
  overflow: auto;
  max-height: 560px;
  scrollbar-color: var(--line-strong) var(--surface);
}

.management-table {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.management-count-table { min-width: 1120px; }
.management-money-table { min-width: 1080px; }

.management-table th {
  max-width: 150px;
  padding: 10px;
  font-size: 8px;
  line-height: 1.35;
  white-space: normal;
}

.management-table td {
  padding: 9px 10px;
  font-size: 9px;
  white-space: nowrap;
}

.management-table td:nth-child(n+3):not(.money-cell),
.management-table th:nth-child(n+3) { text-align: right; }

.management-table td > a {
  color: var(--text);
  text-decoration: none;
}

.management-table td > a strong,
.management-table td > a small { display: block; }
.management-table td > a small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.management-table td > a:hover strong { color: var(--accent); }
.management-table .money-cell { text-align: right; }
.management-table td > small,
.management-table tfoot td > small { display: block; margin-top: 2px; color: var(--muted); }

.management-table tfoot th,
.management-table tfoot td {
  position: sticky;
  z-index: 1;
  bottom: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
  background: #15222d;
  color: var(--text);
  font-weight: 800;
}

.table-rate {
  min-width: 88px;
  display: grid;
  grid-template-columns: minmax(40px, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.table-rate > i {
  height: 4px;
  display: block;
  border-radius: 99px;
  background: var(--blue);
}

.table-rate > b { font-size: 8px; }

.matrix-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
  background: rgba(112, 182, 232, .025);
}

.matrix-note p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.matrix-note strong { color: var(--text-soft); }

.exception-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 1px 1px;
}

.exception-intro h2 { margin: 5px 0 0; font-size: 18px; }

.scope-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 9px;
  white-space: nowrap;
}

.scope-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(113, 214, 200, .07);
}

.issue-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 15, 22, .58);
}

.issue-filter a {
  min-height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted-strong);
  font-size: 9px;
  text-decoration: none;
}

.issue-filter a:hover { background: rgba(255, 255, 255, .025); color: var(--text); }
.issue-filter a.active { border-color: rgba(113, 214, 200, .25); background: rgba(113, 214, 200, .075); color: var(--accent); }
.issue-filter b { min-width: 22px; padding: 2px 6px; border-radius: 99px; background: var(--surface-soft); color: var(--text-soft); font-size: 8px; text-align: center; }

.exception-guidance {
  border: 1px solid rgba(112, 182, 232, .13);
  border-radius: 10px;
}

.exception-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.exception-section-grid.single { grid-template-columns: minmax(0, 1fr); }

.exception-section-card { min-width: 0; }
.exception-section-card.danger { border-color: rgba(235, 129, 138, .2); }
.exception-section-card.warning { border-color: rgba(233, 187, 105, .18); }
.exception-section-card.info { border-color: rgba(112, 182, 232, .18); }
.exception-section-card.danger .panel-header > strong { color: var(--danger); }
.exception-section-card.warning .panel-header > strong { color: var(--warning); }
.exception-section-card.info .panel-header > strong { color: var(--blue); }

.exception-project-list { display: grid; }

.exception-project-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 7px 9px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.exception-project-row:first-child { border-top: 0; }
.exception-project-row:hover { background: rgba(255, 255, 255, .012); }

.exception-project-main {
  min-width: 0;
  grid-column: 1 / 7;
}

.exception-project-main > span,
.exception-project-main > strong,
.exception-project-main > small,
.exception-stage > small,
.exception-signal > strong,
.exception-signal > small,
.exception-owner > span,
.exception-owner > strong { display: block; }

.exception-project-main > span { color: var(--accent); font-size: 7px; font-weight: 800; letter-spacing: .05em; }
.exception-project-main > strong { overflow: hidden; margin-top: 2px; color: var(--text); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.exception-project-main > small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.exception-stage {
  min-width: 0;
  grid-column: 7 / 10;
}

.exception-stage > small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-signal {
  min-width: 0;
  grid-column: 10 / 13;
  text-align: right;
}

.exception-signal > strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.exception-signal > small { margin-top: 2px; color: var(--muted); font-size: 7px; }

.exception-owner {
  min-width: 0;
  grid-column: 1 / 9;
}

.exception-owner > span { color: var(--muted); font-size: 7px; }
.exception-owner > strong { overflow: hidden; color: var(--text-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.exception-open {
  min-height: 29px;
  display: inline-flex;
  grid-column: 9 / 13;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text-soft);
  background: var(--surface-raised);
  font-size: 8px;
  font-weight: 750;
  text-decoration: none;
}

.exception-open:hover { border-color: rgba(113, 214, 200, .36); color: var(--accent); }

.exception-section-grid.single .exception-project-row {
  grid-template-columns: minmax(220px, 1.45fr) minmax(170px, 1fr) 105px minmax(120px, .65fr) 100px;
  gap: 12px;
}

.exception-section-grid.single .exception-project-main,
.exception-section-grid.single .exception-stage,
.exception-section-grid.single .exception-signal,
.exception-section-grid.single .exception-owner,
.exception-section-grid.single .exception-open { grid-column: auto; }

.exception-section-grid.single .exception-owner > span,
.exception-section-grid.single .exception-owner > strong { text-align: left; }

.exception-empty {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 20px;
}

.exception-empty > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 212, 160, .26);
  border-radius: 50%;
  color: var(--success);
  background: rgba(112, 212, 160, .055);
}

.exception-empty strong { font-size: 10px; }
.exception-empty p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }

.detail-gantt {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(113, 214, 200, .18);
  border-radius: 10px;
  background: rgba(113, 214, 200, .025);
}
.detail-gantt-axis { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; margin: 0 0 10px 150px; color: var(--muted); font-size: 7px; }
.detail-gantt-axis > i { height: 1px; background: var(--line); }
.detail-gantt-axis > b { position: absolute; left: var(--gantt-point); padding: 2px 4px; border-radius: 4px; background: #19242e; color: var(--text-soft); font-size: 6px; transform: translateX(-50%); }
.detail-gantt-row { --detail-gantt-tone: var(--accent); display: grid; grid-template-columns: 140px minmax(150px, 1fr); align-items: center; gap: 10px; min-height: 32px; border-bottom: 1px solid rgba(151, 166, 181, .09); }
.detail-gantt-row:last-of-type { border-bottom: 0; }
.detail-gantt-row.tone-overdue { --detail-gantt-tone: var(--danger); }
.detail-gantt-row.tone-approaching { --detail-gantt-tone: var(--warning); }
.detail-gantt-row.tone-complete { --detail-gantt-tone: var(--success); }
.detail-gantt-row.tone-cancelled { --detail-gantt-tone: var(--muted-strong); opacity: .7; }
.detail-gantt-row > span { min-width: 0; }
.detail-gantt-row > span strong, .detail-gantt-row > span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-gantt-row > span strong { font-size: 8px; }
.detail-gantt-row > span small { margin-top: 2px; color: var(--muted); font-size: 6.5px; }
.detail-gantt-track { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(151, 166, 181, .09) 25%); }
.detail-gantt-track::before { position: absolute; top: 10px; right: 0; left: 0; height: 1px; background: rgba(151, 166, 181, .2); content: ""; }
.detail-gantt-track > u { position: absolute; top: 7px; left: var(--gantt-left); width: var(--gantt-width); min-width: 4px; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--detail-gantt-tone) 70%, #2e4050); text-decoration: none; }
.detail-gantt-track > u.revision { border: 1px dashed #c6a8ff; }
.detail-gantt-track > em { position: absolute; z-index: 2; top: 6px; left: var(--gantt-point); width: 9px; height: 9px; border: 2px solid #8aa1b5; background: #0c141c; transform: translateX(-50%) rotate(45deg); }
.detail-gantt-track > em.current { top: 3px; width: 3px; height: 16px; border: 0; border-radius: 2px; background: var(--detail-gantt-tone); transform: translateX(-50%); }
.detail-gantt-track > em.completed { border-color: var(--success); background: var(--success); }
.detail-gantt-note { display: block; margin-top: 8px; color: var(--muted); font-size: 6.5px; }
.detail-gantt-empty { display: grid; place-items: center; min-height: 70px; margin-bottom: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 9px; text-align: center; }
.detail-gantt-empty strong, .detail-gantt-empty span { display: block; }
.detail-gantt-empty strong { font-size: 8px; }
.detail-gantt-empty span { margin-top: 3px; color: var(--muted); font-size: 7px; }

@media (max-width: 1280px) {
  .decision-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stale-overview-card { grid-template-columns: minmax(0, 1fr) auto; }
  .executive-chart-grid,
  .executive-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .health-ring-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .health-card { min-height: auto; }
}

@media (max-width: 1030px) {
  .dashboard-scope-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope-bar-copy { grid-column: 1 / -1; }
  .scope-actions { justify-content: flex-start; }
  .exception-section-grid { grid-template-columns: minmax(0, 1fr); }
  .exception-section-grid .exception-project-row,
  .exception-section-grid.single .exception-project-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 90px;
  }
  .exception-section-grid .exception-project-main,
  .exception-section-grid.single .exception-project-main { grid-column: 1; }
  .exception-section-grid .exception-stage,
  .exception-section-grid.single .exception-stage { grid-column: 2; }
  .exception-section-grid .exception-signal,
  .exception-section-grid.single .exception-signal { grid-column: 3; }
  .exception-section-grid .exception-owner,
  .exception-section-grid.single .exception-owner { grid-column: 1 / 3; }
  .exception-section-grid .exception-open,
  .exception-section-grid.single .exception-open { grid-column: 3; }
}

@media (max-width: 790px) {
  .dashboard-heading { align-items: flex-start; }
  .scope-summary { display: none; }
  .dashboard-tabs { display: flex; overflow-x: auto; }
  .dashboard-tab { min-width: 270px; }
  .management-view-tabs { display: flex; overflow-x: auto; }
  .management-view-tab { min-width: 250px; }
  .decision-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-ring-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-headline { grid-template-columns: minmax(0, 1fr); }
  .finance-province-row { grid-template-columns: 65px minmax(155px, 1fr) 48px; }
  .exception-intro { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .dashboard-content { padding-inline: 12px; }
  .management-view-tabs { padding-inline: 10px; }
  .management-view-tab { min-width: 228px; }
  .dashboard-scope-bar { grid-template-columns: minmax(0, 1fr); }
  .scope-bar-copy { grid-column: auto; }
  .scope-actions { flex-wrap: wrap; }
  .scope-actions .primary-button { width: 100%; }
  .decision-kpi-grid { gap: 6px; }
  .decision-kpi { min-height: 80px; padding: 11px; }
  .decision-kpi strong { font-size: 20px; }
  .decision-kpi.monetary strong { font-size: 16px; }
  .decision-kpi-value { gap: 5px; }
  .decision-kpi-value > b { padding-inline: 5px; font-size: 7px; }
  .monetary-kpi-heading { align-items: flex-start; flex-direction: column; gap: 2px; margin-block: 0 -4px; }
  .dashboard-data-alerts { grid-template-columns: minmax(0, 1fr); }
  .stale-overview-card { grid-template-columns: minmax(0, 1fr); }
  .stale-overview-total { text-align: left; }
  .stale-bucket-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stale-bucket-grid > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .stale-overview-link { width: 100%; }
  .cluster-chart { grid-template-columns: repeat(7, minmax(88px, 1fr)); }
  .process-breakdown-row { grid-template-columns: minmax(100px, 1fr) 45px; }
  .process-breakdown-row > b { display: none; }
  .exception-project-row,
  .exception-section-grid.single .exception-project-row { grid-template-columns: minmax(0, 1fr) auto; }
  .exception-project-main,
  .exception-section-grid.single .exception-project-main { grid-column: 1 / -1; }
  .exception-stage,
  .exception-section-grid.single .exception-stage { grid-column: 1; }
  .exception-signal,
  .exception-section-grid.single .exception-signal { grid-column: 2; }
  .exception-owner,
  .exception-section-grid.single .exception-owner { grid-column: 1; }
  .exception-open,
  .exception-section-grid.single .exception-open { grid-column: 2; }
  .system-state { display: none; }
}
