:root {
  --bg: #f6f8fc;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-soft: rgba(255, 255, 255, 0.86);
  --text: #1b2330;
  --muted: #667085;
  --line: #e4e9f2;
  --shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  --brand: #0f766e;
  --brand-dark: #0b5f59;
  --brand-soft: rgba(15, 118, 110, 0.08);
  --positive: #15803d;
  --negative: #dc2626;
  --neutral: #64748b;
  --sidebar-bg: #0b1220;
  --sidebar-bg-soft: rgba(15, 23, 42, 0.78);
  --sidebar-line: rgba(148, 163, 184, 0.18);
  --sidebar-muted: rgba(226, 232, 240, 0.68);
  --sidebar-accent: #7c8cff;
  --sidebar-accent-soft: rgba(124, 140, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  overflow-y: scroll;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 18%),
    linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
}

a {
  color: inherit;
}

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

.landing-body {
  min-height: 100vh;
}

.shell {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
}

.app-shell {
  padding: 8px 0 20px;
}

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

.global-search-shell {
  padding: 4px 0 10px;
  margin-bottom: 8px;
  pointer-events: none;
}

.global-search-row {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px) 1fr;
  align-items: center;
  gap: 14px;
}

.global-search-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 0 auto;
  padding-left: 0;
  pointer-events: auto;
  justify-self: start;
}

.global-search-title-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.global-search-title {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.global-search-description {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0;
}

.global-search-title-spacer {
  min-height: 1px;
  justify-self: end;
}

.global-search-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  pointer-events: auto;
  transition: width 180ms ease;
  justify-self: center;
}

.global-search-shell:focus-within .global-search-panel {
  width: 100%;
}

.global-search-shell.is-search-expanded .global-search-panel {
  width: 100%;
}

.global-search {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  transition:
    width 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.global-search-shell:focus-within .global-search {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(15, 118, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.global-search-shell.is-search-expanded .global-search {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(15, 118, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  pointer-events: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}

.global-search-results[hidden] {
  display: none;
}

.global-search-loading,
.global-search-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.global-search-result {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-decoration: none;
  color: inherit;
  background: rgba(248, 250, 252, 0.84);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.global-search-result:hover,
.global-search-result.is-active {
  background: rgba(237, 246, 244, 0.98);
  border-color: rgba(15, 118, 110, 0.16);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.global-search-result-copy {
  display: grid;
  gap: 2px;
}

.global-search-result-number {
  display: block;
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.global-search-result-name {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.global-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: 0 0 18px;
}

.global-search-icon svg {
  width: 18px;
  height: 18px;
}

.global-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.2;
  outline: none;
}

.global-search-input::placeholder {
  color: #90a0b4;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(226px, 258px) minmax(0, 1fr);
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  transition: grid-template-columns 180ms ease;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: stretch;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 140, 255, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.98) 0%, rgba(8, 14, 26, 0.98) 100%);
  color: #f8fafc;
  box-shadow:
    10px 0 34px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
}

.app-layout.is-sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

html.sidebar-collapsed-preload .app-layout {
  grid-template-columns: 68px minmax(0, 1fr);
}

.app-layout.is-sidebar-collapsed .app-sidebar {
  padding-left: 0;
  padding-right: 0;
}

html.sidebar-collapsed-preload .app-sidebar {
  padding-left: 0;
  padding-right: 0;
}

.app-main {
  min-width: 0;
  padding: 10px 16px 20px;
}

.app-sidebar-top {
  display: grid;
  gap: 14px;
}

.app-sidebar-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 10px 14px 14px 16px;
}

.app-layout.is-sidebar-collapsed .app-sidebar-scroll,
html.sidebar-collapsed-preload .app-sidebar-scroll {
  padding: 10px 8px 12px;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 68px;
  margin-bottom: 14px;
  padding: 10px 16px 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  text-decoration: none;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.sidebar-collapse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(248, 250, 252, 0.96);
  cursor: pointer;
  z-index: 5;
  box-shadow: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.sidebar-collapse-button:hover {
  background: transparent;
  transform: none;
}

.sidebar-collapse-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.48);
  outline-offset: 2px;
}

.sidebar-collapse-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.sidebar-collapse-icon svg {
  width: 18px;
  height: 18px;
}

.app-layout.is-sidebar-collapsed .sidebar-collapse-icon-collapse {
  display: none;
}

.app-layout:not(.is-sidebar-collapsed) .sidebar-collapse-icon-expand {
  display: none;
}

.sidebar-brand-logo {
  display: block;
  width: min(88%, 220px);
  max-width: 100%;
  height: auto;
  margin-right: auto;
  flex: 0 1 auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.24));
}

.sidebar-brand-logo-collapsed {
  display: none;
}

.app-sidebar-top {
  position: relative;
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-brand-copy strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.sidebar-brand-copy span {
  display: block;
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--sidebar-line);
  border-radius: 18px;
  background: var(--sidebar-bg-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.sidebar-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.9), rgba(15, 118, 110, 0.82));
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.sidebar-profile-copy {
  min-width: 0;
}

.sidebar-profile-copy strong,
.sidebar-session-card strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.sidebar-profile-copy span,
.sidebar-session-card span {
  display: block;
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.sidebar-session-card small {
  display: block;
  margin-top: 3px;
  color: rgba(241, 245, 249, 0.88);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  text-decoration: none;
  color: rgba(247, 250, 252, 0.96);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.sidebar-nav a:hover {
  background: rgba(148, 163, 184, 0.11);
  border-color: rgba(148, 163, 184, 0.08);
  transform: translateX(1px);
}

.sidebar-nav a.is-active {
  background: #394150;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-nav a.is-active .sidebar-nav-icon {
  color: #fff;
}

.sidebar-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: rgba(216, 222, 255, 0.94);
}

.sidebar-nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav a.is-active .sidebar-nav-icon {
  color: #fff;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.sidebar-session-card {
  padding: 10px 12px 9px;
  border: 1px solid var(--sidebar-line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-logout-form {
  margin: 0;
}

.sidebar-admin-button,
.sidebar-logout-button {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(124, 140, 255, 0.18);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.16) 0%, rgba(15, 118, 110, 0.16) 100%);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-admin-button {
  border-color: rgba(147, 197, 253, 0.16);
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.92) 0%, rgba(71, 85, 105, 0.92) 100%);
  color: rgba(255, 255, 255, 0.96);
}

.sidebar-admin-button:hover {
  border-color: rgba(147, 197, 253, 0.24);
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.98) 0%, rgba(100, 116, 139, 0.98) 100%);
}

.sidebar-logout-button:hover {
  border-color: rgba(124, 140, 255, 0.28);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.22) 0%, rgba(15, 118, 110, 0.22) 100%);
}

.sidebar-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.sidebar-action-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.sidebar-action-label {
  display: inline-block;
}

.app-layout.is-sidebar-collapsed .sidebar-brand,
html.sidebar-collapsed-preload .sidebar-brand {
  display: none;
}

.app-layout.is-sidebar-collapsed .sidebar-brand-row,
html.sidebar-collapsed-preload .sidebar-brand-row {
  justify-content: center;
  min-height: 92px;
  margin-bottom: 10px;
  padding: 8px 0 10px;
}

.app-layout.is-sidebar-collapsed .sidebar-brand-logo-default,
html.sidebar-collapsed-preload .sidebar-brand-logo-default {
  display: none;
}

.app-layout.is-sidebar-collapsed .sidebar-brand-logo-collapsed,
html.sidebar-collapsed-preload .sidebar-brand-logo-collapsed {
  display: block;
  width: 34px;
  max-width: 34px;
  margin: 0 auto;
}

.app-layout.is-sidebar-collapsed .sidebar-nav a {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

html.sidebar-collapsed-preload .sidebar-nav a {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

.app-layout.is-sidebar-collapsed .sidebar-nav a span:not(.sidebar-nav-icon) {
  display: none;
}

html.sidebar-collapsed-preload .sidebar-nav a span:not(.sidebar-nav-icon) {
  display: none;
}

.app-layout.is-sidebar-collapsed .sidebar-nav-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

html.sidebar-collapsed-preload .sidebar-nav-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.app-layout.is-sidebar-collapsed .sidebar-nav-icon svg {
  width: 18px;
  height: 18px;
}

html.sidebar-collapsed-preload .sidebar-nav-icon svg {
  width: 18px;
  height: 18px;
}

.app-layout.is-sidebar-collapsed .sidebar-footer {
  gap: 8px;
}

html.sidebar-collapsed-preload .sidebar-footer {
  gap: 8px;
}

.app-layout.is-sidebar-collapsed .sidebar-session-card,
.app-layout.is-sidebar-collapsed .sidebar-action-label {
  display: none;
}

html.sidebar-collapsed-preload .sidebar-session-card,
html.sidebar-collapsed-preload .sidebar-action-label {
  display: none;
}

.app-layout.is-sidebar-collapsed .sidebar-admin-button,
.app-layout.is-sidebar-collapsed .sidebar-logout-button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html.sidebar-collapsed-preload .sidebar-admin-button,
html.sidebar-collapsed-preload .sidebar-logout-button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.projects-stack {
  display: grid;
  gap: 16px;
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0 0;
  background: transparent;
  backdrop-filter: none;
}

.nav-inner {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.58) 100%);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.brand-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.brand-logo {
  display: block;
  width: clamp(126px, 14vw, 172px);
  height: auto;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  margin-left: auto;
  padding-right: 14px;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  z-index: 0;
}

.nav-import-button,
.link-button,
.subtle-link {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
}

.nav-import-button,
.link-button {
  border: 1px solid rgba(15, 118, 110, 0.15);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96) 0%, rgba(11, 95, 89, 0.96) 100%);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.nav-import-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 12px 13px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.14);
}

.nav-import-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
  line-height: 1;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-links a:hover {
  color: var(--brand-dark);
  transform: translateY(-1px);
}

.nav-links a.is-active {
  color: var(--brand-dark);
  font-weight: 800;
}

.workspace-hero,
.dashboard-top,
.page-hero,
.topbar,
.content-grid,
.dashboard-grid,
.status-grid,
.kpi-grid,
.panel-grid,
.comparison-items,
.metric-chart-list,
.matrix-grid,
.report-shell,
.report-region,
.metrics-strip,
.admin-grid {
  display: grid;
  gap: 10px;
}

