:root {
  --ink: #111827;
  --text: #111827;
  --muted: #64748b;
  --line: #dbe4f0;
  --page: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --panel-softer: #fbfdff;
  --field: #ffffff;
  --field-text: #172033;
  --field-muted: #64748b;
  --hover: #f7faff;
  --navy: #06152f;
  --blue: #416bc4;
  --blue-dark: #234d9e;
  --green: #78ba39;
  --green-dark: #368333;
  --orange: #e3631a;
  --red: #c93838;
  --shadow: 0 16px 40px rgba(10, 31, 68, 0.08);
}

body.theme-dark {
  --ink: #e8eef8;
  --text: #e8eef8;
  --muted: #99a9c2;
  --line: #243653;
  --page: #0b1220;
  --panel: #111b2d;
  --panel-soft: #152238;
  --panel-softer: #101a2b;
  --field: #0d1728;
  --field-text: #e8eef8;
  --field-muted: #94a3b8;
  --hover: #172642;
  --navy: #050b16;
  --blue: #6d92ee;
  --blue-dark: #9fb9ff;
  --green: #84cc5f;
  --green-dark: #4ca34d;
  --orange: #fb923c;
  --red: #f87171;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.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;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  letter-spacing: 0;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #06152f 0%, #0a1d3f 100%);
}

.login-card {
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

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

.login-brand .brand-logo {
  max-width: 260px;
}

.login-status {
  min-height: 22px;
  color: var(--muted);
  font-weight: 700;
}

.login-status.is-error {
  color: var(--red);
}

.auth-locked .app-shell {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  background: linear-gradient(180deg, #06152f 0%, #0a1d3f 100%);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: grid;
  gap: 8px;
  align-items: start;
}

.brand small,
.sidebar-status small {
  display: block;
  color: #b8c6dc;
  margin-top: 4px;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

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

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-toggle {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9fb0cc;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-group-toggle:hover,
.nav-group.expanded > .nav-group-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-group-chevron {
  display: inline-flex;
  transition: transform 0.16s ease;
}

.nav-group.expanded .nav-group-chevron {
  transform: rotate(90deg);
}

.nav-group-items {
  display: grid;
  gap: 4px;
}

.nav-item {
  border: 0;
  color: #d9e4f7;
  background: transparent;
  text-align: left;
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 12px 10px 18px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(65, 107, 196, 0.22);
  color: #fff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--green);
}

.sidebar-status {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: center;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(120, 186, 57, 0.16);
}

.workspace {
  min-width: 0;
  padding: 28px;
  overflow-x: hidden;
}

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

.eyebrow {
  color: var(--blue-dark);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 5px;
}

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

h1 {
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: 0;
}

h2 {
  font-size: 16px;
  margin-bottom: 0;
}

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

.account-menu {
  position: relative;
}

.account-menu-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 9px 5px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: var(--panel);
}

.account-menu-toggle:hover,
.account-menu-toggle[aria-expanded="true"] {
  border-color: rgba(65, 107, 196, 0.5);
  background: var(--hover);
}

.account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.account-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.account-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 15;
  min-width: 190px;
  padding: 6px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-menu-item {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.account-menu-item:hover,
.account-menu-item.active {
  background: var(--hover);
  color: var(--blue-dark);
}

.overview-week-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.overview-week-control[hidden] {
  display: none;
}

.overview-week-control .period-select {
  min-width: 210px;
  border-color: transparent;
  background: #f8fbff;
}

.overview-week-control .compact-action {
  min-height: 34px;
  padding: 7px 11px;
}

.period-select {
  min-height: 40px;
  width: auto;
  border-radius: 8px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #314565;
  font-weight: 700;
}

.primary,
.secondary {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 14px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.primary:hover {
  background: var(--blue-dark);
}

.secondary {
  background: #fff;
  color: var(--blue-dark);
  border-color: var(--line);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.command-item {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
  min-height: 74px;
}

.command-item.warning {
  border-left-color: var(--orange);
}

.command-item.critical {
  border-left-color: var(--red);
}

.command-item.good {
  border-left-color: var(--green);
}

.command-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.command-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
  margin-bottom: 18px;
}

.chart-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-height: 220px;
  overflow: hidden;
}

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

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-line {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.compact-bars .bar-line {
  grid-template-columns: 86px minmax(0, 1fr) 62px;
}

.bar-track {
  height: 14px;
  background: #edf3fb;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--w);
  min-width: 2px;
  border-radius: inherit;
  background: var(--c);
}

.donut-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 154px;
}

#view-overview {
  --overview-line: #dce6f4;
  --overview-soft: #f7faff;
  --overview-ink: #172033;
}

.overview-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}

.overview-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.overview-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.overview-insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

#view-overview .command-item {
  min-height: 76px;
  border: 1px solid var(--overview-line);
  border-top: 4px solid #2f8ff7;
  border-left: 1px solid var(--overview-line);
  background: #fff;
  box-shadow: 0 10px 26px rgba(18, 35, 62, 0.055);
}

#view-overview .command-item.warning {
  border-top-color: var(--orange);
}

#view-overview .command-item.critical {
  border-top-color: var(--red);
}

#view-overview .command-item.good {
  border-top-color: var(--green-dark);
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.overview-hero-card,
.overview-capacity-card,
.overview-kpi-card,
.overview-side-panel,
.overview-portfolio-panel,
#view-overview .chart-card {
  border: 1px solid var(--overview-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 35, 62, 0.065);
}

.overview-hero-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.05fr);
  gap: 22px;
  padding: 22px;
  min-height: 320px;
}

.overview-hero-copy {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.overview-label {
  color: #49617f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overview-hero-copy h2,
.overview-capacity-card h3 {
  margin: 0;
  color: var(--overview-ink);
  line-height: 1.05;
}

.overview-hero-copy h2 {
  font-size: clamp(28px, 3vw, 46px);
}

.overview-hero-copy p,
.overview-capacity-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.overview-hero-metrics div {
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 12px;
  background: var(--overview-soft);
}

.overview-hero-metrics span,
.overview-hero-metrics small,
.overview-kpi-card span,
.overview-kpi-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-hero-metrics strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--overview-ink);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.overview-finance-visual {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

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

.overview-finance-chart {
  width: 100%;
  min-height: 220px;
  border-radius: 8px;
  background: #f8fbff;
}

.overview-finance-chart text {
  fill: #63748e;
  font-size: 11px;
  font-weight: 800;
}

.overview-chart-axis {
  stroke: #dbe6f4;
  stroke-width: 2;
}

.overview-chart-line {
  fill: none;
  stroke: #203d7b;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.overview-capacity-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  min-height: 320px;
}

.overview-capacity-card h3 {
  margin-top: 10px;
  font-size: 32px;
}

.overview-ring-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.overview-ring {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring) var(--p), #edf3fb 0);
}

.overview-ring > div {
  display: grid;
  place-items: center;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.overview-ring strong {
  color: var(--overview-ink);
  font-size: 22px;
  line-height: 1;
}

.overview-ring span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.overview-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 16px;
}

.overview-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2f8ff7;
}

.overview-kpi-card.green::before {
  background: var(--green-dark);
}

.overview-kpi-card.orange::before {
  background: var(--orange);
}

.overview-kpi-card.violet::before {
  background: #7c3aed;
}

.overview-kpi-card.red::before {
  background: var(--red);
}

.overview-kpi-card.sky::before {
  background: #7c9ee6;
}

.overview-kpi-card strong {
  display: block;
  margin: 12px 0 6px;
  color: var(--overview-ink);
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.overview-analytics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

#view-overview .chart-card {
  min-height: 260px;
  padding: 18px;
}

#view-overview .chart-title h2 {
  margin: 0;
  font-size: 16px;
}

#view-overview .bar-line {
  grid-template-columns: 116px minmax(0, 1fr) minmax(72px, 108px);
}

#view-overview .bar-track {
  height: 11px;
  background: #edf3fb;
}

.overview-side-panel {
  padding: 18px;
}

.overview-snapshot-list {
  display: grid;
  gap: 14px;
}

.overview-snapshot-row {
  display: grid;
  gap: 7px;
}

.overview-snapshot-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.overview-side-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  background: var(--overview-soft);
  color: var(--muted);
}

.overview-side-note strong {
  color: var(--orange);
  font-size: 28px;
}

.overview-portfolio-panel {
  padding: 18px;
}

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

.overview-project-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid #e1e8f2;
  border-left: 4px solid #2f8ff7;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
  box-shadow: 0 9px 22px rgba(18, 35, 62, 0.045);
}

.overview-project-card.good {
  border-left-color: var(--green-dark);
}

.overview-project-card.warning {
  border-left-color: var(--orange);
}

.overview-project-card.critical {
  border-left-color: var(--red);
}

.overview-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.overview-project-head > div {
  min-width: 0;
}