.workspace-hero {
  grid-template-columns: minmax(260px, 1.1fr) minmax(560px, 1fr);
  align-items: start;
  margin-bottom: 10px;
}

.dashboard-top,
.report-page-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 10px;
}

.hero-dashboard-left {
  display: grid;
  min-height: 100%;
}

.workspace-copy-compact {
  padding-bottom: 2px;
}

.kpi-unified-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.top-cta-card {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.top-cta-card strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.top-cta-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
}

.top-cta-card button {
  width: 100%;
  margin-top: auto;
  min-height: 38px;
  font-size: 0.92rem;
}

.workspace-copy {
  padding: 8px 2px;
}

.report-context-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.report-title {
  font-size: clamp(1.02rem, 1.7vw, 1.5rem);
}

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

.report-export-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px 0 8px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-dark);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.report-export-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.24);
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.report-export-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12) 0%, rgba(15, 118, 110, 0.18) 100%);
  color: var(--brand-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.pdf-export-body {
  background: #eef3f8;
}

.pdf-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.pdf-toolbar-copy {
  display: grid;
  gap: 2px;
}

.pdf-toolbar-copy strong {
  font-size: 0.92rem;
}

.pdf-toolbar-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.pdf-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-page {
  width: min(1480px, calc(100% - 32px));
  margin: 14px auto 24px;
}

.pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pdf-header-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.pdf-header-logo {
  width: 170px;
  height: auto;
  display: block;
}

.pdf-header-meta {
  min-width: 0;
  margin-left: auto;
  text-align: right;
}

.pdf-header-meta h1 {
  font-size: 1.6rem;
}

.pdf-header-meta p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pdf-export-body .report-shell {
  gap: 8px;
}

.pdf-export-body .panel,
.pdf-export-body .status-card,
.pdf-export-body .matrix-card,
.pdf-export-body .comparison-strip,
.pdf-export-body .empty-state {
  box-shadow: none;
}

.pdf-export-body .status-grid,
.pdf-export-body .panel-grid {
  gap: 8px;
}

.pdf-export-body .highlight {
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-export-body .js-plotly-plot .plotly .modebar {
  display: none !important;
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  html,
  body {
    background: #fff !important;
  }

  .report-detail-page,
  .report-detail-page * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .report-detail-page .main-nav,
  .report-detail-page .comparison-picker,
  .report-detail-page .comparison-picker-top form,
  .report-detail-page .comparison-picker-controls {
    display: none !important;
  }

  .report-detail-page .shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .report-detail-page .app-shell {
    padding: 0 !important;
  }

  .report-detail-page .report-page-top {
    display: block !important;
    margin-bottom: 8px !important;
  }

  .report-detail-page .workspace-copy {
    display: block !important;
    margin-bottom: 4px !important;
  }

  .report-detail-page .report-context-label {
    margin: 0 0 2px !important;
    font-size: 0.68rem !important;
  }

  .report-detail-page .report-title {
    margin: 0 !important;
    font-size: 1.18rem !important;
    line-height: 1.15 !important;
  }

  .pdf-toolbar {
    display: none !important;
  }

  .pdf-page {
    width: 100%;
    margin: 0;
  }

  .pdf-header,
  .panel,
  .status-card,
  .matrix-card,
  .comparison-strip,
  .empty-state {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pdf-export-body .report-shell {
    gap: 7px;
  }

  .pdf-export-body .panel-grid,
  .pdf-export-body .status-grid,
  .pdf-export-body .matrix-grid {
    gap: 7px;
  }

  .pdf-export-body .workspace-copy,
  .pdf-export-body .report-page-top,
  .pdf-export-body .flash,
  .pdf-export-body .chart-panel,
  .pdf-export-body .comparison-strip,
  .pdf-export-body .kpi-grid {
    display: none !important;
  }

  .pdf-export-body h1 {
    font-size: 1.35rem;
  }

  .pdf-export-body h2 {
    font-size: 0.88rem;
  }

  .pdf-export-body table {
    font-size: 0.82rem;
  }

  .pdf-export-body .status-card span,
  .pdf-export-body .panel span,
  .pdf-export-body th {
    font-size: 0.68rem;
  }

  .pdf-export-body .status-card strong,
  .pdf-export-body .highlight strong,
  .pdf-export-body .matrix-card strong {
    font-size: 0.86rem;
  }

  .report-detail-page .report-shell {
    gap: 8px !important;
  }

  .report-detail-page .status-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .report-detail-page .status-card {
    padding: 10px !important;
  }

  .report-detail-page .status-split-four {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .report-detail-page .status-split-col {
    padding-left: 10px !important;
  }

  .report-detail-page .status-split-accent-negative,
  .report-detail-page .status-split-accent-positive {
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }

  .report-detail-page .status-split-accent-negative {
    background:
      radial-gradient(circle at top left, rgba(220, 38, 38, 0.06), transparent 42%),
      linear-gradient(180deg, rgba(254, 242, 242, 0.94) 0%, rgba(255, 255, 255, 0.98) 78%) !important;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.16) !important;
  }

  .report-detail-page .status-split-accent-positive {
    background:
      radial-gradient(circle at top left, rgba(22, 163, 74, 0.06), transparent 42%),
      linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.98) 78%) !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16) !important;
  }

  .report-detail-page .status-split-bottom {
    margin-top: 6px !important;
    padding-top: 8px !important;
  }

  .report-detail-page .status-split-bottom strong,
  .report-detail-page .status-completion-top strong {
    font-size: 0.8rem !important;
  }

  .report-detail-page .metric-chart-group {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .report-detail-page .metric-chart-row {
    padding: 8px !important;
    min-width: 0 !important;
  }

  .report-detail-page .metric-chart-row + .metric-chart-row {
    border-left: 1px solid var(--line) !important;
    border-top: 0 !important;
  }

  .report-detail-page .metric-chart-columns {
    min-width: 0 !important;
  }

  .report-detail-page .metric-chart-column {
    min-height: 58px !important;
    padding: 8px 10px !important;
  }

  .report-detail-page .metric-chart-column strong,
  .report-detail-page .metric-chart-values strong {
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }

  .report-detail-page .metric-chart-meta strong,
  .report-detail-page .metric-chart-values small {
    font-size: 0.66rem !important;
  }

  .report-detail-page .status-completion-bar {
    background: #e2e8f0 !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28) !important;
  }

  .report-detail-page .status-completion-bar span {
    background: linear-gradient(90deg, #0f766e 0%, #14837c 100%) !important;
  }

  .report-detail-page .status-completion-bar b {
    color: #1b2330 !important;
  }

  .report-detail-page .subsection-row-detail.row-alert td,
  .report-detail-page .subsection-row-section_total.row-alert td,
  .report-detail-page .subsection-row-contractor_total.row-alert td {
    background: rgba(254, 226, 226, 0.88) !important;
  }

  .report-detail-page .subsection-row-contractor_total td {
    background: rgba(15, 118, 110, 0.08) !important;
    color: #0b5f59 !important;
    font-weight: 800 !important;
  }

  .report-detail-page .subsection-row-section_total td {
    background: rgba(248, 250, 252, 0.98) !important;
    font-weight: 800 !important;
  }
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--brand);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
}

h2 {
  font-size: 0.96rem;
}

.lead,
.muted-copy {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.9rem;
}

.upload-card,
.panel,
.kpi-card,
.status-card,
.comparison-strip,
.matrix-card,
.report-hero,
.empty-state,
.topbar-copy,
.mini-stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar-copy {
  padding: 14px;
}

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

.admin-upload-card {
  background: var(--panel-soft);
}

.upload-card-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.upload-card-head strong {
  font-size: 0.92rem;
}

.upload-card-head small {
  font-size: 0.75rem;
  color: var(--muted);
}

.upload-field {
  display: grid;
  gap: 5px;
  font-weight: 700;
  font-size: 0.8rem;
}

.upload-field-full {
  grid-column: 1 / -1;
}

.field-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.25;
  font-weight: 400;
  color: var(--muted);
}

input[type="file"],
input[type="email"],
input[type="password"],
input[type="text"],
input[type="month"],
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.88rem;
  color: var(--text);
}

button,
.back-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.subtle-link {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

.action-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-link,
.inline-link {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.inline-link {
  margin-left: 10px;
}

.flash-stack {
  display: grid;
  gap: 8px;
}

.import-dialog {
  width: min(720px, calc(100% - 24px));
  border: none;
  padding: 0;
  background: transparent;
}

.import-dialog::backdrop {
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(4px);
}

.dialog-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  padding: 16px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-icon-close,
.dialog-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
}

.dialog-backdrop {
  display: none;
}

.modal-upload-card {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.portfolio-comment-dialog {
  width: min(900px, calc(100% - 24px));
  max-height: min(95vh, 1100px);
}

.portfolio-comment-dialog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  max-height: calc(min(95vh, 1100px) - 4px);
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(249, 251, 253, 0.98));
  box-shadow:
    0 22px 42px rgba(15, 23, 42, 0.14),
    0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.portfolio-comment-dialog-head {
  margin-bottom: 0;
}

.portfolio-comment-dialog-head .eyebrow {
  margin-bottom: 4px;
  font-size: 0.61rem;
  color: var(--brand-dark);
}

.portfolio-comment-dialog-head h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.15;
  font-weight: 800;
}

.portfolio-comment-dialog-head .section-head-inline-note {
  font-size: 0.72rem;
  line-height: 1.3;
}

.portfolio-comment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 2px 0 4px;
  justify-items: center;
  text-align: center;
  width: min(360px, 100%);
  align-self: center;
  margin: 0 auto;
}

.portfolio-comment-panel {
  display: grid;
  gap: 8px;
}

.portfolio-comment-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.portfolio-comment-panel-head > span {
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.portfolio-comment-editor {
  position: relative;
}

.portfolio-comment-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  z-index: 1;
  justify-content: flex-end;
}

.portfolio-comment-toolbar [hidden] {
  display: none !important;
}

.portfolio-comment-icon-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.portfolio-comment-icon-glyph {
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  display: block;
  transform: translateY(-1px);
}

.portfolio-comment-icon-button:hover {
  background: rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
  box-shadow: none;
}

.portfolio-comment-icon-button:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

.portfolio-comment-icon-button-success {
  color: var(--positive);
}

.portfolio-comment-icon-button-success:hover {
  background: rgba(21, 128, 61, 0.08);
}

.portfolio-comment-icon-button-cancel {
  color: var(--negative);
}

.portfolio-comment-icon-button-cancel:hover {
  background: rgba(220, 38, 38, 0.08);
}

@media (max-width: 720px) {
  .portfolio-comment-toolbar {
    right: 8px;
    top: 8px;
    gap: 6px;
  }

  .portfolio-comment-textarea {
    padding-right: 100px;
  }
}

.portfolio-comment-difference {
  display: grid;
  gap: 3px;
  width: 100%;
}

.portfolio-comment-difference span {
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.25;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portfolio-comment-difference strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.portfolio-comment-difference strong.tone-positive {
  color: var(--positive);
}

.portfolio-comment-difference strong.tone-negative {
  color: var(--negative);
}

.portfolio-comment-label {
  display: grid;
  gap: 6px;
}

.portfolio-comment-label > span {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
}

.portfolio-comment-textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 44px 112px 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 22px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.portfolio-comment-textarea[readonly] {
  resize: none;
  background: linear-gradient(180deg, rgba(251, 252, 254, 0.98), rgba(255, 255, 255, 0.98));
  cursor: default;
}

.portfolio-comment-textarea.is-editing {
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(15, 118, 110, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.portfolio-comment-textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow:
    0 0 0 3px rgba(15, 118, 110, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.portfolio-comment-footer {
  display: grid;
  gap: 4px;
}

.portfolio-comment-audit {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: center;
}

.portfolio-comment-actions {
  justify-content: flex-end;
  gap: 8px;
}

.portfolio-comment-save-button {
  min-height: 34px;
}

.portfolio-comment-status {
  margin-top: -2px;
  margin-bottom: 0;
}

.project-overview-diff-split {
  gap: 6px;
}

.project-overview-diff-comment-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.project-overview-profit-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.project-overview-profit-trigger:hover {
  background: transparent;
}

.project-overview-profit-trigger:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

.project-overview-diff-value-row .project-overview-compact-value {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.portfolio-comment-popover {
  position: fixed;
  z-index: 2400;
  max-width: min(320px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  pointer-events: none;
}

.portfolio-comment-popover-title {
  margin-bottom: 4px;
  color: var(--brand-dark);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio-comment-popover-text {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-form {
  margin-top: 8px;
}

.reimport-form {
  margin-bottom: 12px;
}

.modal-stack {
  display: grid;
  gap: 18px;
}

.action-row .muted-copy {
  font-size: 0.74rem;
}

.flash {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.86rem;
}

.flash-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--negative);
}

.flash-success {
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-dark);
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.portfolio-toast,
.admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2100;
  width: min(360px, calc(100vw - 40px));
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  white-space: normal;
  line-height: 1.35;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.portfolio-toast.is-hiding,
.admin-toast.is-hiding {
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
}

@media (max-width: 640px) {
  .portfolio-toast,
  .admin-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    width: auto;
  }
}

.user-nav-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  justify-content: flex-end;
  padding: 4px 4px 4px 2px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.user-nav-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logout-icon-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.14);
  color: #b91c1c;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.logout-icon-button:hover {
  background: rgba(148, 163, 184, 0.22);
  color: #991b1b;
  opacity: 1;
}

.logout-icon-button:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.28);
  outline-offset: 2px;
}

.logout-icon-button:active {
  transform: translateY(1px);
}

.logout-icon-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.user-nav-card strong,
.login-help-card strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
}

.user-nav-card small,
.login-help-card p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 110px);
}

.login-shell-modern {
  min-height: 100vh;
  padding: 44px 0;
}

.login-stage {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 40px 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.08), transparent 20%),
    linear-gradient(180deg, #f9fbff 0%, #f3f7fc 100%);
}

.login-panel {
  width: min(520px, 100%);
  padding: 18px;
}

.login-panel-modern {
  width: min(460px, calc(100vw - 2rem));
  padding: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.login-brand-block {
  text-align: center;
  margin-bottom: 14px;
}

.login-logo-modern {
  display: block;
  width: 158px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 14px;
}

.login-brand-block h1 {
  margin: 8px 0 10px;
  font-size: 1.48rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.login-intro-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.login-form {
  grid-template-columns: 1fr;
}

.login-form-modern {
  gap: 12px;
}

.login-form-modern input {
  min-height: 44px;
  border-radius: 12px;
  background: #fbfdff;
}

.login-action-row {
  margin-top: 2px;
}

.login-action-row button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
}

.login-note-card {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(242, 247, 251, 0.96) 100%);
}

.login-note-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

.login-note-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.5;
}

.login-note-list li + li {
  margin-top: 2px;
}

.login-help-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--brand-soft);
}

.login-help-card-modern {
  margin-top: 14px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.06);
}

.login-microsoft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #3f4b63;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.login-microsoft-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

.login-microsoft-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 9px);
  gap: 2px;
  flex: 0 0 auto;
}

.login-microsoft-square {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.login-microsoft-square-red {
  background: #f25022;
}

.login-microsoft-square-green {
  background: #7fba00;
}

.login-microsoft-square-blue {
  background: #00a4ef;
}

.login-microsoft-square-yellow {
  background: #ffb900;
}

.login-help-card p {
  margin: 4px 0 0;
}

.error-page-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 150px);
}

.error-page-card {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.error-page-orbit {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 255, 0.94) 58%, rgba(226, 244, 242, 0.96) 100%);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.error-page-ring {
  position: absolute;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
}

.error-page-ring-a {
  width: 220px;
  height: 220px;
}

.error-page-ring-b {
  width: 154px;
  height: 154px;
  border-color: rgba(14, 165, 233, 0.16);
}

.error-code-cloud {
  position: relative;
  z-index: 1;
  font-size: clamp(4rem, 10vw, 6.6rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: rgba(11, 95, 89, 0.92);
}

.error-page-chip {
  position: absolute;
  bottom: 24px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 118, 110, 0.14);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.error-page-copy {
  min-width: 0;
}

.error-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-dark);
  font-size: 1rem;
  font-weight: 800;
}

.error-page-card h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.error-page-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.error-page-actions {
  margin-top: 18px;
}

.error-page-actions .back-link {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
}

.admin-layout {
  display: grid;
  gap: 16px;
}

.admin-page {
  gap: 14px;
}

.admin-hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.admin-stat-joined {
  min-height: 82px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 252, 0.98) 100%);
}

.admin-stat-joined span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stat-joined strong {
  font-size: 1.16rem;
  line-height: 1.05;
}

.admin-grid-compact {
  display: grid;
  gap: 14px;
}

.admin-section-panel {
  padding: 14px;
}

.admin-section-head {
  align-items: start;
  margin-bottom: 12px;
}

.admin-subsection-head {
  margin: 12px 0 8px;
}

.admin-toolbar,
.admin-toolbar-form,
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-toolbar-form {
  margin: 0;
}

.admin-toolbar-button,
.table-action-button,
.table-action-link {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.table-action-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
  box-shadow: none;
}

.table-action-button-danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(254, 242, 242, 0.92);
}

.table-action-button-danger:hover {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(254, 226, 226, 0.98);
}

.table-action-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid transparent;
  color: var(--muted);
}

.admin-table-scroll {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.admin-table {
  min-width: 100%;
}

.admin-user-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.admin-search-shell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  flex: 1 1 460px;
  max-width: 560px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-search-icon {
  color: var(--muted);
  flex: 0 0 16px;
  font-size: 1rem;
  line-height: 1;
}

.admin-search-input {
  width: auto;
  flex: 1 1 auto;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.86rem;
}

.admin-search-input:focus {
  outline: none;
}

.admin-pagination-bar,
.admin-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-pagination-bar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-left: auto;
}

.admin-page-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
}

.admin-page-indicator {
  min-width: 48px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
}

.admin-users-table th,
.admin-users-table td {
  padding-top: 4px;
  padding-bottom: 4px;
  vertical-align: middle;
}

.admin-users-table td {
  white-space: nowrap;
}

.admin-users-table td:first-child {
  white-space: normal;
}

.admin-user-primary {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-user-secondary {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.admin-projects-table th,
.admin-projects-table td {
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: nowrap;
}

.admin-projects-table th:nth-child(1),
.admin-projects-table td:nth-child(1) {
  width: 88px;
}

.admin-projects-table th:last-child,
.admin-projects-table td:last-child {
  width: 210px;
  text-align: right;
}

.admin-table tbody td {
  vertical-align: middle;
}

.admin-projects-table td:nth-child(2) {
  width: auto;
  white-space: normal;
  line-height: 1.2;
}

.admin-project-name-cell {
  display: grid;
  gap: 3px;
}

.admin-project-name-cell strong {
  font-size: 0.98rem;
  line-height: 1.18;
}

.compact-table-actions {
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.admin-user-actions form {
  margin: 0;
}

.compact-action-button,
.compact-action-link {
  min-height: 28px;
  min-width: 96px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.compact-action-button {
  box-shadow: none;
}

.table-action-button.compact-action-link,
.compact-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.95);
  color: var(--muted);
  box-shadow: none;
}

.table-action-button.compact-action-link {
  min-height: 28px;
  padding: 0 9px;
  background: rgba(248, 250, 252, 0.95);
  color: var(--muted);
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.status-pill-active {
  background: rgba(22, 163, 74, 0.11);
  color: #166534;
}

.status-pill-muted {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

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

.checkbox-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.71rem;
}

.role-admin {
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand-dark);
}

.role-manager {
  background: rgba(2, 132, 199, 0.12);
  color: #0f4c81;
}

.role-user {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.admin-modal {
  width: min(920px, calc(100% - 24px));
}

.admin-dialog-card {
  padding: 18px;
  border-radius: 22px;
}

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

.admin-financial-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-modal-form h3 {
  margin: 0;
}

.admin-modal-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.admin-modal-actions .subtle-link,
.admin-modal-actions button[type="submit"] {
  min-width: 150px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.admin-project-access-select {
  min-height: 180px;
  padding: 8px;
}

.admin-project-access-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-project-access-pill,
.admin-project-access-empty {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.2;
}

.admin-project-access-pill {
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-dark);
  font-weight: 700;
}

.admin-project-access-empty {
  border: 1px dashed var(--line);
  color: var(--muted);
}

.restricted-panel-shell {
  position: relative;
}

.restricted-blur-panel {
  position: relative;
  user-select: none;
}

.restricted-blur-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.restricted-panel-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.restricted-chart-placeholder {
  min-height: 300px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
}

.loader {
  color: var(--muted);
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: 180ms ease;
  align-self: center;
  font-size: 0.8rem;
}

.htmx-request.loader,
.htmx-request .loader,
#loader.htmx-request {
  opacity: 1;
  transform: translateY(0);
}

.metrics-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 10px;
}

.mini-stat {
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  border-radius: 14px;
}

.mini-stat-joined {
  border-radius: 0;
  box-shadow: none;
  border: 0;
  min-height: 86px;
}

.mini-stat-kpi {
  align-content: start;
  gap: 4px;
}

.mini-stat-kpi-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.mini-stat-kpi-bottom {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.mini-stat-kpi-bottom > div {
  padding: 0 10px 0 0;
}

.mini-stat-kpi-bottom > div + div {
  border-left: 1px solid var(--line);
  padding: 0 0 0 10px;
}

.mini-stat-kpi-bottom small,
.mini-stat-kpi-bottom strong {
  display: block;
}

.mini-stat-kpi-bottom strong {
  font-size: 0.83rem;
  margin-top: 2px;
}

.mini-stat-joined:not(:last-child) {
  border-right: 1px solid var(--line);
}

.mini-stat-joined.stat-tone-positive {
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.06), transparent 45%),
    linear-gradient(180deg, rgba(240, 253, 244, 0.9) 0%, rgba(255, 255, 255, 0.98) 78%);
}