.overview-project-head h3 {
  margin: 3px 0 0;
  color: var(--overview-ink);
  font-size: 15px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.overview-project-code {
  display: inline-flex;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

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

.overview-project-metrics div {
  min-width: 0;
  border: 1px solid #e6edf7;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.overview-project-metrics span,
.overview-project-metrics small,
.overview-project-finance {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-project-metrics strong {
  display: block;
  margin: 5px 0 4px;
  color: var(--overview-ink);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.overview-project-finance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e6edf7;
}

.overview-project-finance span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.overview-project-finance strong {
  color: var(--overview-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.overview-project-logistics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e6edf7;
}

.overview-project-logistics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid #e6edf7;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.overview-project-logistics span.warning {
  border-color: rgba(249, 115, 22, 0.32);
  background: #fff7ed;
  color: var(--orange);
}

.overview-project-logistics strong {
  color: var(--overview-ink);
  font-size: 13px;
}

.overview-project-empty {
  grid-column: 1 / -1;
}

.donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--value), #edf3fb 0);
  display: grid;
  place-items: center;
}

.donut::after {
  content: attr(data-label);
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-weight: 800;
  font-size: 24px;
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 6px;
  height: 132px;
  padding-top: 14px;
}

.mini-bars span {
  display: block;
  min-height: 8px;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
}

.chart-legend {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.section-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.section-metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-metric strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.section-metric small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

.logistics-module-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.logistics-overview-pane {
  margin-bottom: 18px;
}

.overview-map-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-address-search {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 1 1 520px;
  min-width: min(100%, 360px);
}

.overview-address-search .compact-label {
  flex: 1 1 280px;
}

.overview-address-search .muted {
  flex: 1 1 180px;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

.compact-label {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: #435675;
  font-size: 12px;
  font-weight: 800;
}

.compact-label select,
.compact-label input {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  padding: 7px 32px 7px 10px;
}

.logistics-map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.denmark-map {
  position: relative;
  min-height: clamp(720px, 68vh, 920px);
  overflow: hidden;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #eef5fb;
}

#logistics-map-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

.map-loading {
  display: grid;
  place-items: center;
  min-height: inherit;
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
}

.map-loading.is-error {
  gap: 6px;
  text-align: center;
}

.map-loading.is-error strong,
.map-loading.is-error span {
  display: block;
}

.map-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1000;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-legend button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.map-legend button:not(.active) {
  opacity: 0.42;
  text-decoration: line-through;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.map-legend .project {
  background: #234a8f;
}

.map-legend .housing {
  background: #2f855a;
}

.map-legend .housing-full {
  background: #c53030;
}

.leaflet-logistics-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(30, 53, 91, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.leaflet-logistics-marker span {
  display: block;
  transform: translateY(-0.5px);
}

.leaflet-logistics-marker.project {
  background: #234a8f;
}

.leaflet-logistics-marker.housing {
  background: #2f855a;
}

.leaflet-logistics-marker.housing.full {
  background: #c53030;
}

.leaflet-logistics-marker.search {
  background: #7c3aed;
}

.leaflet-popup-content {
  font: inherit;
  line-height: 1.35;
}

.map-housing-popup {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.map-housing-popup strong,
.map-housing-popup span {
  display: block;
}

.map-housing-popup span {
  color: var(--muted);
}

.map-housing-popup dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0;
}

.map-housing-popup dl div {
  border: 1px solid #e0e9f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 7px 8px;
}

.map-housing-popup dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.map-housing-popup dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.map-housing-popup button {
  justify-content: center;
  width: 100%;
}

.logistics-insights-panel {
  margin-bottom: 18px;
}

.logistics-insights-summary,
.logistics-drawer summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
}

.logistics-insights-summary::-webkit-details-marker,
.logistics-drawer summary::-webkit-details-marker {
  display: none;
}

.logistics-insights-summary h2,
.logistics-drawer summary h2 {
  margin: 0;
}

.logistics-insights-summary strong,
.logistics-drawer summary strong {
  color: #234a8f;
  font-size: 14px;
}

.logistics-insights-panel[open] .logistics-insights-summary,
.logistics-drawer[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.logistics-cost-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.logistics-cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.module-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.module-card span {
  color: #234a8f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card strong {
  font-size: 28px;
}

.module-card small {
  color: var(--muted);
  line-height: 1.35;
}

.module-card.active {
  border-color: #4a72c9;
  box-shadow: 0 0 0 3px rgba(74, 114, 201, 0.16), var(--shadow);
  background: #f7faff;
}

.logistics-workspace-layout {
  display: grid;
  gap: 18px;
}

.logistics-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.logistics-drawer {
  align-self: start;
}

.logistics-drawer .stack-form {
  max-width: 980px;
}

.logistics-filter-bar {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(180px, 1fr));
}

.logistics-filter-bar .checkbox-row {
  grid-column: 1 / -1;
}

.housing-place-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 14px;
}

.housing-place-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.housing-place-card.empty {
  grid-column: 1 / -1;
}

.housing-place-card.is-drop-target {
  border-color: #4a72c9;
  box-shadow: 0 0 0 4px rgba(74, 114, 201, 0.18), var(--shadow);
  transform: translateY(-1px);
}

.housing-card-head,
.compact-card-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.housing-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.housing-card-head strong,
.compact-card-row strong {
  display: block;
}

.housing-card-head span,
.compact-card-row span {
  overflow-wrap: anywhere;
}

.housing-card-head .badge {
  flex: 0 0 auto;
  overflow-wrap: normal;
  white-space: nowrap;
}

.housing-card-stats {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  min-width: 0;
}

.housing-card-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.housing-card-stats b {
  color: var(--text);
}

.capacity-track {
  background: #eaf0f8;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.capacity-track span {
  background: linear-gradient(90deg, #7bc043, #4a72c9);
  display: block;
  height: 100%;
}

.drop-hint {
  border: 1px dashed #b7cae4;
  border-radius: 8px;
  background: #f6f9ff;
  color: #315798;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 10px;
  text-align: center;
}

.housing-people-list,
.compact-card-list {
  display: grid;
  gap: 8px;
}

.housing-people-list div,
.compact-card-row {
  background: #f8fbff;
  border: 1px solid #e0e9f5;
  border-radius: 8px;
  color: #182235;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.housing-people-list .housing-empty-person {
  gap: 6px;
}

.housing-people-list strong,
.housing-people-list span,
.compact-card-row strong,
.compact-card-row span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.housing-people-list span,
.housing-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.housing-people-list div span,
.compact-card-row span {
  color: #5f718f;
}

.rating-pill {
  background: #fff7d6;
  border: 1px solid #f3d56a;
  border-radius: 999px;
  color: #8b6500;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.housing-assignment-list {
  margin-top: 18px;
}

.draggable-assignment {
  cursor: grab;
}

.draggable-assignment:active {
  cursor: grabbing;
}

.draggable-assignment.is-dragging {
  opacity: 0.55;
}

.housing-detail-modal {
  width: min(1320px, calc(100vw - 32px));
}

.housing-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 20px;
  overflow-x: hidden;
}

.housing-detail-body > * {
  min-width: 0;
}

.housing-detail-form {
  align-content: start;
}

#housing-detail-form > .modal-actions {
  position: static;
  bottom: auto;
  margin: 12px 0 0;
  padding: 16px 0 0;
  background: transparent;
}

.housing-occupancy-summary {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.housing-occupancy-head,
.housing-occupancy-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.housing-occupancy-head strong,
.housing-occupancy-note strong {
  display: block;
  margin-bottom: 3px;
}

.housing-occupancy-head span,
.housing-occupancy-note span {
  color: var(--muted);
  font-weight: 600;
}

.housing-occupancy-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8eef6;
}

.housing-occupancy-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

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

.housing-occupancy-grid div {
  border: 1px solid #e0e9f5;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.housing-occupancy-grid span,
.housing-occupancy-grid strong {
  display: block;
}

.housing-occupancy-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.housing-assignment-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

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

.housing-recommendation-card {
  display: grid;
  gap: 9px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.housing-recommendation-card strong,
.housing-recommendation-card span {
  display: block;
}

.housing-recommendation-card span,
.housing-recommendation-card p {
  color: var(--muted);
  font-size: 13px;
}

.housing-recommendation-card p {
  margin: 0;
}

.housing-recommendation-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.housing-detail-assignments {
  display: grid;
  gap: 10px;
}

.housing-assignment-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid #e0e9f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

#housing-detail-assignments .housing-assignment-editor {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.car-assignment-editor {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.housing-assignment-editor strong,
.housing-assignment-editor span {
  display: block;
}

.housing-assignment-editor span {
  color: var(--muted);
  font-size: 14px;
}

.housing-assignment-editor label,
[data-housing-check-out-field] {
  min-width: 0;
}

.housing-assignment-editor .is-disabled,
[data-housing-check-out-field].is-disabled {
  opacity: 0.58;
}

.housing-assignment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.danger-action {
  border-color: #f2b9b9;
  color: var(--red);
  background: #fff7f7;
}

.ticket-card {
  align-items: center;
}

.ticket-card-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

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

.kpi span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 12px;
  font-size: 27px;
  line-height: 1.1;
}

.kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.two-column,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

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

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

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-segmented {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  min-height: 34px;
}

.compact-segmented .segment {
  padding: 6px 10px;
  font-size: 13px;
}

.compact-action {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.admin-only[hidden] {
  display: none !important;
}

.filter-reset-button {
  align-self: end;
}

.panel-head.compact {
  margin-top: 22px;
}

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

.critical-text {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.finance-unpaid-panel {
  margin: 14px 0;
  box-shadow: none;
}

.finance-tabs {
  margin: 14px 0 0;
  border: 1px solid #d8e3f0;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.finance-view-panel {
  display: none;
}

.finance-view-panel.active {
  display: block;
}

.split-layout.finance-view-panel.active {
  display: grid;
}

.finance-total-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.finance-total-row span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.finance-total-row strong {
  color: var(--ink);
  font-size: 18px;
}

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

#view-hours table {
  min-width: 1240px;
}

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

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e8eef6;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #38527a;
  background: #f8fbff;
  font-size: 12px;
  text-transform: uppercase;
}

.summary-row td {
  background: #fbfdff;
  font-weight: 700;
}

.summary-row {
  cursor: zoom-in;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef4ff;
  color: var(--blue-dark);
}

.badge.warning {
  background: #fff3e7;
  color: var(--orange);
}

.badge.critical {
  background: #ff1f1f;
  color: #fff;
}

.badge.good {
  background: #edf8e9;
  color: var(--green-dark);
}

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

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

.settings-form-section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.settings-form-section-header h4 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #40516f;
  font-size: 13px;
  font-weight: 700;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #40516f;
  font-size: 13px;
  font-weight: 800;
}

.inline-check input {
  width: auto;
  margin: 0;
}

.form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-status.good {
  color: var(--green-dark);
}

.form-status.warning {
  color: var(--orange);
}

.form-status.error {
  color: #c62828;
}

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

textarea {
  resize: vertical;
  min-height: 180px;
  font-family: inherit;
  font-size: 14px;
}

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

.address-autocomplete-field {
  position: relative;
}

.cvr-company-autocomplete-field {
  position: relative;
}

.address-autocomplete-list {
  position: absolute;
  z-index: 30;
  top: calc(100% - 18px);
  left: 0;
  right: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid #cbd9eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(18, 35, 62, 0.18);
}

.address-autocomplete-list[hidden] {
  display: none;
}

.address-autocomplete-list button {
  display: grid;
  gap: 2px;
  border: 0;
  border-bottom: 1px solid #e4edf7;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.address-autocomplete-list button:last-child {
  border-bottom: 0;
}

.address-autocomplete-list button:hover,
.address-autocomplete-list button:focus-visible {
  background: #eef5ff;
  outline: none;
}

.address-autocomplete-list span {
  color: #6d7c95;
  font-size: 12px;
  font-weight: 600;
}

.cvr-company-autocomplete-list {
  position: absolute;
  z-index: 35;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid #cbd9eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(18, 35, 62, 0.18);
}

.cvr-company-autocomplete-list[hidden] {
  display: none;
}

.cvr-company-autocomplete-list button {
  display: grid;
  gap: 2px;
  border: 0;
  border-bottom: 1px solid #e4edf7;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.cvr-company-autocomplete-list button:last-child {
  border-bottom: 0;
}

.cvr-company-autocomplete-list button:hover,
.cvr-company-autocomplete-list button:focus-visible {
  background: #eef5ff;
  outline: none;
}

.cvr-company-autocomplete-list span {
  color: #6d7c95;
  font-size: 12px;
  font-weight: 600;
}

.review-list,
.request-list,
.mapping-list,
#finance-records {
  display: grid;
  gap: 10px;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sales-report-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.sales-report-card {
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
}

.pipeline-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.pipeline-entry-card {
  appearance: none;
  background: #fff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 18px;
  min-height: 220px;
  padding: 18px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.pipeline-entry-card:hover {
  border-color: #9db7e5;
  box-shadow: 0 12px 28px rgba(34, 76, 142, 0.12);
  transform: translateY(-1px);
}

.pipeline-entry-card span,
.pipeline-view-toolbar span,
.pipeline-list-toolbar span,
.deal-stage-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pipeline-entry-card > div > span {
  color: #234a8f;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pipeline-entry-card h3 {
  font-size: 24px;
  margin: 7px 0;
}

.pipeline-entry-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  max-width: 560px;
}

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

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

.pipeline-view-toolbar h3 {
  display: inline-block;
  font-size: 20px;
  margin: 0 10px;
}

.leads-inbox-shell {
  background: #fff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  padding: 12px;
}

.table-scroll {
  overflow-x: auto;
}

.leads-inbox-table {
  border-collapse: collapse;
  min-width: 1060px;
  width: 100%;
}

.leads-inbox-table th,
.leads-inbox-table td {
  border-bottom: 1px solid #e4edf8;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.leads-inbox-table th {
  background: #f8fbff;
  color: #38527a;
  font-size: 12px;
  text-transform: uppercase;
}

.leads-inbox-table td {
  color: #203049;
  font-size: 13px;
}

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

.leads-inbox-table td span {
  color: var(--muted);
  line-height: 1.35;
}

.pipeline-warning {
  color: #a66800 !important;
  font-weight: 800;
}

.deals-board {
  grid-template-columns: repeat(5, minmax(240px, 1fr));
}

.deal-stage-column h3 {
  font-size: 20px;
  text-transform: none;
}

.deal-stage-column {
  border: 1px solid var(--line);
  min-height: 360px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.deal-stage-column.is-drop-target {
  background: #eef5ff;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.deal-stage-summary {
  display: block;
  margin-bottom: 12px;
}

.deal-card {
  position: relative;
}

.deal-card[draggable="true"] {
  cursor: grab;
}

.deal-card.is-dragging {
  cursor: grabbing;
  opacity: 0.58;
}

.deal-color-bar {
  background: #d8c800;
  border-radius: 999px;
  display: block;
  height: 5px;
  margin-bottom: 8px;
  width: 46px;
}

.deal-card-foot {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 10px 0;
}

.deal-card-foot b {
  align-items: center;
  background: #ffde59;
  border-radius: 999px;
  color: #5a4500;
  display: inline-flex;
  height: 18px;
  justify-content: center;
  width: 18px;
}

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

.sales-report-head h3,
.sales-mini-list h4 {
  color: #16223a;
  font-size: 14px;
  margin: 0;
}

.sales-report-head span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.sales-report-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.sales-stat,
.sales-deliverable,
.sales-forecast div,
.sales-mini-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sales-stat {
  padding: 9px;
}

.sales-stat span,
.sales-deliverable span,
.sales-forecast span,
.sales-mini-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.sales-stat strong {
  display: block;
  font-size: 18px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.sales-stat small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.sales-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sales-mini-row {
  padding: 9px;
}

.sales-mini-row strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

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

.sales-deliverable {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
}

.sales-deliverable strong,
.sales-deliverable b {
  color: #16223a;
}

.sales-deliverable b {
  font-size: 18px;
}

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

.sales-forecast div {
  padding: 10px;
}

.sales-forecast strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.pipeline-column {
  min-width: 210px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 12px;
}

.pipeline-column h3 {
  font-size: 13px;
  text-transform: uppercase;
  color: #38527a;
  margin: 0 0 10px;
}

.pipeline-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  margin-bottom: 10px;
}

.pipeline-action-card {
  cursor: pointer;
}

.pipeline-action-card:hover {
  border-color: #b9cbe3;
  background: #fbfdff;
}

.pipeline-card strong {
  display: block;
  margin-bottom: 5px;
}

.pipeline-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.pipeline-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pipeline-status-field {
  align-items: center;
  display: flex;
  gap: 6px;
  margin: 0;
}

.pipeline-status-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline-status-field select {
  min-height: 30px;
  padding: 4px 24px 4px 8px;
}

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

.project-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card-head span {
  display: block;
  color: #234a8f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card-head h3 {
  margin: 3px 0;
  font-size: 18px;
  line-height: 1.15;
}

.project-card-head small,
.project-card-metrics small {
  color: var(--muted);
}

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

.project-card-metrics div {
  display: grid;
  gap: 3px;
  border: 1px solid #e4edf7;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.project-card-metrics span {
  color: #38527a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card-metrics strong {
  font-size: 18px;
}

.project-card-status,
.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.project-card-actions {
  justify-content: flex-end;
}

.project-status-select {
  min-width: 118px;
  height: 34px;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.mini-progress {
  width: 92px;
  height: 8px;
  overflow: hidden;
  background: #eaf1f9;
  border-radius: 999px;
  margin-bottom: 5px;
}

.mini-progress span {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.review-item,
.request-item,
.mapping-item,
.record-group {
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  color: #182235;
}

.action-review-item {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.action-review-item:hover {
  border-color: #b9cbe3;
  background: #f5f9ff;
}

.review-item strong,
.request-item strong,
.mapping-item strong {
  display: block;
  margin-bottom: 5px;
}

.code-block {
  max-width: 100%;
  overflow: auto;
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7faff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.record-group h3 {
  color: #182235;
  font-size: 14px;
  margin: 0 0 10px;
}

.record-group .bar-line {
  color: #5f718f;
}

.record-group .bar-line strong {
  color: #182235;
}

.record-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 1px solid #e8eef6;
  padding: 9px 0;
}

.record-row:first-of-type {
  border-top: 0;
}

.account-role-item {
  align-items: center;
  grid-template-columns: minmax(220px, 0.7fr) minmax(520px, 1.3fr);
}

.account-role-actions {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(160px, 0.8fr) minmax(150px, 0.7fr) auto auto auto;
  gap: 8px;
  align-items: end;
  justify-content: stretch;
}

.account-role-actions label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: #38527a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-role-actions input,
.account-role-actions select {
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.account-role-actions .badge {
  align-self: center;
  justify-self: start;
}

.account-role-actions button {
  align-self: end;
}

@media (max-width: 900px) {
  .account-role-item {
    grid-template-columns: 1fr;
  }

  .account-role-actions {
    grid-template-columns: 1fr;
  }

  .account-role-actions button {
    width: 100%;
  }
}

.editable-row {
  cursor: pointer;
}

.editable-row:hover td {
  background: #f8fbff;
}

.editable-row.is-selected td {
  background: #edf4ff;
}

.form-actions {
  display: grid;
  gap: 10px;
}

.side-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.people-filter-bar {
  grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(120px, 0.85fr));
  align-items: end;
}

.hr-attention-filter-bar {
  grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(120px, 0.85fr));
  align-items: end;
}

.candidate-filter-bar {
  grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(120px, 0.85fr));
  align-items: end;
}

.staff-request-filter-bar {
  grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(120px, 0.85fr));
  align-items: end;
}

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

.staff-request-contacts-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #f8fbff;
}

.staff-request-contacts-panel h3 {
  margin: 0 0 2px;
}

.staff-contact-filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.staff-contact-filter {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d7e2f0;
  border-radius: 999px;
  background: #fff;
  color: #2c4f8f;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.staff-contact-filter strong {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #edf4ff;
  color: #214d9c;
  text-align: center;
}

.staff-contact-filter.is-active {
  background: #2f63c7;
  border-color: #2f63c7;
  color: #fff;
}

.staff-contact-filter.is-active strong {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.staff-contact-list {
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
  padding-right: 2px;
}

.staff-contact-card {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #fff;
}

.staff-contact-card strong,
.staff-contact-card span,
.staff-contact-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-contact-card span,
.staff-contact-card small {
  color: #657895;
}

.invoice-filter-bar {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(120px, 0.75fr));
  align-items: end;
}

.matching-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 0.9fr);
  gap: 14px;
  align-items: end;
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #f8fbff;
}

.matching-panel h3 {
  margin: 0 0 4px;
}

.request-match-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #fff;
}

.match-card.is-assigned {
  background: #f1f8ed;
}

.match-card strong,
.match-card span,
.match-score small {
  display: block;
}

.match-score {
  display: grid;
  gap: 4px;
}

.pipeline-candidate {
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.65fr) auto;
  align-items: end;
}

.pipeline-candidate label {
  gap: 4px;
}

.pipeline-candidate select {
  padding: 8px 10px;
}

.people-filter-bar .switch-field {
  grid-column: 1 / -1;
  justify-self: start;
}

.organization-panel {
  margin-top: 18px;
}

.organization-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}

.organization-toolbar label {
  display: grid;
  gap: 6px;
  color: #38527a;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}

.organization-toolbar input {
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
}

.organization-hint {
  color: var(--muted);
  font-weight: 700;
}

.organization-map {
  min-height: 680px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.organization-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid #d7e2f0;
  background: #fff;
}

.organization-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px 0;
}

.organization-mode-tabs button {
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f8fbff;
  color: var(--blue-dark);
  font-weight: 900;
  cursor: pointer;
}

.organization-mode-tabs button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.organization-access-badge {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.organization-access-badge.editable {
  background: #dcfce7;
  color: #166534;
}

.organization-access-badge.readonly {
  background: #e2e8f0;
  color: #475569;
}

.organization-drop-zone {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 3;
  display: grid;
  gap: 4px;
  width: 260px;
  padding: 14px;
  border: 1px dashed #9bb3d3;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
}

.organization-drop-zone strong {
  color: var(--ink);
}

.organization-canvas-shell {
  position: relative;
}

.organization-canvas {
  position: relative;
  width: 100%;
  min-height: 680px;
  overflow: auto;
  background:
    radial-gradient(circle, #dbe7f6 1px, transparent 1.2px) 0 0 / 28px 28px,
    #fbfdff;
}

.organization-card {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 260px;
  min-height: 96px;
  border: 1px solid #d9c8f2;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(42, 29, 74, 0.06);
  cursor: grab;
}

.organization-card:active {
  cursor: grabbing;
}

.organization-card.is-dragging {
  opacity: 0.55;
}

.organization-drop-target.is-drop-target {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(65, 107, 196, 0.14);
}

.organization-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--blue-dark);
  font-weight: 900;
}

.organization-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.organization-card-body strong,
.organization-card-body span,
.organization-card-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-card-body span,
.organization-card-body small {
  color: var(--muted);
  font-weight: 700;
}

.organization-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.organization-responsibilities {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.organization-responsibilities span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: grab;
}

.organization-responsibilities span:active {
  cursor: grabbing;
}

.organization-responsibility-bubble.is-dragging {
  opacity: 0.55;
}

.organization-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 2200px;
  height: 1400px;
  pointer-events: none;
}

.organization-lines path {
  fill: none;
  stroke: #a78bfa;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.7;
}

.organization-canvas-empty {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 6px;
  width: min(420px, calc(100% - 48px));
  padding: 18px;
  border: 1px dashed #9bb3d3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.organization-context-menu {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 8px;
  width: 310px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(10, 31, 68, 0.16);
}

.organization-context-menu label {
  display: grid;
  gap: 4px;
  color: #38527a;
  font-weight: 800;
  font-size: 12px;
}

.organization-context-menu select,
.organization-context-menu input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 700;
}

.process-canvas {
  min-height: 720px;
}

.process-canvas-controls {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #d7e2f0;
  background: #fff;
}

.process-canvas-controls strong {
  min-width: 54px;
  text-align: center;
  color: var(--ink);
}

.process-canvas-stage {
  position: relative;
  width: 2200px;
  height: 1400px;
  transform-origin: 0 0;
}

.process-canvas.is-panning {
  cursor: grabbing;
}

.process-canvas.is-fullscreen {
  position: fixed;
  inset: 16px;
  z-index: 70;
  min-height: auto;
  background: #fbfdff;
  box-shadow: 0 24px 80px rgba(10, 31, 68, 0.28);
}

.process-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 2px solid #9bb3d3;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 12px 26px rgba(42, 29, 74, 0.08);
  cursor: grab;
}

.process-connect-button {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.process-connect-button.active {
  border-color: var(--orange);
  background: #fff7ed;
  color: #c2410c;
}

.process-node:active {
  cursor: grabbing;
}

.process-node.is-dragging {
  opacity: 0.55;
}

.process-node.is-resizing {
  opacity: 0.85;
  outline: 3px solid rgba(65, 107, 196, 0.22);
}

.process-node span {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.process-resize-handle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border: 0;
  border-right: 3px solid var(--blue-dark);
  border-bottom: 3px solid var(--blue-dark);
  border-radius: 0 0 5px 0;
  background: transparent;
  cursor: nwse-resize;
}

.process-node.diamond {
  transform-origin: center;
  border-radius: 4px;
}

.process-node.circle {
  border-radius: 999px;
}

.process-node.employee {
  border-color: var(--green-dark);
  background: #ecfdf5;
}

.process-node.document {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.process-node.document::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 18px;
  height: 22px;
  border: 2px solid #7c3aed;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.72);
}

.process-node.decision {
  border-style: dashed;
  border-color: var(--orange);
  background: #fff7ed;
}

.process-node.line {
  height: 14px !important;
  min-height: 14px;
  border-radius: 999px;
  padding: 0;
  overflow: hidden;
}

.process-node.line strong,
.process-node.line span {
  display: none;
}

.process-edges {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 2200px;
  height: 1400px;
  pointer-events: none;
}

.process-edge {
  pointer-events: auto;
  cursor: pointer;
}

.process-edge path {
  fill: none;
  stroke: #416bc4;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.72;
}

.process-edge.handoff path {
  stroke: var(--green-dark);
  stroke-dasharray: 8 6;
}

.process-edge.blocked path {
  stroke: var(--red);
  stroke-dasharray: 4 6;
}

.process-edge.line path {
  stroke: #64748b;
}

.process-edge marker path {
  fill: #416bc4;
}

.process-edge circle {
  fill: #fff;
  stroke: #d7e2f0;
  stroke-width: 2;
}

.process-edge text {
  fill: #38527a;
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.team-line-modal-panel {
  width: min(720px, calc(100vw - 28px));
}

.process-node-modal-panel,
.process-edge-modal-panel {
  width: min(560px, calc(100vw - 28px));
}

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

.team-line-detail-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.team-line-detail-grid strong,
.team-line-detail-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-line-detail-grid span {
  color: var(--muted);
  font-weight: 700;
}

.team-responsibility-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d7e2f0;
}

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

.team-responsibility-item,
.team-responsibility-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) 120px;
  gap: 8px;
  align-items: start;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.team-responsibility-item textarea,
.team-responsibility-form textarea {
  grid-column: 1 / -1;
  min-height: 72px;
}

.team-responsibility-item .inline-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.team-responsibility-form button {
  grid-column: 1 / -1;
  justify-self: end;
}

.team-responsibility-item input,
.team-responsibility-item select,
.team-responsibility-item textarea,
.team-responsibility-form input,
.team-responsibility-form select,
.team-responsibility-form textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  font-weight: 700;
}

.organization-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #fff;
}

.hr-attention-filter-bar .switch-field {
  grid-column: 1 / -1;
  justify-self: start;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: #38527a;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}

.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-transform: none;
}

.table-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.hours-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  min-width: 0;
}

.hours-controls label {
  min-width: 0;
}

.hours-controls input,
.hours-controls select {
  min-width: 0;
}

.hours-search {
  grid-column: span 2;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background: #f8fbff;
}

.bulk-bar strong {
  margin-right: auto;
  color: var(--text);
}

.bulk-bar > .muted {
  font-size: 12px;
  font-weight: 800;
}

.rotation-bulk-bar strong {
  margin-right: 0;
}

.rotation-bulk-bar > .muted {
  margin-right: auto;
}

.bulk-bar button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.bulk-bar select {
  min-height: 36px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.bulk-bar button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.select-col {
  width: 38px;
  text-align: center;
}

.select-col input {
  width: 18px;
  height: 18px;
}

.quick-report {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background: #f8fbff;
}

.quick-report div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.quick-report strong {
  color: var(--text);
  white-space: nowrap;
}

.hours-fullscreen-mode {
  overflow: hidden;
}

.hours-fullscreen-mode .sidebar,
.hours-fullscreen-mode .topbar,
.hours-fullscreen-mode #hours-review-metrics,
.hours-fullscreen-mode #view-hours .side-stack {
  display: none;
}

.hours-fullscreen-mode .app-shell {
  display: block;
}

.hours-fullscreen-mode .workspace {
  height: 100vh;
  padding: 12px;
  overflow: hidden;
}

.hours-fullscreen-mode .view:not(#view-hours) {
  display: none;
}

.hours-fullscreen-mode #view-hours {
  display: block;
  height: calc(100vh - 24px);
}

.hours-fullscreen-mode #view-hours .split-layout {
  display: block;
  height: 100%;
}

.hours-fullscreen-mode .hours-panel {
  height: 100%;
  padding: 12px;
}

.hours-fullscreen-mode .hours-controls {
  grid-template-columns: 180px minmax(140px, 170px) minmax(150px, 190px) minmax(170px, 220px) minmax(170px, 220px) minmax(240px, 1fr) auto;
  align-items: end;
}

.hours-fullscreen-mode .hours-search {
  grid-column: auto;
}

.hours-fullscreen-mode #view-hours .table-wrap {
  max-height: calc(100vh - 240px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e7eef7;
  border-radius: 8px;
}

.hours-fullscreen-mode #view-hours thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 41px;
}

.segment {
  border: 0;
  border-right: 1px solid #d7e2f0;
  background: #fff;
  color: #38527a;
  font-weight: 800;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: var(--blue);
  color: #fff;
}

.switch-field {
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  align-self: center;
  color: #38527a;
}

.switch-field input {
  width: 18px;
  height: 18px;
}

.tasks-view-switch {
  grid-template-columns: repeat(3, minmax(54px, 1fr));
}

.task-period-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-period-nav strong {
  min-width: 116px;
  color: var(--blue-dark);
}

.task-metric {
  position: relative;
  overflow: hidden;
}

.task-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
}

.task-metric-overdue {
  border-color: rgba(211, 58, 58, 0.45);
}

.task-metric-overdue::before {
  background: #ef4444;
}

.task-metric-overdue strong {
  color: #d33a3a;
}

.task-metric-today {
  border-color: rgba(245, 158, 11, 0.5);
}

.task-metric-today::before {
  background: #f59e0b;
}

.task-metric-today strong {
  color: #b45309;
}

.task-metric-assigned::before {
  background: var(--blue);
}

.task-metric-unscheduled::before {
  background: #94a3b8;
}

.tasks-panel {
  overflow: hidden;
}

.task-quick-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
}

.task-quick-add input {
  border: 0;
  min-height: 32px;
  padding: 0 6px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.task-quick-add input:focus {
  outline: none;
}

.task-filter-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.task-scope-segment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #f8fbff;
}

.task-scope-segment span {
  padding: 0 8px;
  color: #52657f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-scope-option {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  padding: 5px 10px;
  background: transparent;
  color: #38527a;
  font-weight: 850;
  cursor: pointer;
}

.task-scope-option:hover {
  background: #edf5ff;
  color: var(--blue-dark);
}

.task-scope-option.active {
  background: #2f8ff7;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 143, 247, 0.22);
}

.task-scope-native {
  display: none;
}

.task-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.task-preset {
  min-height: 30px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  color: #1f3f76;
  font-weight: 800;
}

.task-preset.active {
  border-color: #79a7ff;
  background: #eaf2ff;
  color: var(--blue-dark);
}

.task-filter-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.task-calendar {
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.task-calendar-grid {
  display: grid;
  gap: 10px;
}

.task-calendar-week {
  grid-template-columns: repeat(7, minmax(78px, 1fr));
  min-width: 620px;
}

.task-calendar-day {
  grid-template-columns: minmax(160px, 220px);
}

.task-calendar-month {
  grid-template-columns: repeat(7, minmax(78px, 1fr));
  min-width: 620px;
}

.task-day {
  min-height: 82px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.task-day.is-today {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(70, 113, 201, 0.28);
}

.task-day.is-selected {
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35), 0 8px 22px rgba(31, 63, 118, 0.08);
}

.task-day.is-outside {
  background: #f3f6fb;
  border-style: dashed;
  min-height: 64px;
}

.task-day header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
}

.task-day header strong {
  color: var(--text);
  font-size: 16px;
}

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

.task-day-block {
  width: 100%;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 4px 7px;
  background: #eaf2ff;
  color: #173a75;
  text-align: left;
  font-weight: 900;
  line-height: 1.15;
}

.task-day-complete {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.9;
}

.task-day-complete::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.task-day-complete:hover,
.task-day-complete:focus-visible {
  background: rgba(255, 255, 255, 0.34);
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.task-day-block.is-done .task-day-complete {
  background: rgba(255, 255, 255, 0.9);
}

.task-day-block.is-done .task-day-complete::after {
  opacity: 1;
}

.task-day-block span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-day-block small {
  color: inherit;
  font-size: 10px;
  opacity: 0.78;
}

.task-day-block.is-critical {
  border-color: rgba(239, 68, 68, 0.32);
  border-left-color: #ef4444;
  background: #fff1f2;
  color: #9f1239;
}

.task-day-block.is-high {
  border-color: rgba(245, 158, 11, 0.36);
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.task-day-block.is-done {
  border-color: rgba(34, 197, 94, 0.28);
  border-left-color: #22c55e;
  background: #ecfdf3;
  color: #166534;
}

.task-day-block.is-low {
  border-color: rgba(148, 163, 184, 0.34);
  border-left-color: #94a3b8;
  background: #f8fafc;
  color: #475569;
}

.task-day-extra {
  color: #64748b;
  font-weight: 800;
}

.task-day-focus {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
}

.task-day-focus-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.task-day-focus-head > div {
  display: grid;
  gap: 3px;
}

.task-day-focus-head strong {
  color: var(--text);
}

.task-focus-key {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

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

.task-focus-item {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(110px, 0.8fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe6f4;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
  color: var(--text);
  text-align: left;
}

.task-focus-item strong,
.task-focus-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-focus-item span {
  color: var(--muted);
  font-weight: 800;
}

.task-focus-item.is-critical {
  border-left-color: #ef4444;
}

.task-focus-item.is-high {
  border-left-color: #f59e0b;
}

.task-focus-item.is-done {
  border-left-color: #22c55e;
  background: #f8fafc;
}

.task-pill {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 1px solid #d7e2f0;
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  padding: 7px 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-weight: 800;
  min-height: 34px;
}

.task-pill small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.task-pill.is-high {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.task-pill.is-critical {
  border-left-color: #ef4444;
  background: #fff4f4;
}

.task-pill.is-done {
  border-left-color: #22c55e;
  background: #f0fdf4;
  color: #64748b;
}

.task-pill.is-done span {
  text-decoration: line-through;
}

.task-unscheduled-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed #b8c8df;
  border-radius: 8px;
  background: #fbfdff;
}

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

.task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #dbe6f4;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.task-complete-control {
  display: flex;
  padding-top: 2px;
}

.task-complete-control input {
  width: 18px;
  height: 18px;
}

.task-card.is-selected {
  border-color: var(--blue);
  background: #f3f7ff;
}

.task-card.is-critical {
  border-left-color: #ef4444;
}

.task-card.is-high {
  border-left-color: #f59e0b;
}

.task-card.is-low {
  border-left-color: #94a3b8;
}

.task-card.is-done {
  border-left-color: #22c55e;
  background: #f8fafc;
}

.task-card.is-done .task-card-head strong {
  color: #64748b;
  text-decoration: line-through;
}

.task-card-head,
.task-actions,
.task-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.task-card p {
  margin: 5px 0 8px;
  color: var(--muted);
}

.task-composer-panel {
  padding: 16px;
}

.task-composer-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.task-composer-form {
  gap: 10px;
}

.task-composer-section {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fbfdff;
}

.task-composer-primary {
  background: #fff;
}

.task-composer-section-head {
  display: grid;
  gap: 2px;
}

.task-composer-section-head strong {
  color: var(--text);
  font-size: 14px;
}

.task-composer-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-composer-panel label {
  gap: 7px;
  color: #334155;
}

.task-composer-panel input,
.task-composer-panel select,
.task-composer-panel textarea {
  min-height: 40px;
  border-color: #d7e2f0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.task-composer-panel textarea {
  min-height: 112px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.task-composer-panel input:focus,
.task-composer-panel select:focus,
.task-composer-panel textarea:focus {
  outline: 2px solid rgba(70, 113, 201, 0.22);
  border-color: #7aa2ef;
}

.task-composer-grid {
  gap: 9px;
}

body.task-composer-popup-open .task-composer-grid {
  gap: 12px;
}

.task-file-field input[type="file"] {
  padding: 8px;
  color: var(--muted);
}

.task-attachment-preview,
.task-attachment-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-attachment-preview {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px dashed #b8c8df;
  border-radius: 8px;
  background: #fff;
}

.task-attachment-current,
.task-attachment-empty {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-attachment-current > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.task-attachment-current strong,
.task-attachment-empty strong {
  color: var(--text);
  font-size: 13px;
}

.task-attachment-line {
  margin-top: 8px;
}

.task-attachment-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
}

.task-attachment-line .file-name,
.task-attachment-preview .file-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-composer-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -16px -16px;
  padding: 12px 16px 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.82), var(--panel) 34%);
}

#view-tasks .section-metrics {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

#view-tasks .section-metric {
  min-height: 92px;
  padding: 14px;
  border-color: rgba(130, 154, 190, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 28px rgba(15, 35, 70, 0.05);
}

#view-tasks .section-metric::before {
  width: 28px;
  height: 4px;
  border-radius: 999px;
}

#view-tasks .section-metric strong {
  font-size: 30px;
  line-height: 1;
}

.task-workspace-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.task-calendar-panel,
.task-composer-panel {
  border-color: rgba(130, 154, 190, 0.28);
  box-shadow: 0 16px 42px rgba(15, 35, 70, 0.06);
}

.task-calendar-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef6;
}

.task-calendar-head h2,
.task-composer-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.task-calendar-head .panel-actions {
  align-items: center;
}

.task-period-nav {
  display: grid;
  grid-template-columns: 36px auto 36px minmax(160px, 1fr);
  align-items: center;
  gap: 8px;
}

.task-period-nav .compact-action {
  min-height: 36px;
  border-radius: 999px;
  border-color: #cfe0f5;
  background: #f8fbff;
  color: #27539f;
  font-weight: 900;
}

.task-period-nav .task-nav-arrow {
  width: 36px;
  padding: 0;
  background: #2f8ff7;
  border-color: #2f8ff7;
  color: #fff;
  font-size: 18px;
}

.task-period-nav #task-period-label {
  min-width: 0;
  color: var(--text);
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
}

.tasks-view-switch {
  overflow: hidden;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #cfe0f5;
}

.tasks-view-switch .segment {
  border-radius: 999px;
  color: #37619d;
}

.tasks-view-switch .segment.active {
  background: #2f8ff7;
  color: #fff;
}

.task-quick-add {
  margin-top: 16px;
  padding: 8px 8px 8px 14px;
  border-color: #d7e5f5;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74), 0 8px 22px rgba(15, 35, 70, 0.05);
}

.task-quick-add::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #17885a;
  font-weight: 1000;
}

.task-quick-add {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.task-quick-add input {
  min-height: 38px;
  font-weight: 800;
}

.task-quick-add .compact-action {
  min-height: 36px;
  border-radius: 999px;
  padding-inline: 16px;
  background: #2f8ff7;
  border-color: #2f8ff7;
  color: #fff;
}

.task-preset-bar {
  gap: 7px;
  margin-top: 14px;
}

.task-preset {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 13px;
  background: #fff;
  color: #52657f;
  font-weight: 850;
  box-shadow: 0 6px 18px rgba(15, 35, 70, 0.04);
}

.task-preset.active {
  background: #eef5ff;
  border-color: #8fc3ff;
  color: #1d5db8;
}

.task-calendar {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.task-calendar-grid {
  gap: 0;
  min-width: 0;
}

.task-calendar-week,
.task-calendar-month {
  grid-template-columns: repeat(7, minmax(66px, 1fr));
}

.task-calendar-day {
  min-width: 0;
  grid-template-columns: minmax(240px, 1fr);
}

.task-day {
  min-height: 118px;
  border: 0;
  border-right: 1px solid #e1e8f2;
  border-bottom: 1px solid #e1e8f2;
  border-radius: 0;
  padding: 9px;
  background: #fff;
  box-shadow: none;
}

.task-calendar-month .task-day {
  min-height: 92px;
}

.task-calendar-day .task-day {
  min-height: 220px;
}

.task-day:hover {
  background: #f8fbff;
}

.task-day.is-today {
  background: #f5faff;
  box-shadow: inset 0 0 0 2px rgba(47, 143, 247, 0.22);
}

.task-day.is-selected {
  background: #eef7ff;
  box-shadow: inset 0 0 0 2px rgba(47, 143, 247, 0.34);
}

.task-day.is-outside {
  background: #f7f9fc;
  border-style: solid;
}

.task-day header {
  margin-bottom: 10px;
  color: #8090a6;
}

.task-day header strong {
  font-size: 18px;
  color: #486482;
}

.task-day-block {
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  border-left: 0;
  padding: 5px 7px;
  background: #2f8ff7;
  color: #fff;
  box-shadow: 0 5px 12px rgba(47, 143, 247, 0.2);
}

.task-day-block[draggable="true"],
.task-focus-item[draggable="true"],
.task-pill[draggable="true"] {
  cursor: grab;
}

.task-day-block.is-dragging,
.task-focus-item.is-dragging,
.task-pill.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.task-day.is-drop-target,
.task-unscheduled-strip.is-drop-target {
  background: #eaf4ff;
  box-shadow: inset 0 0 0 2px #2f8ff7;
}

.task-day.is-drop-target header {
  color: #1d5db8;
}

.task-day-block.is-critical {
  background: #ef4444;
  color: #fff;
}

.task-day-block.is-high {
  background: #f59e0b;
  color: #fff;
}

.task-day-block.is-low {
  background: #62b9ae;
  color: #fff;
}

.task-day-block.is-done {
  background: #22a06b;
  color: #fff;
}

.task-day-block small {
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.task-day-focus {
  margin-top: 14px;
  padding: 14px;
  border-color: #dbe6f4;
  background: #f8fbff;
}

.task-day-focus-head {
  align-items: center;
}

.task-focus-key {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
}

.task-focus-item {
  grid-template-columns: minmax(0, 1.2fr) minmax(100px, 0.65fr) minmax(130px, 0.8fr) auto;
  border: 0;
  border-left: 5px solid #2f8ff7;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 35, 70, 0.05);
}

.task-unscheduled-strip {
  max-height: 240px;
  overflow-y: auto;
}

.task-filter-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fbfdff;
}

.task-filter-bar label {
  color: #52657f;
}

.task-filter-bar input,
.task-filter-bar select {
  min-height: 36px;
  border-color: #d7e2f0;
  background: #fff;
}

.task-search-filter {
  grid-column: span 2;
}

.task-agenda-disclosure {
  margin-top: 16px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fbfdff;
}

.task-agenda-disclosure summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.task-agenda-disclosure summary::-webkit-details-marker {
  display: none;
}

.task-agenda-disclosure summary span:first-of-type {
  flex: 1;
}

.task-agenda-disclosure summary::before {
  content: "›";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue-dark);
  font-size: 17px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.task-agenda-disclosure[open] summary::before {
  transform: rotate(90deg);
}

.task-agenda-disclosure .task-list {
  padding: 0 12px 12px;
}

.task-agenda-disclosure:not([open]) .task-list {
  display: none;
}

.task-list {
  gap: 9px;
}

.task-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  border: 1px solid #e0e8f3;
  border-left: 5px solid #2f8ff7;
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 35, 70, 0.045);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(15, 35, 70, 0.08);
}

.task-complete-control input {
  accent-color: #2f8ff7;
}

.task-card-head strong {
  font-size: 15px;
  line-height: 1.25;
}

.task-card p {
  margin: 7px 0 9px;
  line-height: 1.45;
}

.task-meta {
  gap: 6px 10px;
}

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

.task-actions .compact-action {
  border-radius: 999px;
}

.task-chip {
  min-height: 24px;
  padding: 3px 9px;
}

.task-chip.status-new {
  background: #eaf2ff;
  color: #1d5db8;
}

.task-composer-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  display: none;
  padding: 18px;
  overflow: hidden;
}

.task-composer-backdrop {
  display: none;
}

.task-composer-close {
  display: none;
}

body.task-composer-popup-open {
  overflow: hidden;
}

body.task-composer-popup-open .task-composer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  width: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(10, 20, 38, 0.42);
  cursor: default;
}

body.task-composer-popup-open .task-composer-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 81;
  display: block;
  width: min(860px, calc(100vw - 40px));
  max-height: min(92vh, 900px);
  padding: 22px;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}