.mini-stat-joined.stat-tone-negative {
  background:
    radial-gradient(circle at top left, rgba(220, 38, 38, 0.06), transparent 45%),
    linear-gradient(180deg, rgba(254, 242, 242, 0.9) 0%, rgba(255, 255, 255, 0.98) 78%);
}

.mini-stat-joined.stat-tone-neutral {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.07), transparent 45%),
    linear-gradient(180deg, rgba(239, 246, 255, 0.94) 0%, rgba(255, 255, 255, 0.98) 78%);
}

.mini-stat span,
.report-meta span,
.kpi-card span,
.panel span,
th,
.status-card span,
.comparison-item span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mini-stat strong,
.stat-card strong,
.kpi-card strong,
.status-card strong,
.highlight strong {
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--text);
}

.status-value-note {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--muted);
}

.status-admin-note {
  gap: 4px;
  white-space: nowrap;
}

.mini-stat small,
.risk-metrics small,
.report-list-metrics small,
.metric-chart-values small,
.kpi-card small,
.status-meta,
.comparison-item small {
  font-size: 0.7rem;
  color: var(--muted);
}

.kpi-card span,
.kpi-card strong,
.kpi-card small {
  display: block;
  width: 100%;
}

.kpi-card strong {
  overflow-wrap: anywhere;
}

.admin-grid {
  grid-template-columns: 1.05fr 0.95fr;
  margin-bottom: 10px;
}

.admin-grid.admin-grid-summary {
  grid-template-columns: 0.9fr 1.1fr;
}

.admin-grid-secondary {
  grid-template-columns: 0.95fr 1.05fr;
}

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

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

.home-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
}

.home-status-card {
  min-width: 0;
  min-height: 100%;
}

.home-completion-panel {
  padding: 12px;
  margin-bottom: 10px;
}

.home-comparison-panel {
  margin-bottom: 10px;
}

.home-completion-chart {
  display: grid;
  gap: 6px;
  align-items: end;
  width: 100%;
}

.home-completion-card {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-completion-percent {
  display: block;
  min-height: 16px;
  text-align: center;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.home-completion-bar {
  height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.home-completion-segment {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 2px 2px;
  min-height: 12px;
}

.home-completion-segment-remaining {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(241, 245, 249, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
  color: var(--muted);
}

.home-completion-segment-complete {
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(240, 253, 244, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  color: var(--positive);
}

.home-completion-labels {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 58px;
}

.home-completion-labels strong {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-height: 58px;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

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

.comparison-picker {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 10px;
}

.comparison-picker form {
  display: grid;
  justify-items: start;
}

.comparison-picker-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.comparison-picker-field {
  display: grid;
  gap: 6px;
}

.comparison-picker label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.comparison-picker-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.comparison-picker-export-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  background: #edf6f5;
  color: #0b6b63;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.comparison-picker select {
  min-width: 240px;
  background: #fff;
}

.metric-chart-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-chart-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

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

.panel,
.kpi-card,
.status-card {
  padding: 12px;
}

.status-card {
  position: relative;
  overflow: hidden;
}

.status-card-expanded {
  min-width: 0;
}

.status-card-compact {
  min-width: 0;
}

.status-card > * {
  position: relative;
  z-index: 1;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll-wide table {
  min-width: 100%;
}

.chart-panel-wide {
  margin-bottom: 10px;
}

.plotly-chart-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
  padding: 4px 12px 4px 16px;
  overflow: hidden;
}

.plotly-chart-block .js-plotly-plot,
.plotly-chart-block .plot-container,
.plotly-chart-block .svg-container {
  width: 100% !important;
}

.compact-panel {
  padding: 12px;
}

.panel + .panel {
  margin-top: 0;
}

.empty-state {
  padding: 14px;
  border-style: dashed;
}

.compact-empty-state h2 {
  font-size: 1rem;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.detail-hero {
  margin-bottom: 10px;
}

.report-meta {
  display: grid;
  gap: 2px;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fbfc;
  border: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.section-head-inline-note {
  font-size: 0.82em;
  font-weight: 400;
  color: var(--muted);
}

.dashboard-summary-head {
  margin-bottom: 14px;
}

.section-top-action {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.section-top-action .table-action-link {
  min-height: 38px;
  padding: 0 16px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.section-top-action .table-action-link:hover {
  background: #fff;
  border-color: #d6dde8;
}

.compare-inline {
  color: var(--brand-dark);
}

.comparison-strip,
.chart-panel {
  padding: 12px;
}

.comparison-item,
.metric-chart-row {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.metric-chart-row {
  background: #fff;
}

.metric-chart-row + .metric-chart-row {
  border-left: 1px solid var(--line);
}

.metric-chart-meta,
.status-meta,
.highlight-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.project-path-panel {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at top right, rgba(14, 116, 144, 0.08), transparent 42%),
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 252, 0.98) 100%);
}

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

.project-path-title span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
}

.project-path-title small {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.project-path-kpi {
  display: grid;
  gap: 3px;
  text-align: right;
  min-width: 0;
}

.project-path-kpi small {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.project-path-kpi strong {
  font-size: 1.25rem;
  line-height: 1.05;
  color: #0f766e;
}

.project-path-track {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.project-path-bar {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.09) 0%, rgba(15, 118, 110, 0.03) 100%);
  border: 1px solid rgba(15, 118, 110, 0.2);
  overflow: visible;
}

.project-path-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.24) 0 2px, transparent 2px 10px);
  opacity: 0.65;
}

.project-path-bar::after {
  display: none;
}

.project-path-fill {
  position: absolute;
  inset: 0;
  width: var(--completion-progress);
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.94) 0%, rgba(22, 163, 74, 0.85) 100%);
  border-radius: inherit;
  z-index: 1;
}

.project-path-marker {
  position: absolute;
  top: -6px;
  left: var(--completion-progress);
  width: 3px;
  height: calc(100% + 12px);
  background: #0f766e;
  border-radius: 99px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
  z-index: 3;
}

.project-path-marker-label {
  position: absolute;
  left: clamp(34px, var(--completion-progress), calc(100% - 34px));
  top: -32px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.25);
  z-index: 4;
}

.project-path-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.project-path-legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.69rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-chart-meta strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.status-extra {
  display: grid;
  gap: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.status-extra-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.status-extra-row + .status-extra-row {
  border-top: 1px solid var(--line);
}

.status-extra small {
  font-size: 0.72rem;
  color: var(--muted);
}

.status-extra strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.status-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

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

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

.status-split-main,
.status-split-forecast,
.status-split-middle,
.status-split-side {
  position: relative;
  display: grid;
  gap: 6px;
}

.status-split-accent {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.status-split-accent-negative {
  padding: 10px 12px;
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(220, 38, 38, 0.05), transparent 42%),
    linear-gradient(180deg, rgba(254, 242, 242, 0.82) 0%, rgba(255, 255, 255, 0.98) 78%);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}

.status-split-accent-positive {
  padding: 10px 12px;
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.05), transparent 42%),
    linear-gradient(180deg, rgba(240, 253, 244, 0.9) 0%, rgba(255, 255, 255, 0.98) 78%);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.status-split-accent-neutral {
  padding: 10px 12px;
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(239, 246, 255, 0.94) 0%, rgba(255, 255, 255, 0.98) 78%);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}

.status-split-col {
  padding-left: 16px;
  border-left: 1px solid var(--line);
  align-content: start;
}

.status-split-main.status-split-col {
  padding-left: 0;
  border-left: 0;
}

.status-split-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.status-split-meta small,
.status-split-side small,
.status-split-bottom small {
  font-size: 0.7rem;
  color: var(--muted);
}

.status-delta {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  min-height: 0.72rem;
}

.status-delta-placeholder {
  visibility: hidden;
}

.info-tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  color: inherit;
}

.status-delta.tone-positive,
.status-delta.tone-positive .info-tooltip-trigger {
  color: var(--positive);
}

.status-delta.tone-negative,
.status-delta.tone-negative .info-tooltip-trigger {
  color: var(--negative);
}

.status-delta.tone-neutral,
.status-delta.tone-neutral .info-tooltip-trigger {
  color: #2563eb;
}

.info-tooltip-bubble {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  transform: translateY(4px);
  width: max-content;
  min-width: 0;
  max-width: min(220px, calc(100vw - 32px));
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(218, 226, 237, 0.95);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 10;
  white-space: normal;
}

.info-tooltip-bubble::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 100%;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.98) transparent transparent transparent;
}

.info-tooltip-trigger:hover .info-tooltip-bubble,
.info-tooltip-trigger:focus-within .info-tooltip-bubble {
  opacity: 1;
  transform: translateY(0);
}

.status-split-bottom {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.status-split-bottom-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-split-bottom-side {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.status-split-bottom strong {
  display: block;
  margin-top: 4px;
  font-size: 0.86rem;
  line-height: 1.2;
}

.status-completion {
  display: grid;
  gap: 0;
  align-content: start;
}

.status-completion-top {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.status-split-side .status-completion-top {
  min-height: 111px;
}

.status-completion-top > div {
  display: grid;
  gap: 6px;
}

.status-completion-top span {
  color: var(--muted);
  font-size: 0.72rem;
  display: block;
}

.status-completion-top strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--text);
  overflow-wrap: anywhere;
}

.status-completion-top .status-delta {
  margin-top: 0;
}

.status-completion-top .status-delta.tone-positive {
  color: var(--positive);
}

.status-completion-top .status-delta.tone-negative {
  color: var(--negative);
}

.status-split-side .status-delta.tone-positive,
.status-split-meta .status-delta.tone-positive {
  color: var(--positive);
}

.status-split-side .status-delta.tone-negative,
.status-split-meta .status-delta.tone-negative {
  color: var(--negative);
}

.status-split-side .status-delta.tone-neutral,
.status-split-meta .status-delta.tone-neutral {
  color: #2563eb;
}

.status-completion-metrics {
  display: grid;
  gap: 6px;
}

.status-completion-metric {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.status-completion-metric small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
}

.status-completion-bar-wrap {
  width: 100%;
}

.status-completion-bar {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(228, 233, 242, 0.9);
}

.status-completion-bar span {
  display: block;
  width: var(--completion-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e 0%, #14837c 100%);
}

.status-completion-bar b {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 0.68rem;
  line-height: 1;
  color: var(--text);
  font-weight: 800;
}

.metric-chart-values {
  display: grid;
  gap: 5px;
}

.mini-progress {
  height: 8px;
  border-radius: 999px;
  background: #eef3f6;
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.mini-progress span,
.tone-brand .mini-progress span {
  background: var(--brand);
}

.metric-chart-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
  overflow: hidden;
}

.metric-chart-column {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  min-height: 72px;
  align-content: center;
  background: transparent;
}

.metric-chart-column span {
  font-size: 0.72rem;
  color: var(--muted);
}

.metric-chart-column strong {
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--text);
}

.metric-chart-column-current {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 252, 0.98) 100%);
  border-left: 1px solid var(--line);
}

.metric-chart-column-current.tone-positive {
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.metric-chart-column-current.tone-negative {
  background:
    radial-gradient(circle at top left, rgba(248, 113, 113, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(254, 242, 242, 0.94) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.metric-chart-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(148, 163, 184, 0.06);
}

.metric-chart-values {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.metric-chart-values strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.highlight {
  min-height: 92px;
  border-left: 4px solid transparent;
}

.panel-positive {
  border-left-color: var(--positive);
}

.panel-negative {
  border-left-color: var(--negative);
}

.panel-neutral {
  border-left-color: var(--brand);
}

.highlight p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.highlight-mini-chart {
  margin-top: 6px;
  border-top: 1px solid rgba(228, 233, 242, 0.9);
  padding-top: 2px;
  border-radius: 10px;
  overflow: hidden;
  min-height: 74px;
}

.highlight-mini-chart .js-plotly-plot,
.highlight-mini-chart .plot-container,
.highlight-mini-chart .svg-container {
  width: 100% !important;
}

.highlight-mini-chart-green {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, rgba(15, 118, 110, 0.02) 100%);
}

.highlight-mini-chart-blue {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%);
}

.highlight-mini-chart-orange {
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, rgba(217, 119, 6, 0.02) 100%);
}

.highlight-chart-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.highlight-chart-labels small {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
}

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

.matrix-panel {
  padding: 0;
}

.matrix-card-head {
  margin-bottom: 8px;
}

.matrix-card-head h2,
.matrix-card-head h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand);
}

.matrix-mini-table th,
.matrix-mini-table td {
  white-space: nowrap;
  font-size: 0.8rem;
}

.matrix-mini-table tbody td {
  font-weight: 600;
}

.matrix-grid-unified {
  gap: 0;
}

.matrix-cell {
  padding: 14px 16px;
}

.matrix-cell:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.matrix-cell:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.tone-positive {
  color: var(--positive);
}

.tone-negative {
  color: var(--negative);
}

.tone-neutral {
  color: var(--neutral);
}

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

.risk-list {
  display: grid;
  gap: 5px;
}

.risk-item,
.report-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.report-list-item {
  text-decoration: none;
  align-items: center;
}

.compact-list-item strong {
  font-size: 0.9rem;
}

.risk-item:last-child,
.report-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.risk-item p,
.report-list-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.3;
}

.risk-metrics,
.report-list-metrics {
  text-align: right;
  display: grid;
  gap: 2px;
  min-width: 150px;
  font-size: 0.82rem;
}

.matrix-card {
  padding: 8px;
}

.matrix-card h3 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--brand);
  font-weight: 700;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.72rem;
}

.matrix-table th,
.matrix-table td {
  padding: 4px 6px;
  border: 1px solid #e8edf1;
  text-align: right;
  white-space: nowrap;
}

.matrix-table th:nth-child(1),
.matrix-table th:nth-child(2),
.matrix-table td:nth-child(1),
.matrix-table td:nth-child(2) {
  text-align: left;
}

.financial-summary-table th:nth-child(n + 2),
.financial-summary-table td:nth-child(n + 2) {
  text-align: right;
}

.financial-summary-label {
  font-weight: 700;
}

.completion-summary-grid {
  margin-bottom: 10px;
}

.completion-matrix-table {
  margin-top: 4px;
}

.completion-matrix-table th,
.completion-matrix-table td {
  white-space: normal;
}

.completion-matrix-table th {
  width: 32%;
}

.completion-note {
  margin: 10px 0 0;
  line-height: 1.45;
}

.matrix-project {
  font-weight: 700;
}

.matrix-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-positive {
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}

.cell-negative {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.revenue-forecast-current-row {
  background: rgba(15, 118, 110, 0.05);
}

.cell-neutral {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

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

th,
td {
  padding: 7px 7px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.3;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  font-weight: 800;
}

.dense-table td:nth-child(3),
.dense-table td:nth-child(4),
.dense-table td:nth-child(5),
.dense-table td:nth-child(6),
.dense-table td:nth-child(7),
.dense-table td:nth-child(8),
.dense-table td:nth-child(9),
.dense-table td:nth-child(10),
.projects-table td:last-child,
.projects-table th:last-child,
.reports-table td:last-child,
.reports-table th:last-child,
.dense-table th:nth-child(3),
.dense-table th:nth-child(4),
.dense-table th:nth-child(5),
.dense-table th:nth-child(6),
.dense-table th:nth-child(7),
.dense-table th:nth-child(8),
.dense-table th:nth-child(9),
.dense-table th:nth-child(10) {
  text-align: right;
}

.projects-table th:nth-child(3),
.projects-table td:nth-child(3),
.projects-table th:nth-child(5),
.projects-table td:nth-child(5) {
  text-align: center !important;
}

.projects-table th:nth-child(4),
.projects-table td:nth-child(4),
.projects-table th:nth-child(6),
.projects-table td:nth-child(6),
.projects-table th:nth-child(7),
.projects-table td:nth-child(7),
.projects-table th:nth-child(8),
.projects-table td:nth-child(8),
.projects-table th:nth-child(9),
.projects-table td:nth-child(9) {
  text-align: left !important;
}

.projects-table th:nth-child(10),
.projects-table td:nth-child(10) {
  text-align: center !important;
}

.monthly-summary-table th,
.monthly-summary-table td {
  text-align: left !important;
}

.project-overview-table th,
.project-overview-table td {
  text-align: left !important;
  vertical-align: middle !important;
}

.project-overview-table {
  table-layout: fixed;
  width: 100%;
}

.portfolio-page .project-overview-table {
  width: 100%;
}

.portfolio-page {
  min-width: 0;
  overflow-x: hidden;
}

.portfolio-refresh-overlay[hidden] {
  display: none;
}

.portfolio-refresh-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(248, 250, 252, 0.46)),
    rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px) saturate(155%);
  -webkit-backdrop-filter: blur(10px) saturate(155%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.portfolio-refresh-overlay-image {
  width: 96px;
  height: 96px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 16px 28px rgba(15, 23, 42, 0.16));
}

.portfolio-page .projects-stack,
.portfolio-page .projects-stack > .panel {
  min-width: 0;
}

.portfolio-page .table-scroll,
.portfolio-page .table-scroll-wide {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.portfolio-page .table-scroll-wide > table,
.portfolio-page .table-scroll > table {
  display: table;
  width: 100%;
  min-width: 0;
}

.portfolio-table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  flex: 1 1 320px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid #d6dbe5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.portfolio-refresh-form {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  flex: 0 0 auto;
}

.portfolio-search-actions {
  text-align: right !important;
}

.portfolio-search-actions-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.2;
}

.portfolio-refresh-meta {
  display: flex;
  align-items: center;
  min-height: 34px;
  flex: 0 1 auto;
}

.portfolio-refresh-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.portfolio-refresh-timestamp {
  display: grid;
  grid-template-columns: 64px auto;
  align-items: baseline;
  column-gap: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}

.portfolio-refresh-label {
  display: inline-block;
  text-transform: none;
  letter-spacing: 0;
}

.portfolio-refresh-value {
  display: inline-block;
}

.portfolio-refresh-timestamp-name {
  grid-template-columns: 64px auto;
}

.portfolio-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.79rem;
  line-height: 1.1;
  white-space: nowrap;
  border-radius: 4px;
  letter-spacing: 0.01em;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.portfolio-refresh-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  color: currentColor;
}

.portfolio-refresh-button-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.portfolio-refresh-button-dark {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.portfolio-refresh-button-dark:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.22);
  transform: translateY(-1px);
}

.portfolio-refresh-button-dark:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.16);
  outline-offset: 2px;
}

.portfolio-table-search-icon {
  color: var(--muted);
  flex: 0 0 16px;
  line-height: 1;
}

.portfolio-table-search-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.portfolio-table-search-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.86rem;
}

.portfolio-table-search-input:focus {
  outline: none;
}