body.task-composer-popup-open .task-composer-close {
  display: inline-flex;
}

.task-composer-head {
  margin: -18px -18px 6px;
  padding: 18px;
  border-bottom: 1px solid #e8eef6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 8px 8px 0 0;
}

body.task-composer-popup-open .task-composer-head {
  margin: -22px -22px 8px;
  padding: 22px 22px 18px;
}

.task-composer-form {
  gap: 0;
  min-width: 0;
  width: 100%;
}

.task-composer-section {
  gap: 10px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid #e8eef6;
  border-radius: 0;
  background: transparent;
  min-width: 0;
}

body.task-composer-popup-open .task-composer-section {
  padding: 18px 0;
}

.task-composer-primary {
  background: transparent;
}

.task-composer-section-head {
  margin-bottom: 2px;
}

.task-composer-section-head strong {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.task-composer-section-head span {
  font-weight: 650;
}

.task-composer-panel label {
  color: #40516f;
  font-size: 12px;
  min-width: 0;
}

.task-composer-panel input,
.task-composer-panel select,
.task-composer-panel textarea {
  max-width: 100%;
  min-height: 42px;
  border-color: #d7e2f0;
  border-radius: 7px;
  background: #fbfdff;
}

.task-composer-panel textarea {
  min-height: 126px;
}

.task-attachment-preview {
  background: #fbfdff;
}

.task-composer-actions {
  gap: 10px;
  margin: 0 -18px -18px;
  padding: 14px 18px 18px;
  border-radius: 0 0 8px 8px;
}

body.task-composer-popup-open .task-composer-actions {
  margin: 0 -22px -22px;
  padding: 16px 22px 22px;
}

.task-composer-actions .primary {
  flex: 1;
  border-radius: 999px;
}

.task-composer-actions .secondary {
  border-radius: 999px;
}

.task-workload-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8eef6;
}

.task-workload-row {
  min-height: 40px;
  padding: 8px;
  border-radius: 8px;
  background: #fbfdff;
}

.task-meta {
  color: #64748b;
  font-size: 13px;
}

.task-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
}

.task-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #94a3b8;
  margin-right: 6px;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef4ff;
  color: #31559f;
  font-size: 12px;
  font-weight: 900;
}

.task-chip.status-in_progress,
.task-chip.status-waiting {
  background: #fff3d8;
  color: #9a5a00;
}

.task-chip.status-done {
  background: #dff8e6;
  color: #24763a;
}

.task-chip.status-cancelled {
  background: #eef2f7;
  color: #64748b;
}

.task-chip.priority-critical,
.task-chip.priority-high {
  background: #ffe4e6;
  color: #b42318;
}

.task-chip.priority-normal {
  background: #f2f4f7;
  color: #475467;
}

.task-chip.priority-low {
  background: #edf7ee;
  color: #2f7b3a;
}

.task-workload-block {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.task-workload-block h3 {
  margin: 0;
}

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

.task-workload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.task-workload-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-workload-row span:last-child {
  color: var(--text);
  font-weight: 900;
}

.task-workload-row.has-overdue span:last-child {
  color: #b42318;
}

.avatar.small {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
}

.switch-field span {
  text-transform: none;
}

.attention-row td {
  background: #fffaf4;
}

.upload-dropzone,
.import-preview {
  border: 1px dashed #c8d7ea;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.upload-dropzone {
  display: grid;
  gap: 4px;
  color: var(--blue-dark);
}

.upload-dropzone span,
.import-preview span {
  color: var(--muted);
  font-size: 13px;
}

.upload-dropzone.is-dragging {
  border-color: var(--green);
  background: #f4fbf1;
}

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

.asset-filter-panel {
  display: grid;
  gap: 18px;
}

.asset-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 18px;
}

.asset-filter-field {
  position: relative;
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--blue-dark);
  font-weight: 900;
  text-transform: none;
  min-width: 0;
}

.asset-filter-field > span:not(.asset-filter-icon) {
  padding-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-filter-field input,
.asset-filter-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding-left: 42px;
  padding-right: 32px;
  border-radius: 8px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.asset-filter-icon {
  position: absolute;
  left: 12px;
  bottom: 9px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: #ff9500;
  background: #fff4e2;
  font-size: 0.76rem;
  font-weight: 950;
  pointer-events: none;
}

.asset-filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.asset-filter-actions .secondary {
  min-width: 150px;
  min-height: 46px;
}

.asset-filter-actions #asset-show-filters {
  border-color: var(--blue);
  color: #ffffff;
  background: var(--blue);
}

.asset-attention-toggle {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

#asset-metrics {
  display: block;
}

.asset-action-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 18px;
  position: sticky;
  top: 8px;
  z-index: 4;
  pointer-events: none;
}

.asset-primary-action {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #3447c7;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-weight: 900;
  pointer-events: auto;
}

.asset-primary-action:hover:not(:disabled) {
  background: #2b3eb6;
}

.asset-primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.asset-report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.asset-report-title {
  grid-column: 1 / -1;
}

.asset-report-title h2 {
  margin: 2px 0 0;
  font-size: clamp(1.4rem, 1.8vw, 2.15rem);
}

.asset-report-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px 24px;
}

.asset-report-stat {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon value"
    "icon label";
  gap: 2px 12px;
  align-items: center;
  min-height: 58px;
}

.asset-report-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #2450bc;
  background: #eef4ff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.asset-report-icon-employees,
.asset-report-icon-service {
  color: #20814f;
  background: #e8f8ee;
}

.asset-report-icon-lost,
.asset-report-icon-broken {
  color: #d43f3a;
  background: #fff0f1;
}

.asset-report-stat strong {
  grid-area: value;
  color: var(--text);
  font-size: 1.35rem;
}

.asset-report-stat span:not(.asset-report-icon) {
  grid-area: label;
  color: var(--muted);
  font-weight: 800;
}

.asset-report-total {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 16px;
  min-width: 360px;
  padding: 22px;
  border-radius: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 105%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #3149cf, #4869e6);
}

.asset-report-total div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.asset-report-total strong {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.1;
}

.asset-report-total span {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 900;
}

.asset-tool-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfdff;
  display: grid;
  gap: 12px;
}

.asset-tool-box h3 {
  margin: 0;
}

.asset-card-photo,
.asset-card-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8fd;
}

.asset-card-photo {
  display: block;
  object-fit: cover;
}

.asset-card-photo-placeholder {
  display: grid;
  place-items: center;
  color: #5f718f;
  font-size: 13px;
  font-weight: 800;
}

.asset-photo-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.asset-photo-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.asset-card {
  cursor: pointer;
  overflow: hidden;
  align-items: start;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "select select"
    "photo head"
    "holder holder"
    "metrics metrics"
    "notes notes"
    "actions actions";
}

#asset-inventory-grid {
  display: block;
}

#view-assets .logistics-layout {
  grid-template-columns: minmax(0, 1fr);
}

#view-assets .form-panel {
  max-width: 980px;
}

.asset-table-shell {
  display: grid;
  gap: 16px;
}

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

.asset-worker-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  table-layout: fixed;
}

.asset-worker-table th,
.asset-worker-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.asset-worker-table th:nth-child(1),
.asset-worker-table td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.asset-worker-table th:nth-child(2),
.asset-worker-table td:nth-child(2) {
  width: 78px;
}

.asset-worker-table th:nth-child(3),
.asset-worker-table td:nth-child(3) {
  width: 100px;
}

.asset-worker-table th:nth-child(4),
.asset-worker-table td:nth-child(4) {
  width: 230px;
}

.asset-worker-table th:nth-child(5),
.asset-worker-table td:nth-child(5) {
  width: 115px;
}

.asset-worker-table th:nth-child(6),
.asset-worker-table td:nth-child(6) {
  width: 250px;
}

.asset-worker-table th:nth-child(7),
.asset-worker-table td:nth-child(7) {
  width: 110px;
  text-align: right;
}

.asset-worker-table th:nth-child(8),
.asset-worker-table td:nth-child(8) {
  width: 160px;
}

.asset-worker-table th:nth-child(9),
.asset-worker-table td:nth-child(9) {
  width: 160px;
}

.asset-worker-table th:nth-child(10),
.asset-worker-table td:nth-child(10) {
  width: 170px;
}

.asset-worker-table th {
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.asset-sort-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  text-transform: inherit;
}

.asset-sort-button:hover,
.asset-sort-button.is-active {
  color: var(--blue);
}

.asset-worker-table th:last-child,
.asset-worker-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--panel);
  box-shadow: -14px 0 22px rgba(15, 33, 58, 0.08);
}

.asset-worker-table th:last-child {
  z-index: 2;
  background: var(--panel-soft);
}

.asset-worker-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.asset-worker-row.is-issued {
  background: rgba(77, 112, 224, 0.035);
}

.asset-worker-row:hover {
  background: rgba(77, 112, 224, 0.08);
}

.asset-worker-table td > strong,
.asset-worker-table td strong {
  color: var(--text);
}

.asset-worker-table td > span,
.asset-worker-table .muted {
  display: block;
  margin-top: 4px;
}

.asset-worker-table .asset-card-photo,
.asset-worker-table .asset-card-photo-placeholder {
  width: 74px;
  height: 74px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 33, 58, 0.1);
}

.asset-location-cell,
.asset-additional-info {
  display: grid;
  gap: 6px;
}

.asset-location-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.asset-location-title::before {
  content: "";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #ffffff;
  background: #31559f;
  font-size: 0.72rem;
  font-weight: 950;
}

.asset-location-employee::before {
  content: "EM";
  background: #2f80ed;
}

.asset-location-storage::before {
  content: "ST";
  background: #ff9500;
}

.asset-location-empty::before {
  content: "!";
  background: #ef4444;
}

.asset-additional-info {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.asset-additional-info > span:not(:has(.badge)) {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #40577a;
  background: #f8fbff;
  font-size: 0.78rem;
  font-weight: 900;
}

.asset-history-link {
  width: fit-content;
  border: 0;
  padding: 0 0 2px;
  color: var(--blue);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.asset-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.asset-row-action {
  min-width: 58px;
  min-height: 38px;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
}

.asset-row-action-info {
  color: #35506a;
  border-color: #c9d7e5;
  background: #f8fbff;
}

.asset-row-action-issue {
  color: #1f62c9;
  border-color: #b7d3ff;
  background: #eff6ff;
}

.asset-row-action-photo {
  color: #bf6a12;
  border-color: #ffd49a;
  background: #fff8ec;
}

body.theme-dark .asset-row-action-info {
  color: #d7e7fb;
  border-color: #35506a;
  background: rgba(148, 163, 184, 0.12);
}

body.theme-dark .asset-row-action-issue {
  color: #b8cdfd;
  border-color: #365fa8;
  background: rgba(77, 112, 224, 0.18);
}

body.theme-dark .asset-row-action-photo {
  color: #ffd38b;
  border-color: #8a5a1e;
  background: rgba(245, 158, 11, 0.14);
}

.asset-row-check {
  width: 18px;
  height: 18px;
}

.asset-pagination {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
  padding: 4px 2px 0;
}

.asset-page-size {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.asset-page-size select {
  min-height: 36px;
  padding: 0 32px 0 10px;
  border-radius: 8px;
  font-weight: 900;
}

.asset-page-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.asset-page-buttons .is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

body.theme-dark .asset-report-total {
  background:
    radial-gradient(circle at 15% 105%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(135deg, #273a9e, #355bd6);
}

body.theme-dark .asset-tool-box {
  color: var(--text);
  border-color: #274263;
  background: rgba(15, 23, 42, 0.88);
}

body.theme-dark .asset-tool-box h3,
body.theme-dark .asset-tool-box label,
body.theme-dark .asset-tool-box p,
body.theme-dark .asset-tool-box .muted {
  color: var(--muted);
}

body.theme-dark .asset-tool-box h3 {
  color: var(--text);
}

body.theme-dark .asset-additional-info > span:not(:has(.badge)) {
  color: #c7d2e8;
  border-color: #274263;
  background: rgba(148, 163, 184, 0.08);
}

.asset-current-holder-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.asset-current-holder-card > div {
  display: grid;
  gap: 6px;
}

.asset-current-holder-card .asset-location-title {
  font-size: 1.05rem;
}

.asset-detail-assignments .compact-list {
  position: relative;
}

.asset-assignment-history-card {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
}

.asset-history-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(77, 112, 224, 0.14);
}

body.theme-dark .asset-current-holder-card {
  border-color: #274263;
  background: rgba(148, 163, 184, 0.08);
}

.asset-page-ellipsis {
  color: var(--muted);
  padding: 0 4px;
}

@media (max-width: 1100px) {
  .asset-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .asset-report-hero {
    grid-template-columns: 1fr;
  }

  .asset-report-stats {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .asset-report-total {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .asset-action-toolbar {
    flex-direction: column;
  }

  .asset-primary-action {
    width: 100%;
  }

  .asset-filter-grid {
    grid-template-columns: 1fr;
  }

  .asset-filter-actions .secondary {
    width: 100%;
  }

  .asset-report-hero {
    padding: 18px;
  }

  .asset-report-stats,
  .asset-report-total {
    grid-template-columns: 1fr;
  }

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

.asset-select-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 10px;
  color: #40577a;
  font-size: 13px;
  font-weight: 800;
  grid-area: select;
  text-transform: none;
}

.asset-card .asset-card-photo,
.asset-card .asset-card-photo-placeholder {
  aspect-ratio: 1 / 1;
  grid-area: photo;
  max-height: 96px;
  min-width: 0;
}

.asset-card .project-card-head {
  grid-area: head;
  min-width: 0;
}

.asset-card .project-card-head > div {
  min-width: 0;
}

.asset-card .project-card-head strong,
.asset-card .project-card-head span,
.asset-card .project-card-head .muted {
  overflow-wrap: anywhere;
}

.asset-card .badge {
  flex: 0 0 auto;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card .project-card-metrics {
  grid-area: metrics;
}

.asset-card .asset-holder-summary {
  grid-area: holder;
}

.asset-card > p {
  grid-area: notes;
}

.asset-card .inline-actions {
  grid-area: actions;
}

.asset-holder-summary {
  background: #fbfdff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  color: #182235;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.asset-holder-summary span {
  color: #5f718f;
}

.asset-card .project-card-metrics div {
  color: #182235;
}

.asset-card .project-card-metrics strong {
  color: #182235;
}

.asset-holder-summary strong {
  display: block;
  margin-bottom: 2px;
}

.asset-employee-result {
  cursor: default;
  gap: 12px;
}

.asset-employee-summary,
.asset-employee-tools {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.asset-employee-summary strong,
.asset-employee-tools strong {
  color: var(--text);
}

.asset-employee-tools > div {
  display: grid;
  gap: 2px;
}

.asset-select-row input {
  width: 18px;
  height: 18px;
}

.asset-detail-modal {
  width: min(1240px, calc(100vw - 40px));
}

.asset-detail-body {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 22px;
}

.asset-detail-preview {
  display: grid;
  align-content: start;
  gap: 12px;
}

.asset-detail-preview .asset-card-photo,
.asset-detail-preview .asset-card-photo-placeholder {
  aspect-ratio: 1 / 1;
}

.asset-detail-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.asset-detail-assignments {
  display: grid;
  gap: 14px;
}

.asset-assignment-history-card {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.asset-assignment-history-card .inline-actions {
  flex-shrink: 0;
}

.asset-person-search {
  display: grid;
  gap: 8px;
}

.asset-person-results {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.asset-person-option {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.asset-person-option strong {
  font-size: 0.95rem;
}

.asset-person-option span,
.asset-person-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.asset-person-option:hover {
  border-color: var(--blue);
  background: #f6f9ff;
}

.asset-person-option.is-selected {
  border-color: var(--blue);
  background: #eef4ff;
  box-shadow: inset 3px 0 0 var(--green);
}

.asset-person-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 11px;
}

.asset-scan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.asset-scan-card strong {
  display: block;
  font-size: 1.1rem;
}

.compact-grid {
  align-items: end;
}

.signature-block {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.signature-block canvas {
  width: 100%;
  height: 150px;
  border: 1px dashed #aebed4;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

@media (max-width: 900px) {
  .asset-tools-grid {
    grid-template-columns: 1fr;
  }

  .asset-detail-body {
    grid-template-columns: 1fr;
  }
}

.import-preview {
  display: grid;
  gap: 4px;
  border-style: solid;
}

.import-preview.is-warning {
  border-color: #f4bf91;
  background: #fff7ef;
}

.import-preview.is-ready {
  border-color: #b9dcae;
  background: #f5fbf2;
}

.advanced-import summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 800;
}

.advanced-import label {
  margin-top: 10px;
}

.rotation-toolbar {
  display: grid;
  grid-template-columns: 150px 150px 150px minmax(180px, 1fr) auto 220px auto auto auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.rotation-toolbar .rotation-fired-toggle {
  align-self: end;
  justify-self: start;
  white-space: nowrap;
}

.compact-import-preview {
  margin: -4px 0 16px;
  padding: 10px 14px;
}

.rotation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 18px;
  align-items: start;
}

.rotation-panel,
.rotation-side {
  min-height: 480px;
}

.rotation-matrix-wrap {
  overflow: auto;
  max-height: min(620px, calc(100vh - 260px));
  border: 1px solid #e7eef7;
  border-radius: 8px;
  overscroll-behavior: contain;
}

.rotation-matrix {
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
}

.rotation-matrix th,
.rotation-matrix td {
  background: #fff;
  border-bottom: 1px solid #e8eef6;
  border-right: 1px solid #e8eef6;
  padding: 3px;
  min-width: 88px;
}

.rotation-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 1px 0 #e8eef6;
}

.rotation-matrix .rotation-virtual-spacer td {
  background: transparent;
  border: 0;
  padding: 0;
}

.rotation-matrix th:first-child,
.rotation-person {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 178px;
  max-width: 178px;
  width: 178px;
}

.rotation-matrix th:first-child {
  z-index: 5;
}

.rotation-person {
  background: #fbfdff;
}

.rotation-project-label {
  border-left: 4px solid var(--rotation-project-border);
}

.rotation-person strong,
.rotation-person span {
  display: block;
}

.rotation-person span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

.rotation-person[draggable="true"] {
  cursor: grab;
}

.rotation-person.is-row-dragging {
  opacity: 0.5;
}

.rotation-person.rotation-row-drop-before {
  box-shadow: inset 0 2px 0 var(--blue);
}

.rotation-person.rotation-row-drop-after {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.rotation-cell {
  display: grid;
  gap: 1px;
  border: 1px solid #dde8f4;
  border-radius: 6px;
  padding: 3px 6px;
  min-height: 24px;
  background: #f8fbff;
  color: #24344f;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.1;
  user-select: none;
  overflow: hidden;
}

.rotation-cell-value,
.rotation-cell-note {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rotation-cell-note {
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.78;
  text-transform: uppercase;
}

.rotation-fullscreen-mode {
  overflow: hidden;
}

.rotation-fullscreen-mode .sidebar,
.rotation-fullscreen-mode .topbar,
.rotation-fullscreen-mode #rotation-metrics,
.rotation-fullscreen-mode .rotation-side {
  display: none;
}

.rotation-fullscreen-mode .app-shell {
  display: block;
}

.rotation-fullscreen-mode .workspace {
  height: 100vh;
  padding: 12px;
  overflow: hidden;
}

.rotation-fullscreen-mode .view:not(#view-logistics) {
  display: none;
}

.rotation-fullscreen-mode #view-logistics {
  display: block;
  height: calc(100vh - 24px);
}

.rotation-fullscreen-mode .logistics-module-grid,
.rotation-fullscreen-mode .logistics-overview-pane,
.rotation-fullscreen-mode .logistics-insights-panel,
.rotation-fullscreen-mode .logistics-workspace-layout,
.rotation-fullscreen-mode .logistics-action-grid {
  display: none;
}

.rotation-fullscreen-mode #rotation-logistics-pane {
  display: block;
  height: calc(100vh - 24px);
}

.rotation-fullscreen-mode .rotation-toolbar {
  grid-template-columns: 140px 150px 150px minmax(220px, 1fr) 200px auto auto auto;
  margin-bottom: 10px;
}

.rotation-fullscreen-mode .rotation-layout {
  display: block;
  height: calc(100vh - 94px);
}

.rotation-fullscreen-mode .rotation-panel {
  height: 100%;
  padding: 12px;
}

.rotation-fullscreen-mode .rotation-matrix-wrap {
  max-height: none;
  height: calc(100% - 52px);
}

.rotation-fullscreen-mode .rotation-matrix {
  min-width: 950px;
  width: max-content;
}

.rotation-fullscreen-mode .rotation-matrix th,
.rotation-fullscreen-mode .rotation-matrix td {
  min-width: 96px;
  max-width: 96px;
}

.rotation-fullscreen-mode .rotation-matrix th:first-child,
.rotation-fullscreen-mode .rotation-person {
  min-width: 190px;
  max-width: 190px;
  width: 190px;
}

.rotation-map-fullscreen-mode {
  overflow: hidden;
}

.rotation-map-fullscreen-mode .sidebar,
.rotation-map-fullscreen-mode .topbar,
.rotation-map-fullscreen-mode .logistics-module-grid,
.rotation-map-fullscreen-mode .logistics-overview-pane,
.rotation-map-fullscreen-mode .logistics-insights-panel,
.rotation-map-fullscreen-mode .logistics-workspace-layout,
.rotation-map-fullscreen-mode .logistics-action-grid,
.rotation-map-fullscreen-mode .rotation-toolbar,
.rotation-map-fullscreen-mode .compact-import-preview,
.rotation-map-fullscreen-mode #rotation-metrics,
.rotation-map-fullscreen-mode .bulk-bar,
.rotation-map-fullscreen-mode .rotation-layout {
  display: none;
}

.rotation-map-fullscreen-mode .app-shell {
  display: block;
}

.rotation-map-fullscreen-mode .workspace {
  height: 100vh;
  padding: 12px;
  overflow: hidden;
}

.rotation-map-fullscreen-mode .view:not(#view-logistics) {
  display: none;
}

.rotation-map-fullscreen-mode #view-logistics,
.rotation-map-fullscreen-mode #rotation-logistics-pane {
  display: block;
  height: calc(100vh - 24px);
}

.rotation-map-fullscreen-mode .rotation-map-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 12px;
}

.rotation-map-fullscreen-mode .rotation-map-layout {
  flex: 1;
  min-height: 0;
}

.rotation-map-fullscreen-mode .rotation-map-canvas {
  height: 100%;
  min-height: 0;
}

.rotation-map-fullscreen-mode .rotation-map-side {
  min-height: 0;
  overflow: auto;
}

.rotation-cell[draggable="true"] {
  cursor: grab;
}

.rotation-cell.is-project {
  background: var(--rotation-project-bg, #edf4ff);
  border-color: var(--rotation-project-border, #c8d8f5);
  color: var(--rotation-project-text, var(--blue-dark));
}

.rotation-cell[role="button"],
button.rotation-cell {
  appearance: none;
  text-align: left;
  width: 100%;
}

.rotation-project-week {
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 56px;
}

.rotation-project-week strong,
.rotation-project-week span,
.rotation-project-week small {
  display: block;
}

.rotation-project-week strong {
  font-size: 15px;
}

.rotation-project-week span,
.rotation-project-week small {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.82;
}

.rotation-project-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 22px;
}

.rotation-project-employee-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(71, 111, 202, 0.22);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.76);
  color: #24344f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 1px 2px rgba(18, 32, 55, 0.08);
  cursor: grab;
}

.rotation-project-employee-chip:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.rotation-project-employee-chip.is-dragging {
  opacity: 0.45;
}

.rotation-project-empty {
  align-self: center;
  color: inherit;
  opacity: 0.62;
}

.rotation-map-panel {
  margin-bottom: 18px;
}

.rotation-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: stretch;
}

.rotation-map-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.rotation-map-address {
  display: grid;
  grid-template-columns: minmax(220px, 340px) auto auto;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 520px);
}

.rotation-map-address input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.rotation-map-address .muted {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.2;
}

.rotation-map-layers {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.rotation-layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
  color: #344966;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.rotation-layer-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.rotation-layer-toggle small {
  color: var(--muted);
  font-size: 11px;
}

.rotation-map-canvas {
  position: relative;
  height: clamp(680px, 68vh, 900px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(74, 111, 202, 0.12), rgba(41, 151, 107, 0.08)),
    radial-gradient(circle at 72% 46%, rgba(86, 175, 255, 0.22), transparent 24%),
    #f8fbff;
}

.rotation-map-canvas.leaflet-container {
  background: #eaf1f8;
  font: inherit;
}

.rotation-map-canvas.leaflet-container::before {
  display: none;
}

.rotation-map-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 88, 124, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 88, 124, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.7;
}

.rotation-map-outline {
  position: absolute;
  inset: 8% 12% 8% 18%;
  border: 1px solid rgba(71, 111, 202, 0.32);
  background: rgba(255, 255, 255, 0.48);
  clip-path: polygon(44% 0, 63% 4%, 74% 16%, 66% 30%, 78% 43%, 65% 56%, 71% 74%, 58% 92%, 38% 100%, 28% 82%, 12% 78%, 20% 58%, 5% 42%, 22% 26%, 24% 10%);
}

.rotation-map-label {
  position: absolute;
  color: #617292;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.rotation-map-label.north {
  left: 29%;
  top: 20%;
}

.rotation-map-label.west {
  left: 28%;
  top: 49%;
}

.rotation-map-label.center {
  left: 38%;
  top: 69%;
}

.rotation-map-label.east {
  left: 62%;
  top: 61%;
}

.rotation-map-pin {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 2px;
  min-width: 86px;
  max-width: 138px;
  min-height: 46px;
  border: 1px solid #b9cdf0;
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(24, 44, 78, 0.12);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rotation-map-pin strong,
.rotation-map-pin span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rotation-map-pin strong {
  font-size: 12px;
}

.rotation-map-pin span {
  color: #5c6f90;
  font-size: 11px;
  font-weight: 800;
}

.rotation-map-pin.good {
  border-color: #9bd3a3;
}

.rotation-map-pin.warning {
  border-color: #f3b36d;
}

.rotation-map-marker {
  display: grid;
  gap: 1px;
  min-width: 92px;
  max-width: 120px;
  border: 1px solid #9bd3a3;
  border-radius: 8px;
  padding: 6px 8px;
  color: #174f2a;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(24, 44, 78, 0.2);
  font: inherit;
  line-height: 1.1;
}

.rotation-map-marker strong,
.rotation-map-marker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rotation-map-marker strong {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.rotation-map-marker span {
  color: #5c6f90;
  font-size: 11px;
  font-weight: 800;
}

.rotation-map-marker.warning {
  border-color: #f3b36d;
  color: #8a4b00;
}

.rotation-map-marker.is-selected {
  outline: 3px solid rgba(71, 111, 202, 0.36);
  outline-offset: 2px;
}

.rotation-map-draft-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(24, 44, 78, 0.22);
  font-size: 20px;
  font-weight: 900;
}

.rotation-map-search-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 12px 24px rgba(24, 44, 78, 0.24);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.rotation-map-search-marker.is-static {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
}

.rotation-map-create-actions {
  display: grid;
  gap: 7px;
}

.rotation-map-create-actions button {
  width: 100%;
}

.rotation-map-layer-pin {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #234a8f;
  color: #fff;
  box-shadow: 0 10px 22px rgba(24, 44, 78, 0.22);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.rotation-map-layer-pin.housing {
  background: #2f855a;
}

.rotation-map-layer-pin.cars {
  background: #4a6fca;
}

.rotation-map-layer-pin.tickets {
  background: #7c3aed;
}

.rotation-map-layer-pin.warning {
  background: #f97316;
}

.rotation-map-popup {
  display: grid;
  gap: 8px;
  min-width: 200px;
}

.rotation-map-popup > strong {
  color: var(--text);
}

.rotation-map-popup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rotation-map-popup dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.rotation-map-popup dl div {
  padding: 8px;
  border-radius: 8px;
  background: #f3f7fc;
}

.rotation-map-popup dt,
.rotation-map-popup dd {
  margin: 0;
}

.rotation-map-popup dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rotation-map-popup dd {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.rotation-map-pin.is-selected,
.rotation-map-row.is-selected {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.rotation-map-context {
  position: absolute;
  z-index: 4;
  transform: translate(-8px, -8px);
  display: grid;
  gap: 8px;
  width: min(230px, calc(100% - 24px));
  border: 1px solid #b9cdf0;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 44, 78, 0.2);
}

.rotation-map-context span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rotation-map-side {
  min-width: 0;
}

.rotation-map-planner {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 22px rgba(24, 44, 78, 0.06);
}

.rotation-map-planner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rotation-map-planner-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rotation-map-planner-head strong,
.rotation-map-candidates strong {
  color: var(--text);
  font-size: 14px;
}

.rotation-map-plan-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.rotation-map-plan-metrics div,
.rotation-map-recommendation,
.rotation-map-plan-empty {
  min-width: 0;
  border: 1px solid #e4edf8;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.rotation-map-plan-metrics span,
.rotation-map-recommendation span,
.rotation-map-recommendation small,
.rotation-map-actions-list span,
.rotation-map-candidates span,
.rotation-map-plan-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rotation-map-plan-metrics strong,
.rotation-map-recommendation strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.rotation-map-recommendation {
  border-color: rgba(74, 111, 202, 0.22);
  background: #f5f8ff;
}

.rotation-map-actions-list,
.rotation-map-candidates {
  display: grid;
  gap: 6px;
}

.rotation-map-action-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rotation-map-action-buttons button,
.rotation-map-recommendation button {
  width: 100%;
}

.rotation-map-actions-list span,
.rotation-map-candidates span,
.rotation-map-candidate {
  display: block;
  border: 1px solid #e4edf8;
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.rotation-map-candidate {
  cursor: pointer;
}

.rotation-map-candidate:hover {
  border-color: #b9cdf0;
  color: var(--blue-dark);
}

.rotation-map-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.rotation-cell.is-vacation {
  background: #fff3e7;
  border-color: #f0c8a4;
  color: var(--orange);
}

.rotation-cell.is-vacation.has-return-ticket {
  background: #edf9ef;
  border-color: #8fd29f;
  color: #146c2e;
}

.rotation-cell.is-vacation.needs-return-ticket {
  background: #fff0f0;
  border-color: #ee8f8f;
  color: #aa1f1f;
}

.rotation-cell.is-unplanned {
  background: #f2f5f9;
  border-color: #d7e0eb;
  color: #64748b;
}

.rotation-cell.is-fired {
  background: #fff0f0;
  border-color: #efbbbb;
  color: var(--red);
}

.rotation-cell.is-empty {
  background: #fff;
  color: #a7b4c6;
}

.rotation-cell.drop-target {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.rotation-cell.is-selected {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(71, 111, 202, 0.12);
}

.rotation-cell.is-bulk-selected {
  outline: 2px solid #7c9ff0;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(124, 159, 240, 0.16);
}

.rotation-context-menu {
  position: fixed;
  z-index: 1300;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(27, 46, 79, 0.22);
}

.rotation-context-menu[hidden] {
  display: none;
}

.rotation-context-head {
  display: grid;
  gap: 3px;
  padding: 2px 2px 6px;
}

.rotation-context-head strong {
  color: var(--ink);
  font-size: 14px;
}

.rotation-context-head span,
.rotation-context-menu label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rotation-context-menu label {
  display: grid;
  gap: 5px;
}

.rotation-context-menu select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.rotation-context-menu button {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.rotation-context-menu button span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.rotation-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.logistics-context-menu button {
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
}

.logistics-context-menu button span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.rotation-context-menu hr {
  width: 100%;
  margin: 2px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.rotation-assignment-editor label {
  display: grid;
  gap: 6px;
  color: #3e5174;
  font-weight: 700;
}

.rotation-assignment-editor select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.capacity-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.capacity-row strong {
  display: block;
  margin-bottom: 3px;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

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

.detail-card h3 {
  margin: 0 0 5px;
  color: var(--text);
}

.detail-card p {
  margin: 0 0 12px;
}

.detail-grid,
.detail-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.detail-grid {
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}

.detail-grid span,
.detail-list span,
.empty-detail span {
  color: var(--muted);
}

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

.detail-list div {
  border-top: 1px solid #e8eef6;
  padding-top: 8px;
}

.empty-detail {
  display: grid;
  gap: 6px;
  border: 1px dashed #cbd8e7;
  border-radius: 8px;
  padding: 14px;
}

.notification-widget-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 118px;
  padding-left: 16px;
  padding-right: 14px;
  overflow: visible;
  white-space: nowrap;
  border-color: #c9d8ea;
}

.notification-widget-button:hover,
.notification-widget-button[aria-expanded="true"] {
  border-color: var(--blue);
  background: #f5f8fe;
}

.notification-widget-button strong {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(232, 96, 27, 0.24);
}

.notification-widget-button.has-critical strong {
  background: var(--red);
  box-shadow: 0 8px 18px rgba(204, 50, 50, 0.26);
}

.notification-center {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 2500;
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 128px);
  overflow: auto;
  background: #fff;
  border: 1px solid #d8e3f2;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(7, 20, 43, 0.18);
  padding: 18px;
}

.meetings-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.4fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.participant-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.participant-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.participant-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.participant-chip.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(65, 107, 196, 0.14);
}

.active-meeting-panel {
  min-height: 560px;
}

.meeting-entry-form,
.meeting-widget-form {
  position: relative;
  display: grid;
  gap: 10px;
}

.meeting-entry-form textarea,
.meeting-widget-form textarea {
  width: 100%;
  resize: vertical;
}

.meeting-entry-actions {
  display: grid;
  grid-template-columns: minmax(130px, 180px) auto;
  gap: 10px;
  justify-content: end;
  align-items: center;
}

.mention-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 44px);
  z-index: 4;
  display: grid;
  gap: 4px;
  border: 1px solid #cbd9eb;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 35, 67, 0.18);
}

.mention-list button {
  display: grid;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.mention-list button:hover {
  background: #eef5ff;
}

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

.meeting-entry-list,
.meeting-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.meeting-history-filters {
  margin-top: 10px;
}

.meeting-entry-card,
.meeting-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.meeting-entry-card p,
.meeting-entry-card small,
.meeting-history-card span {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.meeting-entry-card strong,
.meeting-history-card strong {
  display: block;
  margin-bottom: 3px;
}

.meeting-history-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.meeting-detail-body {
  display: grid;
  gap: 14px;
}

.meeting-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.meeting-detail-summary div {
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.meeting-detail-summary span,
.meeting-detail-summary strong {
  display: block;
}

.meeting-detail-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meeting-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2200;
  width: min(430px, calc(100vw - 48px));
  border: 1px solid #cbd9eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 23, 47, 0.24);
  overflow: hidden;
}

.meeting-widget-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #e8eef6;
  background: #f8fbff;
}

.meeting-widget-title {
  display: grid;
  gap: 2px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.meeting-widget-title span {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.meeting-widget-actions {
  display: flex;
  gap: 6px;
}

.meeting-widget-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.meeting-live-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.meeting-live-row strong {
  color: var(--blue-dark);
  font-variant-numeric: tabular-nums;
}

.meeting-participant-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meeting-participant-strip span {
  border: 1px solid #dce8f6;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meeting-widget.is-collapsed .meeting-widget-body {
  display: none;
}

.widget-mention-list {
  top: auto;
  bottom: 58px;
}

@media (max-width: 1180px) {
  .meetings-layout {
    grid-template-columns: 1fr;
  }

  .active-meeting-panel {
    min-height: 0;
  }

  .meeting-widget {
    right: 12px;
    bottom: 12px;
    width: min(430px, calc(100vw - 24px));
  }
}

.notification-center-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.notification-center-head h2 {
  margin: 2px 0;
}

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

.notification-card,
.notification-empty {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe8f5;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

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

.notification-card.warning {
  border-left-color: var(--orange);
}

.notification-card.is-new {
  background: #f8fbff;
}

.notification-card strong,
.notification-empty strong {
  display: block;
}

.notification-card span,
.notification-empty span {
  color: var(--muted);
}

.notification-meta,
.notification-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
}

.profile-card-panel {
  align-content: start;
  display: grid;
  gap: 16px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  align-items: center;
  margin: 4px 0 2px;
}

.profile-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #eaf2fc;
  color: var(--blue-dark);
  border: 1px solid #d7e3f2;
  font-size: 34px;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-content {
  min-width: 0;
}

.profile-role-chip {
  color: #234a8f;
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-hero-content h3 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.profile-hero-content p {
  color: var(--muted);
  margin-bottom: 12px;
}

.profile-photo-action {
  display: inline-flex;
  margin-right: 8px;
  cursor: pointer;
}

.profile-photo-action input {
  display: none;
}

.profile-form-grid {
  padding: 0;
}

.profile-form-panel {
  position: sticky;
  top: 20px;
}

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

.profile-status-card,
.profile-mini-panel,
.profile-leave-panel {
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 14px;
}

.profile-status-card span,
.profile-detail-list span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-status-card strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.profile-status-card small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

.profile-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

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

.profile-mini-head h3 {
  font-size: 15px;
  margin: 0;
}

.profile-detail-list,
.profile-list {
  display: grid;
  gap: 8px;
}

.profile-detail-list div,
.profile-list-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.profile-detail-list strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.profile-list-item {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.profile-list-item strong,
.profile-list-item span {
  display: block;
}

.profile-list-item span {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 3px;
}

.profile-leave-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-leave-form textarea {
  min-height: 96px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 4000;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(420px, calc(100vw - 48px));
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 20, 43, 0.55);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1160px, calc(100vw - 40px));
  max-height: min(920px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(18, 35, 62, 0.24);
}

.compact-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  border-color: #cbd9eb;
  box-shadow: 0 30px 90px rgba(9, 23, 47, 0.34);
}

.project-detail-modal {
  width: min(1420px, calc(100vw - 32px));
}

.hours-detail-modal {
  width: min(920px, calc(100vw - 32px));
}

.employee-modal-panel {
  width: min(1320px, calc(100vw - 32px));
}

.employee-import-modal-panel {
  width: min(1180px, calc(100vw - 32px));
}

.employee-import-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.employee-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.employee-import-table-wrap {
  margin-top: 16px;
  max-height: 460px;
}

.modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #e8eef6;
  padding: 10px 16px 0;
  background: #fbfdff;
}

.workspace-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #38527a;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
  white-space: nowrap;
}

.workspace-tab.active {
  border-color: #d8e3f0;
  background: #fff;
  color: var(--blue-dark);
}

.project-workspace-body {
  max-height: calc(min(860px, calc(100vh - 48px)) - 126px);
}

.project-tab-panel {
  display: none;
}

.project-tab-panel.active {
  display: grid;
  gap: 14px;
}

.project-overview-grid,
.project-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.project-overview-grid .detail-card:first-child {
  grid-row: span 2;
}

.project-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 24px;
}

.project-modal-main {
  display: grid;
  align-content: start;
  gap: 14px;
}

.project-modal-summary {
  display: grid;
  align-content: start;
  gap: 14px;
}

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

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

.mini-kpi {
  border: 1px solid #e2ebf7;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.mini-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 20px;
}

.mini-kpi small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.project-center-card {
  border: 1px solid #e2ebf7;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.detail-card {
  min-width: 0;
  border: 1px solid #e2ebf7;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

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

.card-headline h3 {
  margin: 0;
}

.mini-table-wrap {
  overflow-x: auto;
}

.mini-table-wrap table {
  min-width: 560px;
}

.compact-list {
  max-height: 360px;
  overflow-y: auto;
}

.contact-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.contact-detail-main,
.contact-activity-side {
  display: grid;
  gap: 14px;
}

.contact-detail-card {
  min-width: 0;
  border: 1px solid #e2ebf7;
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.contact-activity-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.contact-activity-item {
  display: grid;
  gap: 8px;
  border: 1px solid #e2ebf7;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.contact-activity-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.contact-activity-item span,
.contact-activity-item p {
  margin: 0;
  color: var(--muted);
}

.project-people-list {
  max-height: min(560px, calc(100vh - 260px));
}

.project-person-card,
.record-row-card,
.staffing-demand-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

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

.staffing-demand-meter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.staffing-demand-meter span {
  display: grid;
  gap: 2px;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
}

.staffing-demand-meter strong {
  color: var(--text);
  font-size: 18px;
}

.document-placeholder-list,
.project-document-list,
.project-timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.document-placeholder,
.project-document-card,
.timeline-item {
  display: grid;
  gap: 4px;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.staff-request-history {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.staff-request-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.staff-request-history-item::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: -10px;
  left: 6px;
  width: 2px;
  background: #dbe7f5;
}

.staff-request-history-item:last-child::before {
  display: none;
}

.staff-request-history-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px #cfe0ff;
  z-index: 1;
}

.staff-request-history-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
}

.staff-request-history-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.staff-request-history-item strong,
.staff-request-history-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-request-history-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.staff-request-history-changes span {
  border: 1px solid #d8e6f8;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f3f7ff;
  color: #40557a;
  font-size: 12px;
  font-weight: 700;
}

.project-document-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.project-document-card strong,
.project-document-card span {
  display: block;
}

.project-document-card span {
  color: var(--muted);
  font-weight: 600;
}

.project-document-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
  background: #f8fbff;
}

.project-document-editor button {
  min-height: 44px;
}

.document-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.document-file-row:empty {
  display: none;
}

.file-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-item {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
}

.timeline-item time {
  color: #38527a;
  font-size: 12px;
  font-weight: 900;
}

.inline-actions {
  position: static;
  padding: 8px 0 0;
  border: 0;
}

.flow-list {
  display: grid;
  gap: 12px;
}

.draft-list {
  display: grid;
  gap: 12px;
}

.draft-card {
  display: grid;
  gap: 10px;
  border: 1px solid #e2ebf7;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.draft-card > div:first-child {
  display: grid;
  gap: 4px;
}

.draft-card strong {
  color: var(--text);
}

.draft-card p {
  margin: 0;
  color: var(--muted);
}

.draft-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payroll-adjustments-panel {
  margin-bottom: 18px;
}

.payroll-adjustment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.payroll-adjustment-card {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-softer);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.payroll-adjustment-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.payroll-adjustment-card strong {
  color: var(--text);
}

.payroll-adjustment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.payroll-adjustment-card-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.payroll-adjustment-card-values span,
.payroll-adjustment-card-values strong {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.payroll-adjustment-card-values small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.payroll-adjustment-card-values .positive {
  color: var(--green-dark);
}

.payroll-adjustment-card-values .negative {
  color: var(--red);
}

.payroll-adjustment-modal-panel {
  width: min(1180px, calc(100vw - 32px));
}

.payroll-adjustment-modal-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
}

.payroll-adjustment-history {
  display: grid;
  gap: 10px;
}

.payroll-adjustment-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-softer);
}

.payroll-adjustment-history-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text);
  line-height: 1.4;
}

.payroll-adjustment-history-item a,
.payroll-adjustment-history-item .file-name {
  grid-column: 1 / -1;
}

.payroll-adjustment-history-item.is-voided {
  opacity: 0.68;
}

@media (max-width: 900px) {
  .payroll-adjustment-modal-body {
    grid-template-columns: 1fr;
  }
}

.invoice-builder-panel {
  margin-bottom: 18px;
}

.invoice-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
  align-items: start;
}

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

.invoice-builder-grid .full-span {
  grid-column: 1 / -1;
}

.invoice-import-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.invoice-import-row > div {
  display: grid;
  gap: 2px;
}

.invoice-description-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.invoice-description-template-row .compact-action {
  min-height: 36px;
  white-space: nowrap;
}

.invoice-option-label {
  align-self: end;
  min-height: 42px;
}

.invoice-builder-preview,
.invoice-register-row {
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.invoice-builder-preview {
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: 14px;
}

.invoice-builder-preview strong {
  color: var(--text);
}

.invoice-builder-preview span,
.invoice-builder-preview p {
  margin: 0;
  color: var(--muted);
}

.invoice-builder-preview-empty {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.invoice-builder-preview-action {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  align-self: flex-start;
  white-space: nowrap;
}

.invoice-register {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.compact-head {
  margin-bottom: 10px;
}

.compact-head h3 {
  margin: 0;
  font-size: 15px;
}

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

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

.invoice-logs-body {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

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

.invoice-log-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.invoice-log-item > div:first-child {
  display: grid;
  gap: 3px;
}

.invoice-log-changes {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
}

.invoice-log-changes > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
}

.invoice-log-changes dt,
.invoice-log-changes dd {
  margin: 0;
}

.invoice-log-changes dt {
  font-weight: 800;
  text-transform: capitalize;
}

.invoice-register-row > div:first-child {
  display: grid;
  gap: 3px;
}

.invoice-register-total {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.draft-amount > strong {
  font-size: 22px;
}

.flow-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #e2ebf7;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
  color: #182235;
}

.flow-step strong:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
}

.flow-step h3 {
  color: #182235;
  margin: 0 0 4px;
  font-size: 17px;
}

.flow-step p {
  margin: 0;
  color: #5f718f;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e8eef6;
  padding: 16px 20px;
  flex: 0 0 auto;
}

.modal-actions {
  border-top: 1px solid #e8eef6;
  border-bottom: 0;
  background: #fff;
}

.modal-body > .modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 3;
  margin: 12px -24px -24px;
}

.modal-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.form-draft-status {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.rotation-modal .modal-head {
  border-bottom: 0;
  padding: 22px 24px 10px;
}

.rotation-modal .modal-head h2 {
  font-size: 25px;
  line-height: 1.1;
}

.rotation-modal .modal-head .muted {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.assignment-form {
  gap: 16px;
  padding: 8px 24px 24px;
}

.assignment-field {
  gap: 9px;
  color: #33476b;
  font-size: 15px;
}

.assignment-field select {
  min-height: 48px;
  border-color: #c9d8ea;
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.assignment-preview {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
  border-color: #d8e5f4;
  background: #f8fbff;
  padding: 16px 18px;
}

.assignment-preview span {
  font-size: 15px;
}

.assignment-preview strong {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-kind {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 12px;
  background: #eaf1fb;
  color: var(--blue-dark);
  font-size: 14px !important;
  text-transform: capitalize;
}

.assignment-kind.is-vacation {
  background: #fff0e5;
  color: var(--orange);
}

.assignment-kind.is-fired {
  background: #ff1f1f;
  color: #fff;
}

.assignment-kind.is-unplanned {
  background: #edf3fb;
  color: #5f6f88;
}

.rotation-modal .modal-actions {
  position: static;
  gap: 12px;
  border-top: 0;
  padding: 4px 0 0;
}

.rotation-modal .modal-actions .secondary,
.rotation-modal .modal-actions .primary {
  min-height: 48px;
  padding: 11px 18px;
  font-size: 16px;
}

.rotation-modal .modal-actions .primary {
  flex: 1;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.icon-button:hover {
  background: #f2f6fb;
  color: var(--text);
}

.employee-form {
  max-height: calc(min(860px, calc(100vh - 48px)) - 67px);
  overflow-y: auto;
}

.employee-onboarding-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.5fr);
  gap: 16px;
  align-items: center;
  margin: 20px 20px 0;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.employee-tabs {
  margin-top: 14px;
  padding: 10px 20px 0;
}

.employee-tab-body {
  min-height: 420px;
}

.employee-tab-panel {
  display: none;
}

.employee-tab-panel.active {
  display: block;
}

.internal-cost-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.internal-cost-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.internal-cost-summary article {
  display: grid;
  gap: 7px;
  min-height: 118px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.internal-cost-summary span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.internal-cost-summary strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.internal-cost-summary small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.employee-onboarding-panel strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  text-transform: capitalize;
}

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

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0fa;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

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

.employee-form-grid label {
  display: grid;
  gap: 8px;
  color: #23344f;
  font-weight: 700;
}

.employee-form-grid label span {
  color: var(--red);
}

.employee-form-grid input,
.employee-form-grid select,
.employee-form-grid textarea {
  width: 100%;
  border: 1px solid #cdd9e8;
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.employee-form-grid textarea {
  resize: vertical;
}

.employee-readiness-panel,
.employee-checklist {
  display: grid;
  gap: 10px;
}

.employee-documents-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

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

.employee-document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.employee-document-card strong,
.employee-document-card span {
  display: block;
}

.employee-document-card span {
  color: var(--muted);
  font-weight: 600;
}

.employee-document-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.employee-document-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.employee-document-editor button {
  min-height: 44px;
}

.readiness-alert,
.readiness-ok,
.employee-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfdff;
}

.readiness-alert strong,
.readiness-ok strong,
.employee-check-row strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.readiness-alert span,
.readiness-ok span,
.employee-check-row small {
  color: var(--muted);
  font-weight: 600;
}

.readiness-alert.warning {
  border-color: #f2d4b8;
  background: #fff8f1;
}

.readiness-alert.critical {
  border-color: #ffb7b7;
  background: #fff1f1;
}

.checkbox-field {
  align-content: end;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

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

.checkbox-field span {
  color: var(--text) !important;
}

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

.modal-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  border-top: 1px solid #e8eef6;
  border-bottom: 0;
  background: #fff;
}

.modal-open {
  overflow: hidden;
}

body.theme-dark .workspace {
  background: radial-gradient(circle at top right, rgba(65, 107, 196, 0.14), transparent 32%), var(--page);
}

body.theme-dark #view-overview {
  --overview-line: var(--line);
  --overview-soft: rgba(19, 33, 56, 0.72);
  --overview-ink: var(--ink);
}

body.theme-dark #view-overview .command-item,
body.theme-dark #view-overview .chart-card,
body.theme-dark .overview-hero-metrics div,
body.theme-dark .overview-finance-chart,
body.theme-dark .overview-ring > div,
body.theme-dark .overview-side-note,
body.theme-dark .overview-project-card,
body.theme-dark .overview-project-metrics div {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .overview-project-finance,
body.theme-dark .overview-project-logistics {
  border-color: var(--line);
}

body.theme-dark .overview-project-logistics span {
  background: rgba(15, 23, 42, 0.58);
  border-color: var(--line);
  color: var(--muted);
}

body.theme-dark .overview-project-logistics span.warning {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.42);
  color: #fdba74;
}

body.theme-dark #view-overview .chart-card,
body.theme-dark .overview-capacity-card,
body.theme-dark .overview-portfolio-panel {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark #view-overview .chart-title h2,
body.theme-dark #view-overview .bar-line strong,
body.theme-dark #view-overview .bar-line span,
body.theme-dark .overview-capacity-card h3,
body.theme-dark .overview-project-card strong {
  color: var(--ink);
}

body.theme-dark .overview-label,
body.theme-dark .overview-finance-chart text {
  color: var(--muted);
  fill: var(--muted);
}

body.theme-dark .overview-chart-axis {
  stroke: var(--line);
}

body.theme-dark .overview-chart-line {
  stroke: #9db8ff;
}

body.theme-dark .overview-ring {
  background: conic-gradient(var(--ring) var(--p), rgba(148, 163, 184, 0.18) 0);
}

body.theme-dark #view-overview .bar-track {
  background: rgba(148, 163, 184, 0.18);
}

body.theme-dark .login-card,
body.theme-dark .panel,
body.theme-dark .chart-card,
body.theme-dark .overview-hero-card,
body.theme-dark .overview-capacity-card,
body.theme-dark .overview-kpi-card,
body.theme-dark .overview-side-panel,
body.theme-dark .overview-portfolio-panel,
body.theme-dark .kpi,
body.theme-dark .section-metric,
body.theme-dark .command-item,
body.theme-dark .module-card,
body.theme-dark .housing-place-card,
body.theme-dark .sales-report-card,
body.theme-dark .pipeline-entry-card,
body.theme-dark .pipeline-column,
body.theme-dark .pipeline-card,
body.theme-dark .leads-inbox-shell,
body.theme-dark .review-item,
body.theme-dark .housing-assignment-editor,
body.theme-dark .matching-panel,
body.theme-dark .organization-panel,
body.theme-dark .organization-card,
body.theme-dark .organization-context-menu,
body.theme-dark .process-node,
body.theme-dark .team-line-detail-grid article,
body.theme-dark .team-responsibility-item,
body.theme-dark .team-responsibility-form,
body.theme-dark .notification-center,
body.theme-dark .notification-card,
body.theme-dark .notification-empty,
body.theme-dark .active-meeting-panel,
body.theme-dark .modal-panel,
body.theme-dark .mini-kpi,
body.theme-dark .contact-detail-card,
body.theme-dark .contact-activity-item,
body.theme-dark .project-modal-summary,
body.theme-dark .asset-detail-modal,
body.theme-dark .employee-onboarding-panel,
body.theme-dark .employee-readiness-panel,
body.theme-dark .employee-documents-panel,
body.theme-dark .readiness-alert,
body.theme-dark .profile-status-card,
body.theme-dark .profile-mini-panel,
body.theme-dark .profile-leave-panel,
body.theme-dark .staff-request-contacts-panel,
body.theme-dark .staff-contact-card,
body.theme-dark .address-autocomplete-list,
body.theme-dark .cvr-company-autocomplete-list,
body.theme-dark .toast {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

body.theme-dark .housing-occupancy-summary {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .housing-occupancy-grid div {
  background: var(--panel);
  border-color: var(--line);
}

body.theme-dark .housing-occupancy-bar {
  background: var(--line);
}

body.theme-dark .account-role-actions input,
body.theme-dark .account-role-actions select {
  background: var(--panel-strong);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-day-focus,
body.theme-dark .task-focus-item {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .staff-request-history-item::before {
  background: var(--line);
}

body.theme-dark .staff-request-history-dot {
  border-color: var(--panel);
  box-shadow: 0 0 0 2px rgba(126, 162, 255, 0.32);
}

body.theme-dark .staff-request-history-item > div,
body.theme-dark .staff-request-history-changes span {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-day-block {
  background: rgba(75, 121, 235, 0.2);
  border-color: rgba(126, 162, 255, 0.34);
  border-left-color: #7da2ff;
  color: #dce7ff;
}

body.theme-dark .task-day-block.is-critical {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.34);
  border-left-color: #f87171;
  color: #fecdd3;
}

body.theme-dark .task-day-block.is-high {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.34);
  border-left-color: #fbbf24;
  color: #fde68a;
}

body.theme-dark .task-day-block.is-done {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.3);
  border-left-color: #4ade80;
  color: #bbf7d0;
}

body.theme-dark .task-day-block.is-low {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.28);
  border-left-color: #94a3b8;
  color: #cbd5e1;
}

body.theme-dark .task-day-complete {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dark .task-day-complete:hover,
body.theme-dark .task-day-complete:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline-color: rgba(126, 162, 255, 0.42);
}

body.theme-dark .task-day-block.is-done .task-day-complete {
  background: rgba(187, 247, 208, 0.18);
}

body.theme-dark :where(.sales-stat, .sales-deliverable, .sales-forecast div, .sales-mini-row, .project-kpi-grid > *, .project-card, .asset-card, .staffing-demand-meter, .timeline-item, .editable-row td, .internal-cost-panel, .profile-card-panel, .employee-tab-panel, .project-tab-panel, .notification-card, .notification-empty) {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .deal-stage-column.is-drop-target {
  background: rgba(111, 151, 255, 0.14);
  border-color: #7fa0ff;
  box-shadow: inset 0 0 0 1px #7fa0ff;
}

body.theme-dark .staff-contact-filter {
  background: var(--field);
  border-color: var(--line);
  color: var(--blue-dark);
}

body.theme-dark .staff-contact-filter strong {
  background: rgba(139, 173, 255, 0.14);
  color: var(--blue-dark);
}

body.theme-dark .staff-contact-filter.is-active {
  background: #5f7fe0;
  border-color: #86a3ff;
  color: #fff;
}

body.theme-dark .staff-contact-filter.is-active strong {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

body.theme-dark .staff-contact-card span,
body.theme-dark .staff-contact-card small {
  color: var(--muted);
}

body.theme-dark .workspace-tabs {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .workspace-tab {
  color: var(--muted);
}

body.theme-dark .workspace-tab.active {
  background: var(--field);
  border-color: var(--line);
  color: var(--blue-dark);
}

body.theme-dark :where(.quick-report, .detail-grid, .project-document-list, .project-timeline) {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark :where(.quick-report div, .detail-grid, .detail-grid div, .detail-list div, .empty-detail) {
  color: var(--ink);
}

body.theme-dark :where(.quick-report strong, .detail-grid strong, .detail-list strong, .empty-detail strong) {
  color: var(--ink);
}

body.theme-dark :where(.quick-report span, .quick-report small, .detail-grid span, .detail-list span, .empty-detail span) {
  color: var(--muted);
}

body.theme-dark .task-quick-add,
body.theme-dark .task-preset,
body.theme-dark .task-workload-block {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-quick-add input {
  color: var(--ink);
}

body.theme-dark .task-preset {
  color: var(--muted);
}

body.theme-dark .task-preset.active {
  background: rgba(109, 146, 238, 0.18);
  border-color: rgba(137, 166, 255, 0.7);
  color: var(--ink);
}

body.theme-dark .task-day {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-day.is-outside {
  background: rgba(20, 35, 59, 0.72);
  border-color: rgba(76, 114, 168, 0.56);
}

body.theme-dark .task-day.is-today {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(137, 166, 255, 0.42);
}

body.theme-dark .task-day header,
body.theme-dark .task-day header strong {
  color: var(--ink);
}

body.theme-dark .task-day-dot {
  background: #9db7ff;
}

body.theme-dark .task-day-dot.is-critical {
  background: #f87171;
}

body.theme-dark .task-day-dot.is-high {
  background: #fbbf24;
}

body.theme-dark .task-day-dot.is-done {
  background: #4ade80;
}

body.theme-dark .task-pill {
  background: var(--field);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-pill small {
  color: var(--muted);
}

body.theme-dark .task-pill.is-high {
  background: rgba(251, 146, 60, 0.12);
  border-color: var(--line);
  border-left-color: rgba(251, 146, 60, 0.9);
}

body.theme-dark .task-pill.is-critical {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--line);
  border-left-color: rgba(248, 113, 113, 0.9);
}

body.theme-dark .task-pill.is-done {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--line);
  border-left-color: rgba(34, 197, 94, 0.9);
  color: var(--muted);
}

body.theme-dark .task-unscheduled-strip {
  background: var(--panel-soft);
  border-color: rgba(109, 146, 238, 0.46);
  color: var(--ink);
}

body.theme-dark .task-unscheduled-strip > strong {
  color: var(--muted);
}

body.theme-dark .task-agenda-disclosure {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .task-agenda-disclosure summary {
  color: var(--ink);
}

body.theme-dark .task-agenda-disclosure summary::before {
  background: rgba(109, 146, 238, 0.18);
  color: #dbeafe;
}

body.theme-dark .task-card {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-card.is-critical {
  border-left-color: rgba(248, 113, 113, 0.9);
}

body.theme-dark .task-card.is-high {
  border-left-color: rgba(251, 146, 60, 0.9);
}

body.theme-dark .task-card.is-low {
  border-left-color: rgba(148, 163, 184, 0.88);
}

body.theme-dark .task-card.is-done {
  background: rgba(20, 35, 59, 0.68);
  border-left-color: rgba(34, 197, 94, 0.9);
}

body.theme-dark .task-card.is-done .task-card-head strong {
  color: var(--muted);
}

body.theme-dark .task-card.is-selected {
  background: rgba(109, 146, 238, 0.14);
  border-color: var(--blue);
}

body.theme-dark .task-card p,
body.theme-dark .task-meta {
  color: var(--muted);
}

body.theme-dark .task-composer-section {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .task-composer-primary {
  background: rgba(20, 35, 59, 0.72);
}

body.theme-dark .task-composer-section-head strong,
body.theme-dark .task-composer-panel label,
body.theme-dark .task-attachment-current strong,
body.theme-dark .task-attachment-empty strong {
  color: var(--ink);
}

body.theme-dark .task-composer-section-head span {
  color: var(--muted);
}

body.theme-dark .task-composer-panel input,
body.theme-dark .task-composer-panel select,
body.theme-dark .task-composer-panel textarea,
body.theme-dark .task-attachment-preview {
  background: var(--field);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-composer-panel input:focus,
body.theme-dark .task-composer-panel select:focus,
body.theme-dark .task-composer-panel textarea:focus {
  outline-color: rgba(137, 166, 255, 0.26);
  border-color: rgba(137, 166, 255, 0.72);
}

body.theme-dark .task-attachment-preview {
  border-color: rgba(109, 146, 238, 0.46);
}

body.theme-dark .task-attachment-indicator {
  background: rgba(34, 197, 94, 0.13);
  color: #bbf7d0;
}

body.theme-dark .task-composer-actions {
  background: linear-gradient(to bottom, rgba(13, 23, 38, 0.68), var(--panel) 38%);
}

body.theme-dark #view-tasks .section-metric,
body.theme-dark .task-calendar-panel,
body.theme-dark .task-composer-panel {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

body.theme-dark #view-tasks .section-metric {
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
}

body.theme-dark .task-calendar-head,
body.theme-dark .task-composer-head,
body.theme-dark .task-composer-section,
body.theme-dark .task-workload-block {
  border-color: var(--line);
}

body.theme-dark .task-composer-head {
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
}

body.theme-dark .task-period-nav .compact-action {
  background: var(--field);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-period-nav .task-nav-arrow,
body.theme-dark .task-quick-add .compact-action,
body.theme-dark .tasks-view-switch .segment.active {
  background: #4f8df7;
  border-color: #4f8df7;
  color: #fff;
}

body.theme-dark .task-period-nav #task-period-label,
body.theme-dark .task-calendar-head h2,
body.theme-dark .task-composer-head h2,
body.theme-dark .task-card-head strong {
  color: var(--ink);
}

body.theme-dark .tasks-view-switch {
  background: var(--field);
  border-color: var(--line);
}

body.theme-dark .tasks-view-switch .segment {
  color: var(--muted);
}

body.theme-dark .task-scope-segment {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .task-scope-segment span {
  color: var(--muted);
}

body.theme-dark .task-scope-option {
  color: var(--ink);
}

body.theme-dark .task-scope-option:hover {
  background: rgba(109, 146, 238, 0.14);
  color: #dbeafe;
}

body.theme-dark .task-scope-option.active {
  background: #6d92ee;
  color: #07111f;
  box-shadow: none;
}

body.theme-dark .task-quick-add,
body.theme-dark .task-calendar,
body.theme-dark .task-filter-bar,
body.theme-dark .task-day-focus,
body.theme-dark .task-focus-key,
body.theme-dark .task-focus-item,
body.theme-dark .task-workload-row {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .task-quick-add::before {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

body.theme-dark .task-calendar-grid {
  background: var(--line);
}

body.theme-dark .task-day {
  background: var(--panel);
  border-color: var(--line);
}

body.theme-dark .task-day:hover,
body.theme-dark .task-day.is-today,
body.theme-dark .task-day.is-selected {
  background: rgba(109, 146, 238, 0.12);
}

body.theme-dark .task-day.is-drop-target,
body.theme-dark .task-unscheduled-strip.is-drop-target {
  background: rgba(109, 146, 238, 0.2);
  box-shadow: inset 0 0 0 2px #6d92ee, 0 12px 30px rgba(0, 0, 0, 0.24);
}

body.theme-dark .task-day.is-outside {
  background: rgba(13, 23, 40, 0.82);
}

body.theme-dark .task-day header,
body.theme-dark .task-day header strong {
  color: var(--muted);
}

body.theme-dark .task-filter-bar input,
body.theme-dark .task-filter-bar select,
body.theme-dark .task-composer-panel input,
body.theme-dark .task-composer-panel select,
body.theme-dark .task-composer-panel textarea,
body.theme-dark .task-attachment-preview {
  background: var(--field);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .task-workload-row,
body.theme-dark .task-workload-row span:last-child {
  color: var(--ink);
}

body.theme-dark .task-workload-row.has-overdue span:last-child {
  color: #fecaca;
}

body.theme-dark .avatar.small {
  background: rgba(109, 146, 238, 0.18);
  color: #dbeafe;
}

body.theme-dark .task-chip {
  background: rgba(109, 146, 238, 0.14);
  color: #c7d7ff;
}

body.theme-dark .task-chip.status-in_progress,
body.theme-dark .task-chip.status-waiting {
  background: rgba(251, 146, 60, 0.16);
  color: #fed7aa;
}

body.theme-dark .task-chip.status-done,
body.theme-dark .task-chip.priority-low {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

body.theme-dark .task-chip.status-cancelled,
body.theme-dark .task-chip.priority-normal {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

body.theme-dark .task-chip.priority-critical,
body.theme-dark .task-chip.priority-high {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

body.theme-dark .meeting-entry-card,
body.theme-dark .meeting-history-card {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}

body.theme-dark .meeting-entry-card strong,
body.theme-dark .meeting-history-card strong {
  color: var(--ink);
}

body.theme-dark .meeting-entry-card p,
body.theme-dark .meeting-entry-card small,
body.theme-dark .meeting-history-card span {
  color: var(--muted);
}

body.theme-dark :where(.profile-detail-list div, .profile-list-item) {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark :where(input, select, textarea, .period-select) {
  background: var(--field);
  border-color: var(--line);
  color: var(--field-text);
}

body.theme-dark .overview-week-control {
  background: rgba(15, 26, 46, 0.72);
  border-color: var(--line);
}

body.theme-dark .overview-week-control .period-select {
  background: rgba(19, 33, 56, 0.86);
}

body.theme-dark :where(input, textarea)::placeholder {
  color: var(--field-muted);
}

body.theme-dark :where(input:focus, select:focus, textarea:focus) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(109, 146, 238, 0.18);
  outline: none;
}

body.theme-dark .participant-chip {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}

body.theme-dark .participant-chip strong {
  color: var(--ink);
}

body.theme-dark .participant-chip span {
  color: var(--muted);
}

body.theme-dark .address-autocomplete-list button {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .address-autocomplete-list button:hover,
body.theme-dark .address-autocomplete-list button:focus-visible {
  background: var(--hover);
}

body.theme-dark .address-autocomplete-list span {
  color: var(--muted);
}

body.theme-dark .cvr-company-autocomplete-list button {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .cvr-company-autocomplete-list button:hover,
body.theme-dark .cvr-company-autocomplete-list button:focus-visible {
  background: var(--hover);
}

body.theme-dark .cvr-company-autocomplete-list span {
  color: var(--muted);
}

body.theme-dark .participant-chip:hover {
  border-color: rgba(109, 146, 238, 0.62);
  background: rgba(109, 146, 238, 0.12);
}

body.theme-dark .participant-chip.is-selected {
  background: rgba(109, 146, 238, 0.18);
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--green);
}

body.theme-dark .participant-chip.is-selected span {
  color: var(--blue-dark);
}

body.theme-dark .asset-person-option {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .asset-person-option:hover {
  border-color: rgba(109, 146, 238, 0.62);
  background: rgba(109, 146, 238, 0.12);
}

body.theme-dark .asset-person-option.is-selected {
  background: rgba(109, 146, 238, 0.18);
  border-color: var(--blue);
}

body.theme-dark .asset-person-option span,
body.theme-dark .asset-person-empty {
  color: var(--muted);
}

body.theme-dark .asset-person-empty {
  border-color: var(--line);
}

body.theme-dark .secondary,
body.theme-dark .theme-toggle {
  background: var(--field);
  border-color: var(--line);
  color: var(--blue-dark);
}

body.theme-dark .secondary:hover,
body.theme-dark .theme-toggle:hover,
body.theme-dark .pipeline-action-card:hover,
body.theme-dark .action-review-item:hover,
body.theme-dark .editable-row:hover td,
body.theme-dark .module-card.active {
  background: var(--hover);
  border-color: #385986;
}

body.theme-dark .primary {
  background: #4f75d6;
  color: #ffffff;
}

body.theme-dark .primary:hover {
  background: #668cec;
}

body.theme-dark .sidebar {
  background: linear-gradient(180deg, #030712 0%, #071226 100%);
  border-right: 1px solid #16233a;
}

body.theme-dark .nav-group-toggle,
body.theme-dark .nav-group-chevron {
  color: #9fb0cc;
}

body.theme-dark .nav-group-toggle {
  background: rgba(109, 146, 238, 0.08);
}

body.theme-dark .nav-group-toggle:hover,
body.theme-dark .nav-group.expanded > .nav-group-toggle {
  background: rgba(109, 146, 238, 0.18);
  color: #ffffff;
}

body.theme-dark .nav-group-toggle:hover .nav-group-chevron,
body.theme-dark .nav-group.expanded > .nav-group-toggle .nav-group-chevron {
  color: #ffffff;
}

body.theme-dark .nav-item {
  color: #cad6ea;
}

body.theme-dark .nav-item:hover,
body.theme-dark .nav-item.active {
  background: rgba(109, 146, 238, 0.18);
  color: #ffffff;
}

body.theme-dark .eyebrow,
body.theme-dark .module-card span,
body.theme-dark .profile-role-chip,
body.theme-dark .logistics-insights-summary strong,
body.theme-dark .logistics-drawer summary strong,
body.theme-dark .sales-deliverable strong,
body.theme-dark .sales-deliverable b,
body.theme-dark .sales-report-head h3,
body.theme-dark .sales-mini-list h4,
body.theme-dark .pipeline-column h3,
body.theme-dark .leads-inbox-table th,
body.theme-dark .panel-head h2,
body.theme-dark .modal-head h2,
body.theme-dark .notification-center-head h2 {
  color: var(--ink);
}

body.theme-dark .muted,
body.theme-dark :where(.chart-legend, .section-metric span, .section-metric small, .command-item span, .module-card small, .sales-report-head span, .sales-stat span, .sales-stat small, .sales-deliverable span, .sales-forecast span, .sales-mini-row span, .pipeline-card small, .leads-inbox-table td span, .deal-stage-summary, .review-item span, .team-line-detail-grid span, .notification-card span, .notification-empty span, .mini-kpi span, .mini-kpi small) {
  color: var(--muted);
}

body.theme-dark .badge {
  background: #182641;
  color: #cfe0ff;
}

body.theme-dark .badge.good {
  background: rgba(132, 204, 95, 0.16);
  color: #b9f5a1;
}

body.theme-dark .badge.warning {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
}

body.theme-dark .badge.critical {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}

body.theme-dark .table-wrap,
body.theme-dark .mini-table-wrap,
body.theme-dark .leads-inbox-table,
body.theme-dark table {
  background: var(--panel);
  color: var(--ink);
}

body.theme-dark th,
body.theme-dark .leads-inbox-table th {
  background: var(--panel-soft);
  color: var(--muted);
}

body.theme-dark td,
body.theme-dark th,
body.theme-dark .leads-inbox-table td,
body.theme-dark .leads-inbox-table th {
  border-color: var(--line);
}

body.theme-dark tr:hover td {
  background: rgba(109, 146, 238, 0.08);
}

body.theme-dark .bar-track,
body.theme-dark .donut {
  background: #22324d;
}

body.theme-dark .donut::after {
  background: var(--panel);
  color: var(--ink);
}

body.theme-dark .denmark-map {
  background: #182238;
  border-color: var(--line);
}

body.theme-dark .map-legend,
body.theme-dark .leaflet-popup-content-wrapper,
body.theme-dark .leaflet-popup-tip {
  background: rgba(17, 27, 45, 0.94);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .map-housing-popup dl div {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .organization-canvas,
body.theme-dark .process-canvas-stage,
body.theme-dark .rotation-panel {
  background-color: #0d1728;
  background-image: radial-gradient(circle, rgba(153, 169, 194, 0.24) 1px, transparent 1px);
  border-color: var(--line);
}

body.theme-dark .rotation-side,
body.theme-dark .rotation-matrix-wrap,
body.theme-dark .rotation-matrix th,
body.theme-dark .rotation-matrix td {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .rotation-matrix thead th,
body.theme-dark .rotation-person {
  background: #142037;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

body.theme-dark .rotation-person span {
  color: var(--muted);
}

body.theme-dark .rotation-cell {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .rotation-cell.is-project {
  background: rgba(52, 211, 153, 0.13);
  border-color: rgba(52, 211, 153, 0.62);
  color: #86efac;
}

body.theme-dark .rotation-cell.is-vacation {
  background: rgba(251, 146, 60, 0.13);
  border-color: rgba(251, 146, 60, 0.62);
  color: #fdba74;
}

body.theme-dark .rotation-cell.is-vacation.has-return-ticket {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.62);
  color: #86efac;
}

body.theme-dark .rotation-cell.is-vacation.needs-return-ticket {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.68);
  color: #fecaca;
}

body.theme-dark .rotation-cell.is-unplanned {
  background: rgba(148, 163, 184, 0.13);
  border-color: rgba(148, 163, 184, 0.46);
  color: #cbd5e1;
}

body.theme-dark .rotation-cell.is-fired {
  background: rgba(248, 113, 113, 0.13);
  border-color: rgba(248, 113, 113, 0.62);
  color: #fecaca;
}

body.theme-dark .rotation-cell.is-empty {
  background: rgba(13, 23, 40, 0.74);
  color: var(--muted);
}

body.theme-dark .rotation-project-employee-chip {
  background: rgba(13, 23, 40, 0.78);
  border-color: rgba(148, 163, 184, 0.36);
  color: #dbe7f6;
  box-shadow: none;
}

body.theme-dark .rotation-project-employee-chip:hover {
  border-color: #93c5fd;
  color: #bfdbfe;
}

body.theme-dark .rotation-map-canvas {
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(52, 211, 153, 0.08)),
    radial-gradient(circle at 72% 46%, rgba(96, 165, 250, 0.12), transparent 24%),
    var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .rotation-map-canvas.leaflet-container {
  background: #142035;
}

body.theme-dark .rotation-layer-toggle {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
}

body.theme-dark .rotation-layer-toggle small {
  color: var(--muted);
}

body.theme-dark .rotation-map-address input {
  background: var(--field);
  border-color: var(--line-strong);
  color: var(--field-text);
}

body.theme-dark .rotation-map-search-marker {
  border-color: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

body.theme-dark .rotation-map-canvas::before {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
}

body.theme-dark .rotation-map-outline {
  background: rgba(15, 23, 42, 0.56);
  border-color: rgba(147, 180, 255, 0.34);
}

body.theme-dark .rotation-map-label,
body.theme-dark .rotation-map-pin span,
body.theme-dark .rotation-map-context span {
  color: var(--muted);
}

body.theme-dark .rotation-map-pin,
body.theme-dark .rotation-map-marker,
body.theme-dark .rotation-map-context {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

body.theme-dark .rotation-map-pin.good,
body.theme-dark .rotation-map-marker.good {
  border-color: rgba(74, 222, 128, 0.54);
}

body.theme-dark .rotation-map-pin.warning,
body.theme-dark .rotation-map-marker.warning {
  border-color: rgba(251, 146, 60, 0.62);
  color: #fdba74;
}

body.theme-dark .rotation-map-marker span,
body.theme-dark .rotation-map-popup span,
body.theme-dark .rotation-map-popup dt {
  color: var(--muted);
}

body.theme-dark .rotation-map-layer-pin {
  border-color: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

body.theme-dark .compact-label {
  color: var(--muted);
}

body.theme-dark .compact-label select {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
}

body.theme-dark .rotation-context-menu {
  background: var(--panel);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

body.theme-dark .rotation-context-head strong {
  color: var(--ink);
}

body.theme-dark .rotation-context-menu select {
  background: var(--field);
  border-color: var(--line-strong);
  color: var(--field-text);
}

body.theme-dark .rotation-map-popup > strong,
body.theme-dark .rotation-map-popup dd {
  color: var(--ink);
}

body.theme-dark .rotation-map-popup dl div {
  background: var(--panel-soft);
}

body.theme-dark .rotation-map-planner {
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

body.theme-dark .rotation-map-planner-head strong,
body.theme-dark .rotation-map-candidates strong,
body.theme-dark .rotation-map-plan-metrics strong,
body.theme-dark .rotation-map-recommendation strong {
  color: var(--ink);
}

body.theme-dark .rotation-map-plan-metrics div,
body.theme-dark .rotation-map-recommendation,
body.theme-dark .rotation-map-actions-list span,
body.theme-dark .rotation-map-candidates span,
body.theme-dark .rotation-map-candidate,
body.theme-dark .rotation-map-plan-empty {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--line);
}

body.theme-dark .rotation-map-candidate:hover {
  border-color: var(--blue);
  color: #bfdbfe;
}

body.theme-dark .capacity-row,
body.theme-dark .record-group,
body.theme-dark .draft-card,
body.theme-dark .invoice-builder-preview,
body.theme-dark .invoice-register-row,
body.theme-dark .invoice-log-item,
body.theme-dark .invoice-import-row,
body.theme-dark .flow-step,
body.theme-dark .import-preview,
body.theme-dark .upload-dropzone,
body.theme-dark .bulk-bar {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .import-preview.is-warning {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.48);
}

body.theme-dark .import-preview.is-ready,
body.theme-dark .upload-dropzone.is-dragging {
  background: rgba(34, 197, 94, 0.11);
  border-color: rgba(74, 222, 128, 0.46);
}

body.theme-dark .capacity-row strong,
body.theme-dark .record-group h3,
body.theme-dark .record-group .bar-line strong,
body.theme-dark .draft-card strong,
body.theme-dark .draft-amount > strong,
body.theme-dark .invoice-builder-preview strong,
body.theme-dark .invoice-register-row strong,
body.theme-dark .invoice-register-total > strong,
body.theme-dark .invoice-import-row strong,
body.theme-dark .flow-step h3,
body.theme-dark .bulk-bar strong {
  color: var(--ink);
}

body.theme-dark .bulk-bar select {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
}

body.theme-dark .rotation-cell.is-bulk-selected {
  outline-color: #93b4ff;
  box-shadow: 0 0 0 4px rgba(147, 180, 255, 0.18);
}

body.theme-dark .record-group .bar-line,
body.theme-dark .draft-card p,
body.theme-dark .invoice-builder-preview span,
body.theme-dark .invoice-builder-preview p,
body.theme-dark .flow-step p,
body.theme-dark .upload-dropzone span,
body.theme-dark .import-preview span {
  color: var(--muted);
}

body.theme-dark .activity-change {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--muted);
}

body.theme-dark .organization-lines path,
body.theme-dark .process-edge path {
  stroke: #9fb9ff;
}

body.theme-dark .organization-drop-zone,
body.theme-dark .organization-canvas-empty,
body.theme-dark .organization-empty {
  background: rgba(13, 23, 40, 0.88);
  border-color: #385986;
  color: var(--muted);
}

body.theme-dark .process-node.document::before,
body.theme-dark .process-node.employee,
body.theme-dark .process-node.document,
body.theme-dark .process-node.decision {
  background: var(--panel-soft);
  border-color: var(--line);
}

body.theme-dark .modal-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

body.theme-dark .modal-head,
body.theme-dark .modal-actions,
body.theme-dark .logistics-insights-panel[open] .logistics-insights-summary,
body.theme-dark .logistics-drawer[open] summary {
  background: var(--panel);
  border-color: var(--line);
}

body.theme-dark .form-draft-status {
  color: var(--muted);
}

body.theme-dark .notification-widget-button[aria-expanded="true"],
body.theme-dark .notification-card.is-new {
  background: var(--hover);
}

body.theme-dark .notification-card.warning,
body.theme-dark .readiness-alert.warning {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.44);
}

body.theme-dark .notification-card.critical,
body.theme-dark .readiness-alert.critical {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.44);
}

body.theme-dark .theme-toggle[aria-pressed="true"] {
  background: #dbe8ff;
  border-color: #9fb9ff;
  color: #17356d;
}

@media (max-width: 1601px) {
  .overview-main,
  .overview-dashboard,
  .overview-hero,
  .overview-hero-card,
  .overview-analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-side {
    position: static;
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 14px;
    max-width: 100vw;
    overflow: hidden;
  }

  .brand,
  .sidebar-status {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    max-width: calc(100vw - 28px);
    align-items: flex-start;
  }

  .nav-group {
    flex: 0 0 auto;
    min-width: 170px;
  }

  .nav-group-items {
    min-width: 170px;
  }

  .modal {
    padding: 8px;
    align-items: stretch;
  }

  .modal-panel,
  .compact-modal,
  .project-detail-modal,
  .employee-modal-panel,
  .asset-detail-modal,
  .hours-detail-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .modal-head,
  .modal-actions {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-body > .modal-actions {
    bottom: -16px;
    margin: 12px -16px -16px;
  }

  .project-modal-body {
    grid-template-columns: 1fr;
  }

  .housing-detail-body,
  .housing-assignment-editor {
    grid-template-columns: 1fr;
  }

  .project-overview-grid,
  .project-workspace-grid {
    grid-template-columns: 1fr;
  }

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

  .contact-detail-layout {
    grid-template-columns: 1fr;
  }

  .nav-item {
    white-space: nowrap;
  }

  .workspace {
    padding: 18px;
    max-width: 100vw;
  }

  .two-column,
  .split-layout,
  .invoice-builder-layout,
  .hours-controls,
  .rotation-layout,
  .chart-grid,
  .logistics-module-grid,
  .logistics-map-layout,
  .rotation-map-layout,
  .logistics-action-grid,
  .logistics-cost-kpis,
  .logistics-cost-grid,
  #logistics-map-list,
  .logistics-filter-bar,
  .section-metrics,
  .profile-layout,
  .profile-insight-grid,
  .profile-status-grid,
  .profile-leave-form,
  .command-strip {
    grid-template-columns: 1fr;
  }

  .rotation-map-actions {
    justify-content: stretch;
  }

  .rotation-map-address {
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .rotation-map-layers {
    justify-content: flex-start;
  }

  .overview-dashboard,
  .overview-hero,
  .overview-hero-card,
  .overview-analytics-grid {
    grid-template-columns: 1fr;
  }

  .overview-side {
    position: static;
  }

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

  .overview-hero-metrics {
    grid-template-columns: 1fr;
  }

  .overview-project-list {
    grid-template-columns: 1fr;
  }

  .profile-form-panel {
    position: static;
  }

  .task-composer-panel {
    position: static;
    padding: 14px;
  }

  .task-calendar-head,
  .task-day-focus-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #view-tasks .section-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-tasks .section-metric {
    min-width: 0;
  }

  .task-calendar-head .panel-actions,
  .task-period-nav,
  .tasks-view-switch {
    width: 100%;
  }

  .task-period-nav {
    grid-template-columns: 36px minmax(86px, auto) 36px;
  }

  .task-period-nav #task-period-label {
    grid-column: 1 / -1;
    text-align: left;
  }

  .task-quick-add {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 8px;
  }

  .task-quick-add .compact-action {
    grid-column: 1 / -1;
  }

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

  .task-card .task-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .task-focus-item {
    grid-template-columns: 1fr;
  }

  .task-calendar-week,
  .task-calendar-month {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .task-day {
    min-height: 88px;
    padding: 6px;
  }

  .task-calendar-month .task-day {
    min-height: 74px;
  }

  .task-day header {
    display: grid;
    gap: 2px;
    margin-bottom: 6px;
  }

  .task-day header strong {
    font-size: 15px;
  }

  .task-day-list .muted {
    font-size: 11px;
    line-height: 1.15;
  }

  .task-day-block {
    grid-template-columns: 16px minmax(0, 1fr);
    min-height: 24px;
    padding: 4px 5px;
  }

  .task-day-block small {
    display: none;
  }

  .task-filter-topline,
  .task-scope-segment {
    width: 100%;
  }

  .task-scope-segment {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }

  .task-scope-segment span,
  .task-scope-option {
    padding-inline: 5px;
    font-size: 11px;
  }

  .task-preset-bar {
    width: 100%;
    margin-left: 0;
  }

  .task-preset {
    flex: 1 1 130px;
  }

  .task-composer-grid,
  .invoice-builder-grid,
  .invoice-register-row,
  .task-filter-bar {
    grid-template-columns: 1fr;
  }

  .task-search-filter {
    grid-column: auto;
  }

  .task-composer-actions {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .task-attachment-line .file-name,
  .task-attachment-preview .file-name {
    max-width: 100%;
  }

  .rotation-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .rotation-map-layout {
    grid-template-columns: 1fr;
  }

  .rotation-map-canvas {
    height: 520px;
    min-height: 460px;
  }

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

  .rotation-map-action-buttons {
    grid-template-columns: 1fr;
  }

  .rotation-map-fullscreen-mode .rotation-map-layout {
    grid-template-columns: 1fr;
  }

  .rotation-map-fullscreen-mode .rotation-map-canvas {
    height: min(68vh, 720px);
    min-height: 0;
  }

  .rotation-map-fullscreen-mode .rotation-map-side {
    max-height: 24vh;
  }

  .rotation-fullscreen-mode .rotation-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .rotation-fullscreen-mode .rotation-layout {
    height: calc(100vh - 156px);
  }

  .hours-fullscreen-mode .hours-controls {
    grid-template-columns: 1fr 1fr;
  }

  .hours-fullscreen-mode #view-hours .table-wrap {
    max-height: calc(100vh - 340px);
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .people-filter-bar {
    grid-template-columns: 1fr;
  }

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

  .organization-card {
    width: 240px;
  }

  .organization-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hr-attention-filter-bar {
    grid-template-columns: 1fr;
  }

  .candidate-filter-bar {
    grid-template-columns: 1fr;
  }

  .staff-request-filter-bar {
    grid-template-columns: 1fr;
  }

  .invoice-filter-bar {
    grid-template-columns: 1fr;
  }

  .matching-panel,
  .match-card,
  .pipeline-candidate {
    grid-template-columns: 1fr;
  }

  .people-filter-bar .switch-field {
    grid-column: auto;
  }

  .hr-attention-filter-bar .switch-field {
    grid-column: auto;
  }

  .hours-search {
    grid-column: auto;
  }

  .sales-report-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-board {
    grid-template-columns: repeat(4, minmax(230px, 1fr));
  }

  .pipeline-entry-grid,
  .sales-report-grid {
    grid-template-columns: 1fr;
  }

  .deals-board {
    grid-template-columns: repeat(5, minmax(230px, 1fr));
  }

  .project-card-grid {
    grid-template-columns: 1fr;
  }

  .asset-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "select"
      "photo"
      "head"
      "holder"
      "metrics"
      "notes"
      "actions";
  }

  .asset-card .asset-card-photo,
  .asset-card .asset-card-photo-placeholder,
  .asset-card .project-card-head,
  .asset-card .project-card-metrics,
  .asset-card .asset-holder-summary,
  .asset-card > p {
    grid-column: auto;
  }

  .asset-card .asset-card-photo,
  .asset-card .asset-card-photo-placeholder {
    grid-row: auto;
    max-height: 180px;
  }

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

  .kpi {
    min-height: 92px;
    padding: 13px;
  }

  .kpi strong {
    font-size: 22px;
    margin-top: 8px;
  }

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

  .employee-document-editor {
    grid-template-columns: 1fr;
  }

  .project-document-editor {
    grid-template-columns: 1fr;
  }

  .internal-cost-summary {
    grid-template-columns: 1fr;
  }
}

.activity-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  color: var(--ink);
}

.activity-pagination nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

#activity-status {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-pagination nav button {
  width: 40px;
  height: 36px;
  padding: 0;
}

.activity-change {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions,
  .actions button {
    width: 100%;
  }

  .account-menu {
    width: 100%;
  }

  .account-menu-toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .account-menu-list {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .overview-week-control {
    width: 100%;
  }

  .overview-week-control .period-select,
  .overview-week-control .compact-action {
    width: 100%;
  }

  .overview-map-actions,
  .overview-address-search,
  .overview-map-actions .compact-label,
  .overview-map-actions button {
    width: 100%;
  }

  .overview-address-search {
    align-items: stretch;
    flex-direction: column;
  }

  .rotation-map-address {
    grid-template-columns: 1fr;
  }

  .rotation-map-address button {
    width: 100%;
  }

  .overview-address-search .muted {
    padding-bottom: 0;
  }

  .period-select {
    width: 100%;
  }

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

  .overview-kpi-strip,
  .overview-ring-row {
    grid-template-columns: 1fr;
  }

  .overview-hero-card,
  .overview-capacity-card,
  .overview-kpi-card,
  .overview-side-panel,
  .overview-portfolio-panel,
  #view-overview .chart-card {
    padding: 14px;
  }

  .overview-hero-copy h2 {
    font-size: 30px;
  }

  .overview-project-metrics,
  .overview-project-metrics.compact,
  .overview-project-finance,
  .overview-project-logistics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-overview .bar-line {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  #view-overview .bar-line strong {
    grid-column: 2;
  }

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

  .invoice-builder-preview-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-builder-preview-action {
    width: fit-content;
  }

  .bar-line {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .bar-line strong {
    grid-column: 2;
  }

  .rotation-toolbar {
    grid-template-columns: 1fr;
  }

  .rotation-map-canvas {
    height: 420px;
    min-height: 380px;
  }

  .rotation-map-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .rotation-map-layers {
    justify-content: flex-start;
    width: 100%;
  }

  .rotation-layer-toggle {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .rotation-map-fullscreen-mode .workspace {
    padding: 8px;
  }

  .rotation-map-fullscreen-mode #view-logistics,
  .rotation-map-fullscreen-mode #rotation-logistics-pane {
    height: calc(100vh - 16px);
  }

  .rotation-map-fullscreen-mode .rotation-map-panel {
    padding: 10px;
  }

  .rotation-map-fullscreen-mode .rotation-map-canvas {
    height: 62vh;
  }

  .rotation-map-pin {
    min-width: 74px;
    max-width: 110px;
    padding: 6px 7px;
  }

  .rotation-bulk-bar,
  .rotation-bulk-bar select,
  .rotation-bulk-bar button {
    width: 100%;
  }

  .rotation-bulk-bar strong {
    width: 100%;
  }

  .project-card-metrics {
    grid-template-columns: 1fr;
  }

  .project-kpi-grid,
  .staffing-demand-meter,
  .timeline-item {
    grid-template-columns: 1fr;
  }
}