.project-overview-table thead tr.portfolio-search-row th {
  padding: 0 0 8px;
  border: 0;
  background: transparent;
  font-size: 0;
  line-height: 0;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
}

.project-overview-table thead tr.portfolio-search-row th.portfolio-search-head {
  padding-right: 8px;
  border-right: 0;
}

.project-overview-table thead tr.portfolio-search-row th + th {
  padding-left: 0;
  border-left: 0;
}

.project-overview-col-name {
  width: 17%;
}

.project-overview-col-diff {
  width: 12.5%;
}

.project-overview-col-value {
  width: 8.75%;
}

.project-overview-col-start {
  width: 11.75%;
}

.project-overview-col-profit {
  width: 6.75%;
}

.project-overview-col-admin {
  width: 17%;
}

@media (max-width: 1600px) {
  .project-overview-col-name {
    width: 10%;
  }

  .project-overview-col-diff {
    width: 11%;
  }

  .project-overview-bauwise-link {
    font-size: 0.64rem;
  }
}

@media (max-width: 900px) {
  .portfolio-search-actions-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .portfolio-refresh-meta {
    justify-content: flex-start;
  }

  .portfolio-refresh-status {
    align-items: flex-start;
  }

  .portfolio-refresh-timestamp {
    grid-template-columns: 64px minmax(0, 1fr);
    white-space: normal;
  }

  .portfolio-refresh-timestamp-name {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .portfolio-refresh-form {
    width: 100%;
  }

  .portfolio-refresh-button {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
}

.projects-overview-page .project-overview-col-name {
  width: 22%;
}

.projects-overview-page .project-overview-col-admin {
  width: 8.5%;
}

.projects-stack:not(.portfolio-page) .project-overview-col-name {
  width: 24%;
}

.projects-stack:not(.portfolio-page) .project-overview-col-value {
  width: 11%;
}

.projects-stack:not(.portfolio-page) .project-overview-col-action {
  width: 10%;
}

.projects-stack:not(.portfolio-page) .project-overview-table thead tr:first-child th.project-overview-group-initial,
.projects-stack:not(.portfolio-page) .project-overview-table thead tr:last-child th.project-overview-title-initial,
.projects-stack:not(.portfolio-page) .project-overview-table tbody td.project-overview-initial-start,
.projects-stack:not(.portfolio-page) .project-overview-table tbody td.project-overview-initial-mid,
.projects-stack:not(.portfolio-page) .project-overview-table tbody td.project-overview-initial-end,
.projects-stack:not(.portfolio-page) .project-overview-table tfoot td.project-overview-initial-start,
.projects-stack:not(.portfolio-page) .project-overview-table tfoot td.project-overview-initial-mid,
.projects-stack:not(.portfolio-page) .project-overview-table tfoot td.project-overview-initial-end {
  background-color: rgba(34, 197, 94, 0.045);
}

.projects-stack:not(.portfolio-page) .project-overview-table thead tr:first-child th.project-overview-group-adjusted,
.projects-stack:not(.portfolio-page) .project-overview-table thead tr:last-child th.project-overview-title-adjusted,
.projects-stack:not(.portfolio-page) .project-overview-table tbody td.project-overview-adjusted-start,
.projects-stack:not(.portfolio-page) .project-overview-table tbody td.project-overview-adjusted-mid,
.projects-stack:not(.portfolio-page) .project-overview-table tbody td.project-overview-adjusted-end,
.projects-stack:not(.portfolio-page) .project-overview-table tfoot td.project-overview-adjusted-start,
.projects-stack:not(.portfolio-page) .project-overview-table tfoot td.project-overview-adjusted-mid,
.projects-stack:not(.portfolio-page) .project-overview-table tfoot td.project-overview-adjusted-end {
  background-color: rgba(37, 99, 235, 0.055);
}

.project-overview-compact-split {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.project-overview-compact-split-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.project-overview-compact-split-row + .project-overview-compact-split-row {
  padding-top: 3px;
  margin-top: 3px;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.project-overview-bauwise-row {
  justify-content: center;
  align-items: center;
}

.project-overview-diff-value-row {
  justify-content: center;
  align-items: center;
}

.project-overview-compact-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-overview-compact-value {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

.project-overview-diff-value-row .project-overview-compact-value {
  text-align: center;
}

.project-overview-bauwise-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  text-align: center;
}

.project-overview-bauwise-label-compact {
  display: none;
}

@media (max-width: 1500px) {
  .portfolio-page .project-overview-col-name {
    width: 8%;
  }

  .portfolio-page .table-scroll-wide {
    -webkit-overflow-scrolling: touch;
  }

  .project-overview-col-diff {
    width: 8.5%;
  }

  .project-overview-table th,
  .project-overview-table td {
    padding-left: 4px;
    padding-right: 4px;
  }

  .project-overview-table td {
    font-size: 0.56rem;
  }

  .project-overview-name-link {
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .project-overview-name-text {
    font-size: 0.50rem;
  }

  .project-overview-compact-label {
    font-size: 0.49rem;
  }

  .project-overview-compact-value {
    font-size: 0.56rem;
  }

  .project-overview-profit {
    font-size: 0.56rem;
  }

  .project-overview-bauwise-link {
    font-size: 0.56rem;
  }

  .portfolio-page .project-overview-initial-start .project-overview-compact-split-row,
  .portfolio-page .project-overview-adjusted-start .project-overview-compact-split-row {
    justify-content: flex-start;
  }

  .portfolio-page .project-overview-initial-start .project-overview-compact-value,
  .portfolio-page .project-overview-adjusted-start .project-overview-compact-value {
    text-align: left;
  }

  .portfolio-page .project-overview-diff-value-row {
    justify-content: center;
  }

  .portfolio-page .project-overview-diff-value-row .project-overview-compact-value {
    text-align: center;
  }

  .portfolio-page .project-overview-bauwise-row {
    justify-content: center;
  }

  .portfolio-page .project-overview-bauwise-link {
    justify-content: center;
    width: 100%;
  }

  .portfolio-page .project-overview-table thead tr:first-child th.project-overview-group-initial,
  .portfolio-page .project-overview-table thead tr:first-child th.project-overview-group-adjusted,
  .portfolio-page .project-overview-table thead tr:last-child th.project-overview-title-initial,
  .portfolio-page .project-overview-table thead tr:last-child th.project-overview-adjusted-start.project-overview-title-adjusted {
    text-align: left !important;
    padding-left: 10px;
  }

  .portfolio-page .project-overview-table {
    min-width: 1450px;
  }
}

.project-overview-compact-label-revenue-short,
.project-overview-compact-label-expenses-short,
.project-overview-compact-label-admin-initial-short,
.project-overview-compact-label-admin-confirmed-short {
  display: none;
}

@media (max-width: 1700px) {
  .project-overview-bauwise-label-full {
    display: none;
  }

  .project-overview-bauwise-label-compact {
    display: inline;
  }

  .project-overview-name-row-text {
    display: none;
  }

  .project-overview-name-row-code {
    display: block;
  }

  .project-overview-name-link {
    font-size: 0.72rem;
    white-space: nowrap;
  }
}

.project-overview-table tbody td,
.project-overview-table tbody td * {
  text-align: left !important;
}

@media (max-width: 720px) {
  .portfolio-comment-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 12px);
  }

  .portfolio-comment-dialog-card {
    padding: 14px;
    max-height: calc(100vh - 20px);
  }

  .portfolio-comment-summary {
    grid-template-columns: 1fr;
  }

  .portfolio-comment-actions {
    justify-content: stretch;
  }

  .portfolio-comment-actions > * {
    flex: 1 1 auto;
  }
}

.projects-table tbody td {
  vertical-align: middle !important;
}

.project-overview-table th:nth-child(1),
.project-overview-table td:nth-child(1) {
  text-align: left !important;
}

.project-overview-name-link {
  display: inline-block;
  line-height: 1.25;
  white-space: normal;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-dark);
  overflow: visible;
  text-overflow: clip;
}

.project-overview-name-row {
  display: block;
}

.project-overview-name-text {
  display: block;
  margin-top: 2px;
  font-size: 0.64rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-overview-table th,
.project-overview-table td {
  padding: 6px 8px;
}

.project-overview-table th {
  white-space: nowrap;
  font-size: 0.73rem;
  line-height: 1.1;
}

.project-overview-table thead tr:first-child th {
  padding-top: 6px;
  padding-bottom: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.project-overview-table thead tr:last-child th {
  padding-top: 4px;
  padding-bottom: 6px;
  font-size: 0.72rem;
  color: var(--text);
}

.project-overview-group-head {
  text-align: center !important;
}

.project-overview-admin-head {
  white-space: normal !important;
  line-height: 1.05 !important;
}

.project-overview-group-initial {
  background: rgba(34, 197, 94, 0.12);
}

.project-overview-group-adjusted {
  background: rgba(37, 99, 235, 0.14);
}

.project-overview-group-forecast {
  background: rgba(245, 158, 11, 0.14);
}

.project-overview-admin-head {
  background: rgba(100, 116, 139, 0.08);
}

.project-overview-group-start {
  border-left: 0;
}

.project-overview-table thead tr:first-child th.project-overview-group-initial,
.project-overview-table thead tr:first-child th.project-overview-group-adjusted,
.project-overview-table thead tr:first-child th.project-overview-group-forecast,
.project-overview-table thead tr:first-child th.project-overview-diff-head {
  border-top: 1px solid rgba(148, 163, 184, 0.42);
  border-bottom: 1px solid rgba(148, 163, 184, 0.42);
}

.project-overview-table thead tr:first-child th.project-overview-group-initial,
.project-overview-table thead tr:first-child th.project-overview-group-adjusted,
.project-overview-table thead tr:first-child th.project-overview-group-forecast {
  border-left-width: 2px !important;
  border-right-width: 2px !important;
  border-left-style: solid !important;
  border-right-style: solid !important;
  border-left-color: rgba(148, 163, 184, 0.56);
  border-right-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:first-child th.project-overview-diff-head {
  border-left-width: 2px !important;
  border-right-width: 2px !important;
  border-left-style: solid !important;
  border-right-style: solid !important;
  border-left-color: rgba(148, 163, 184, 0.56);
  border-right-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:last-child th.project-overview-group-start,
.project-overview-table tbody td:nth-child(3),
.project-overview-table tbody td:nth-child(5),
.project-overview-table tbody td:nth-child(7) {
  border-left: 0;
}

.project-overview-table thead tr:first-child th.project-overview-diff-head,
.project-overview-table thead tr:last-child th.project-overview-diff-head {
  background: rgba(99, 102, 241, 0.08);
  border-left: 0;
  border-right: 0;
  box-shadow: inset 2px 0 0 rgba(99, 102, 241, 0.78);
}

.project-overview-table tbody td.project-overview-diff-cell,
.project-overview-table tfoot td.project-overview-diff-cell {
  border-left: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.32);
  background-color: rgba(99, 102, 241, 0.04);
}

.project-overview-table thead tr:first-child th.project-overview-group-initial,
.project-overview-table thead tr:last-child th.project-overview-title-initial,
.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tfoot td.project-overview-initial-start,
.project-overview-table tfoot td.project-overview-initial-end {
  border-color: rgba(148, 163, 184, 0.42);
}

.project-overview-table thead tr:first-child th.project-overview-group-initial {
  border-left-width: 2px !important;
  border-right-width: 1px !important;
  border-left-style: solid !important;
  border-right-style: solid !important;
  box-shadow: inset 2px 0 0 rgba(34, 197, 94, 0.92);
}

.project-overview-table thead tr:first-child th.project-overview-group-initial,
.project-overview-table thead tr:last-child th.project-overview-title-initial,
.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tfoot td.project-overview-initial-start {
  border-left-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:first-child th.project-overview-group-initial,
.project-overview-table thead tr:last-child th.project-overview-title-initial,
.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tfoot td.project-overview-initial-end {
  border-right-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:last-child th.project-overview-title-initial {
  border-left-width: 2px !important;
  border-left-style: solid !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table thead tr:last-child th.project-overview-initial-end.project-overview-title-initial {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tfoot td.project-overview-initial-start {
  border-left-width: 0 !important;
  border-left-style: solid !important;
}

.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tfoot td.project-overview-initial-end {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table thead tr:first-child th.project-overview-group-adjusted,
.project-overview-table thead tr:last-child th.project-overview-title-adjusted,
.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tfoot td.project-overview-adjusted-start,
.project-overview-table tfoot td.project-overview-adjusted-end {
  border-color: rgba(148, 163, 184, 0.42);
}

.project-overview-table thead tr:first-child th.project-overview-group-adjusted {
  border-left-width: 2px !important;
  border-right-width: 1px !important;
  border-left-style: solid !important;
  border-right-style: solid !important;
  box-shadow: inset 2px 0 0 rgba(37, 99, 235, 0.95);
}

.project-overview-table thead tr:first-child th.project-overview-group-adjusted,
.project-overview-table thead tr:last-child th.project-overview-title-adjusted,
.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tfoot td.project-overview-adjusted-start {
  border-left-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:first-child th.project-overview-group-adjusted,
.project-overview-table thead tr:last-child th.project-overview-title-adjusted,
.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tfoot td.project-overview-adjusted-end {
  border-right-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:last-child th.project-overview-title-adjusted {
  border-left-width: 2px !important;
  border-left-style: solid !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table thead tr:last-child th.project-overview-adjusted-end.project-overview-title-adjusted {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tfoot td.project-overview-adjusted-start {
  border-left-width: 0 !important;
  border-left-style: solid !important;
}

.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tfoot td.project-overview-adjusted-end {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table thead tr:first-child th.project-overview-group-forecast,
.project-overview-table thead tr:last-child th.project-overview-title-forecast,
.project-overview-table tbody td.project-overview-forecast-start,
.project-overview-table tbody td.project-overview-forecast-end,
.project-overview-table tfoot td.project-overview-forecast-start,
.project-overview-table tfoot td.project-overview-forecast-end {
  border-color: rgba(148, 163, 184, 0.42);
}

.project-overview-table thead tr:first-child th.project-overview-group-forecast {
  border-left-width: 2px !important;
  border-right-width: 1px !important;
  border-left-style: solid !important;
  border-right-style: solid !important;
  box-shadow: inset 2px 0 0 rgba(245, 158, 11, 0.95);
}

.project-overview-table thead tr:first-child th.project-overview-group-forecast,
.project-overview-table thead tr:last-child th.project-overview-title-forecast,
.project-overview-table tbody td.project-overview-forecast-start,
.project-overview-table tfoot td.project-overview-forecast-start {
  border-left-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:first-child th.project-overview-group-forecast,
.project-overview-table thead tr:last-child th.project-overview-title-forecast,
.project-overview-table tbody td.project-overview-forecast-end,
.project-overview-table tfoot td.project-overview-forecast-end {
  border-right-color: rgba(148, 163, 184, 0.56);
}

.project-overview-table thead tr:last-child th.project-overview-title-forecast {
  border-left-width: 2px !important;
  border-left-style: solid !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table thead tr:last-child th.project-overview-forecast-end.project-overview-title-forecast {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table tbody td.project-overview-forecast-start,
.project-overview-table tfoot td.project-overview-forecast-start {
  border-left-width: 0 !important;
  border-left-style: solid !important;
}

.project-overview-table tbody td.project-overview-forecast-end,
.project-overview-table tfoot td.project-overview-forecast-end {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-right-style: solid !important;
}

.project-overview-table tbody td:nth-child(9) {
  border-left: 0;
}

.project-overview-table tfoot td:nth-child(9) {
  border-left: 0;
}

.project-overview-table tfoot tr.project-overview-total-row {
  background: rgba(219, 234, 254, 0.62);
  border-top: 2px solid rgba(37, 99, 235, 0.78);
}

.project-overview-table tfoot tr.project-overview-total-row th,
.project-overview-table tfoot tr.project-overview-total-row td {
  background: transparent;
}

.project-overview-table tfoot td.project-overview-initial-start,
.project-overview-table tfoot td.project-overview-adjusted-start,
.project-overview-table tfoot td.project-overview-forecast-start {
  border-right: 1px solid rgba(148, 163, 184, 0.32);
}

.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tbody td.project-overview-forecast-start {
  border-right: 1px solid rgba(148, 163, 184, 0.32);
}

.project-overview-diff-head {
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1.05 !important;
}

.project-overview-diff-cell {
  text-align: center !important;
  white-space: nowrap;
  font-weight: 800;
}

.project-overview-compact-value,
.project-overview-profit {
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-overview-table td.project-overview-diff-cell,
.project-overview-table td.project-overview-initial-start,
.project-overview-table td.project-overview-adjusted-start,
.project-overview-table td.project-overview-forecast-start,
.project-overview-table td.project-overview-initial-end,
.project-overview-table td.project-overview-adjusted-end,
.project-overview-table td.project-overview-forecast-end,
.project-overview-table tfoot td.project-overview-diff-cell,
.project-overview-table tfoot td.project-overview-initial-start,
.project-overview-table tfoot td.project-overview-adjusted-start,
.project-overview-table tfoot td.project-overview-forecast-start,
.project-overview-table tfoot td.project-overview-initial-end,
.project-overview-table tfoot td.project-overview-adjusted-end,
.project-overview-table tfoot td.project-overview-forecast-end {
  overflow: hidden;
}

.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tbody td.project-overview-forecast-end {
  border-left: 0;
}

.project-overview-table th.project-overview-profit-col,
.project-overview-table td.project-overview-profit-col {
  width: 6.5%;
  text-align: left !important;
  white-space: nowrap;
  padding-left: 10px;
  padding-right: 6px;
}

.project-overview-table th.project-overview-initial-end,
.project-overview-table th.project-overview-adjusted-end,
.project-overview-table th.project-overview-forecast-end {
  width: 6.5%;
  text-align: left !important;
}

.project-overview-table td.project-overview-initial-end,
.project-overview-table td.project-overview-adjusted-end,
.project-overview-table td.project-overview-forecast-end {
  text-align: left !important;
  padding-left: 10px;
  padding-right: 6px;
}

.project-overview-title-initial {
  background: rgba(34, 197, 94, 0.08);
}

.project-overview-title-adjusted {
  background: rgba(37, 99, 235, 0.09);
}

.project-overview-title-forecast {
  background: rgba(245, 158, 11, 0.09);
}

.project-overview-table thead tr:last-child th.project-overview-title-initial,
.project-overview-table thead tr:last-child th.project-overview-title-adjusted,
.project-overview-table thead tr:last-child th.project-overview-title-forecast {
  font-weight: 800;
  color: var(--text) !important;
}

.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tbody td.project-overview-forecast-start,
.project-overview-table tbody td.project-overview-forecast-end {
  background-image: none;
}

.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tbody td.project-overview-forecast-start,
.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tbody td.project-overview-forecast-end {
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.project-overview-table tbody td.project-overview-initial-start,
.project-overview-table tbody td.project-overview-initial-end,
.project-overview-table tfoot td.project-overview-initial-start,
.project-overview-table tfoot td.project-overview-initial-end {
  background-color: rgba(34, 197, 94, 0.045);
}

.project-overview-table tbody td.project-overview-adjusted-start,
.project-overview-table tbody td.project-overview-adjusted-end,
.project-overview-table tfoot td.project-overview-adjusted-start,
.project-overview-table tfoot td.project-overview-adjusted-end {
  background-color: rgba(37, 99, 235, 0.055);
}

.project-overview-table tbody td.project-overview-forecast-start,
.project-overview-table tbody td.project-overview-forecast-end,
.project-overview-table tfoot td.project-overview-forecast-start,
.project-overview-table tfoot td.project-overview-forecast-end {
  background-color: rgba(245, 158, 11, 0.06);
}

.project-overview-table thead tr:last-child th.project-overview-title-initial {
  border-left: 2px solid rgba(34, 197, 94, 0.92) !important;
}

.project-overview-table thead tr:last-child th.project-overview-adjusted-start.project-overview-title-adjusted {
  border-left: 2px solid rgba(37, 99, 235, 0.95) !important;
}

.project-overview-table thead tr:last-child th.project-overview-forecast-start.project-overview-title-forecast {
  border-left: 2px solid rgba(245, 158, 11, 0.95) !important;
}

.project-overview-profit {
  display: inline-block;
  max-width: 100%;
  font-weight: 800;
}

.project-overview-profit.tone-positive {
  color: var(--positive);
}

.project-overview-profit.tone-negative {
  color: var(--negative);
}

.project-overview-name-head,
.project-overview-action-head {
  vertical-align: middle !important;
}

.project-overview-action-head {
  text-align: center !important;
}

.project-overview-action-cell {
  text-align: center !important;
}

.project-overview-action-cell .compact-table-actions {
  justify-content: center;
}

.project-overview-table td {
  font-size: 0.76rem;
}

.project-overview-table tbody td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.project-overview-table tbody tr {
  transition: background-color 140ms ease, opacity 140ms ease;
}

.project-overview-table tbody tr:hover {
  opacity: 1;
}

.project-overview-table tbody tr:hover td {
  background: inherit;
  box-shadow: inset 0 1px 0 rgba(37, 99, 235, 0.18), inset 0 -1px 0 rgba(37, 99, 235, 0.18);
}

.project-overview-table tbody tr:hover td:first-child {
  box-shadow:
    inset 3px 0 0 rgba(37, 99, 235, 0.95),
    inset 0 1px 0 rgba(37, 99, 235, 0.18),
    inset 0 -1px 0 rgba(37, 99, 235, 0.18);
}

.project-overview-table tbody tr:hover td:last-child {
  box-shadow:
    inset 0 1px 0 rgba(37, 99, 235, 0.18),
    inset 0 -1px 0 rgba(37, 99, 235, 0.18),
    inset -1px 0 0 rgba(37, 99, 235, 0.14);
}

.project-overview-table tbody:hover tr:not(:hover) {
  opacity: 0.55;
}

.project-overview-table tbody tr:hover td.project-overview-initial-start,
.project-overview-table tbody tr:hover td.project-overview-initial-end,
.project-overview-table tbody tr:hover td.project-overview-adjusted-start,
.project-overview-table tbody tr:hover td.project-overview-adjusted-end,
.project-overview-table tbody tr:hover td.project-overview-forecast-start,
.project-overview-table tbody tr:hover td.project-overview-forecast-end {
  background: rgba(37, 99, 235, 0.03);
}

.project-overview-table th:nth-child(1),
.project-overview-table td:nth-child(1) {
  min-height: 40px;
}

.project-history-scroll table {
  min-width: 100%;
}

.project-history-table {
  width: 100%;
}

.project-history-table th,
.project-history-table td {
  text-align: left !important;
  vertical-align: middle !important;
}

.project-history-table th:last-child,
.project-history-table td:last-child {
  text-align: center !important;
  width: 112px;
}

.project-stats-panel {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 10px;
}

.project-hero-meta {
  display: grid;
  gap: 2px;
}

.project-hero-meta .lead {
  margin-top: 6px;
}

.project-hero-subline {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.82rem;
}

.panel table {
  display: block;
  max-height: 360px;
  overflow: auto;
}

.table-scroll table,
.table-scroll-wide table {
  display: table;
  max-height: none;
}

.sync-matrix-table {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
}

.sync-matrix-table .sync-col-project {
  width: 150px;
}

.sync-matrix-table .sync-col-month {
  width: 102px;
}

.sync-matrix-table th,
.sync-matrix-table td {
  text-align: center;
  vertical-align: middle;
  padding: 6px 6px;
  font-size: 0.72rem;
}

.sync-matrix-table thead th:not(:first-child),
.sync-matrix-table tbody td:not(:first-child) {
  text-align: center !important;
}

.sync-matrix-table th:first-child,
.sync-matrix-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 2;
}

.sync-matrix-table th:first-child {
  background: #f8fafc;
  z-index: 3;
}

.sync-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  width: 100%;
}

.sync-state strong {
  display: block;
  font-size: 0.68rem;
  line-height: 1.15;
  text-align: center;
}

.sync-state .text-link {
  font-size: 0.66rem;
  font-weight: 700;
}

.sync-state-imported {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.08);
}

.sync-open-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  width: 18px;
  height: 18px;
}

.sync-open-icon-image {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.sync-state-muted {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.sync-inline-form {
  margin: 0;
  width: 100%;
}

.sync-action-button {
  width: 100%;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.64rem;
  font-weight: 800;
}

.sync-action-secondary {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #ffffff;
  color: var(--brand-dark);
}

.sync-actions-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  width: 100%;
}

.sync-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: 100%;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  text-decoration: none;
}

.sync-month-form {
  margin: 0;
  width: 100%;
}

.sync-month-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #ffffff;
  color: var(--muted);
  box-shadow: none;
}

.sync-month-button:hover {
  border-color: rgba(148, 163, 184, 0.42);
  background: #f8fafc;
  color: var(--brand-dark);
}

.sync-month-button:focus-visible {
  outline: 2px solid rgba(148, 163, 184, 0.18);
  outline-offset: 2px;
}

.sync-matrix-action-row th {
  padding: 7px 5px 6px;
  border-bottom: 0;
  background: transparent;
}

.sync-matrix-action-head {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: left;
}

.sync-matrix-action-cell {
  text-align: center;
}

.sync-matrix-table .muted-copy {
  font-size: 0.64rem;
  line-height: 1.25;
}

.sync-matrix-table td:first-child .text-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
}

.sync-matrix-table td:first-child .muted-copy {
  display: block;
  margin-top: 2px;
  max-width: 140px;
}

.sync-cell {
  vertical-align: middle;
  text-align: center !important;
}

.sync-cell > * {
  margin-inline: auto;
}

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

.row-alert td {
  background: rgba(254, 226, 226, 0.55);
}

.subsection-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsection-toggle {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.subsection-toggle span {
  line-height: 1;
}

.subsection-detail-row td {
  padding: 0;
  background: #f8fafc;
}

.subsection-detail-wrap {
  padding: 10px 12px 12px;
}

.subsection-detail-table {
  background: #fff;
}

.table-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.table-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(254, 226, 226, 0.55);
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .global-search-shell {
    padding: 4px 0 0;
    margin-bottom: 10px;
  }

  .global-search-panel {
    width: 100%;
  }

  .global-search-shell:focus-within .global-search-panel {
    width: 100%;
  }

  .global-search-shell.is-search-expanded .global-search-panel {
    width: 100%;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    top: auto;
    min-height: 0;
    height: auto;
    max-height: none;
    border-radius: 0;
  }

  .app-main {
    padding: 10px 12px 16px;
  }

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

  .sidebar-collapse-button {
    display: none;
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .dashboard-top,
  .report-page-top,
  .workspace-hero,
  .admin-grid,
  .admin-grid-secondary,
  .metrics-strip,
  .dashboard-grid,
  .kpi-grid,
  .status-grid,
  .home-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-chart-list,
  .metric-chart-group,
  .panel-grid,
  .comparison-items,
  .matrix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-picker {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-profile-card {
    padding: 10px;
  }

  .dashboard-top,
  .report-page-top,
  .workspace-hero,
  .admin-grid,
  .admin-grid-secondary,
  .metrics-strip,
  .page-hero,
  .topbar,
  .status-grid,
  .content-grid,
  .panel-grid,
  .dashboard-grid,
  .kpi-grid,
  .comparison-items,
  .metric-chart-list,
  .metric-chart-group,
  .upload-card,
  .project-form,
  .matrix-grid,
  .home-status-grid {
    grid-template-columns: 1fr;
  }

  .comparison-picker select {
    min-width: 0;
    width: 100%;
  }

  .comparison-picker-controls {
    width: 100%;
    flex-direction: column;
  }

  .hero-dashboard-grid,
  .kpi-unified-panel,
  .admin-hero-stats {
    grid-template-columns: 1fr;
  }

  .project-stats-panel {
    grid-template-columns: 1fr;
  }

  .admin-toolbar,
  .table-actions {
    width: 100%;
  }

  .error-page-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .error-page-orbit {
    min-height: 180px;
  }

  .admin-user-tools,
  .admin-pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search-shell {
    width: 100%;
  }

  .admin-toolbar-button,
  .table-action-button,
  .table-action-link {
    flex: 1 1 auto;
    justify-content: center;
  }

  .brand-mark {
    width: 100%;
  }

  .brand-logo {
    width: clamp(118px, 26vw, 160px);
  }

  .nav-actions {
    position: static;
    width: 100%;
    justify-content: center;
    gap: 8px;
    margin-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .user-nav-card {
    width: 100%;
    justify-content: space-between;
  }

  .mini-stat-joined:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-chart-row + .metric-chart-row {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .nav-inner,
  .report-hero,
  .action-row,
  .hero-actions {
    align-items: stretch;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .status-split {
    grid-template-columns: 1fr;
  }

  .status-completion-metrics {
    grid-template-columns: 1fr;
  }

  .status-split-col {
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .status-split-main.status-split-col {
    padding-top: 0;
    border-top: 0;
  }

  .matrix-card-overview {
    grid-column: span 1;
  }

  .project-path-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-path-kpi {
    text-align: left;
  }

}

@media (max-width: 640px) {
  .global-search-shell {
    padding: 4px 0 0;
    margin-bottom: 10px;
  }

  .global-search-title-wrap {
    flex: 0 1 auto;
  }

  .global-search-panel {
    width: 100%;
    justify-self: stretch;
  }

  .global-search-shell:focus-within .global-search-panel {
    width: 100%;
  }

  .global-search-shell.is-search-expanded .global-search-panel {
    width: 100%;
  }

  .shell {
    width: min(100% - 16px, 1480px);
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    padding: 14px 12px 12px;
    border-radius: 0;
  }

  .app-main {
    padding: 8px 10px 14px;
  }

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

  .sidebar-collapse-button {
    display: none;
  }

  .sidebar-nav a {
    min-height: 40px;
  }

  .sidebar-session-card {
    padding: 11px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    width: min(100% - 16px, 760px);
  }

  .admin-modal-form {
    grid-template-columns: 1fr;
  }

  .admin-financial-grid {
    grid-template-columns: 1fr;
  }

  .topbar-copy,
  .panel,
  .kpi-card,
  .status-card,
  .upload-card,
  .report-hero,
  .empty-state,
  .mini-stat {
    padding: 12px;
    border-radius: 14px;
  }

  button,
  .back-link {
    width: 100%;
  }

  .login-panel-modern {
    padding: 18px;
  }

  .login-brand-block h1 {
    font-size: 1.45rem;
  }

  .login-stage {
    padding: 10px;
    border-radius: 18px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
