:root {
  color-scheme: light;
  --iq-background: #f7f9fc;
  --iq-sidebar: #ffffff;
  --iq-surface: #ffffff;
  --iq-surface-secondary: #f8faff;
  --iq-surface-hover: #f4f7ff;
  --iq-border: #e5e9f2;
  --iq-border-subtle: #edf0f6;
  --iq-text-primary: #111a2e;
  --iq-text-secondary: #4f5f7b;
  --iq-text-muted: #8792a9;
  --iq-accent: #3f63f5;
  --iq-accent-strong: #3152db;
  --iq-accent-soft: #eef2ff;
  --iq-success: #17b978;
  --iq-success-soft: #e9f9f1;
  --iq-warning: #f4ad32;
  --iq-warning-soft: #fff6e4;
  --iq-danger: #ef5365;
  --iq-danger-soft: #fff0f2;
  --iq-info: #2e8af7;
  --iq-info-soft: #edf6ff;
  --iq-violet: #8a5cf5;
  --iq-violet-soft: #f3efff;
  --iq-cyan: #19b6de;
  --iq-cyan-soft: #eafaff;
  --iq-radius-card: 16px;
  --iq-radius-control: 10px;
  --iq-radius-small: 8px;
  --iq-shadow-card: 0 8px 24px rgba(31, 52, 94, .055), 0 1px 2px rgba(31, 52, 94, .03);
  --iq-shadow-floating: 0 18px 50px rgba(31, 52, 94, .14);
  --iq-transition: 180ms ease;
  --iq-sidebar-width: 238px;
  --iq-content-gap: 20px;
  --iq-control-height: 40px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Plantafel / Auswertungen / Mitarbeiter-Auslastung — reference-card redesign. */
.iq-plantafel-page[data-plantafel-view="stats"] .top-header {
  align-items: flex-start;
  padding-bottom: 12px;
}

.iq-plantafel-page[data-plantafel-view="stats"] .page-heading h1 {
  font-size: clamp(25px, 2.1vw, 34px) !important;
  letter-spacing: -.035em;
}

.iq-plantafel-page[data-plantafel-view="stats"] .page-description {
  margin-top: 7px;
  color: var(--iq-text-secondary) !important;
}

.statistics-header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(180px, 19vw, 270px);
  height: 38px;
  border: 1px solid var(--iq-border-subtle);
  border-radius: 12px;
  background: var(--iq-surface-secondary);
}

.statistics-header-search[hidden] { display: none !important; }
.statistics-header-search svg {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--iq-text-muted);
  stroke-width: 1.8;
}
.statistics-header-search input {
  width: 100%;
  height: 100%;
  padding: 0 34px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--iq-text-primary);
  font: inherit;
  font-size: 12px;
}

.iq-plantafel-page[data-plantafel-view="stats"] .management-panel,
.iq-plantafel-page .management-panel:has(.employee-utilization-page) {
  padding: 0 18px 30px !important;
}

.iq-plantafel-page .employee-utilization-page {
  display: grid;
  gap: 16px;
  color: var(--iq-text-primary);
}

.iq-plantafel-page .employee-utilization-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
}

.iq-plantafel-page .statistics-tabs,
.iq-plantafel-page .employee-utilization-actions,
.iq-plantafel-page .statistics-view-toggle,
.iq-plantafel-page .employee-utilization-pagination nav {
  display: flex;
  align-items: center;
}

.iq-plantafel-page .statistics-tabs {
  gap: 5px;
  padding: 3px;
  border: 1px solid var(--iq-border-subtle);
  border-radius: 11px;
  background: var(--iq-surface);
}
.iq-plantafel-page .statistics-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--iq-text-secondary);
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  transition: background var(--iq-transition), color var(--iq-transition), box-shadow var(--iq-transition);
}
.iq-plantafel-page .statistics-tabs button:hover { color: var(--iq-text-primary); background: var(--iq-surface-hover); }
.iq-plantafel-page .statistics-tabs button.is-active {
  background: var(--iq-accent-soft);
  color: var(--iq-accent);
  box-shadow: 0 3px 10px rgba(63, 99, 245, .08);
}

.iq-plantafel-page .employee-utilization-actions {
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.iq-plantafel-page .employee-utilization-actions select,
.iq-plantafel-page .employee-utilization-actions input,
.iq-plantafel-page .statistics-filter-button,
.iq-plantafel-page .statistics-export-button {
  height: 38px;
  border: 1px solid var(--iq-border);
  border-radius: 9px;
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  font: inherit;
  font-size: 11px;
  outline: 0;
}
.iq-plantafel-page .statistics-period-control select { width: 132px; padding: 0 28px 0 11px; }
.iq-plantafel-page .statistics-date-range {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--iq-border);
  border-radius: 9px;
  background: var(--iq-surface);
}
.iq-plantafel-page .statistics-date-range > span { color: var(--iq-text-secondary); font-size: 12px; }
.iq-plantafel-page .statistics-date-range i { color: var(--iq-text-muted); font-size: 10px; font-style: normal; }
.iq-plantafel-page .statistics-date-range input {
  width: 112px;
  height: 30px;
  padding: 0 3px;
  border: 0;
  background: transparent;
}
.iq-plantafel-page .statistics-location-control {
  position: relative;
  display: flex;
  align-items: center;
}
.iq-plantafel-page .statistics-location-control > span { position: absolute; left: 10px; z-index: 1; color: var(--iq-text-secondary); }
.iq-plantafel-page .statistics-location-control select { min-width: 160px; padding: 0 28px 0 28px; }
.iq-plantafel-page .statistics-filter-button,
.iq-plantafel-page .statistics-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
}
.iq-plantafel-page .statistics-filter-button.is-active { border-color: #b7c5ff; background: var(--iq-accent-soft); color: var(--iq-accent); }
.iq-plantafel-page .statistics-export-button { border-color: var(--iq-accent); background: var(--iq-accent); color: #fff; }

.iq-plantafel-page .statistics-filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--iq-border);
  border-radius: 12px;
  background: var(--iq-surface-secondary);
  animation: iq-utilization-reveal .18s ease both;
}
.iq-plantafel-page .statistics-filter-panel label {
  display: grid;
  gap: 5px;
  color: var(--iq-text-secondary);
  font-size: 10px;
  font-weight: 600;
}
.iq-plantafel-page .statistics-filter-panel select,
.iq-plantafel-page .statistics-filter-panel input,
.iq-plantafel-page .statistics-filter-panel button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--iq-border);
  border-radius: 8px;
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  font: inherit;
  font-size: 11px;
}
.iq-plantafel-page .statistics-filter-panel button { align-self: end; color: var(--iq-accent); font-weight: 600; cursor: pointer; }

.iq-plantafel-page .employee-utilization-kpi {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 83px;
  padding: 15px 18px;
  border: 1px solid var(--iq-border);
  border-radius: 15px;
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
}
.iq-plantafel-page .employee-utilization-kpi > div:first-child { display: grid; gap: 3px; }
.iq-plantafel-page .employee-utilization-kpi > div:first-child span,
.iq-plantafel-page .employee-utilization-kpi > p { color: var(--iq-text-secondary); font-size: 11px; }
.iq-plantafel-page .employee-utilization-kpi > div:first-child strong { font-size: 27px; line-height: 1; letter-spacing: -.03em; }
.iq-plantafel-page .employee-utilization-kpi > p { margin: 19px 0 0; }
.iq-plantafel-page .employee-utilization-trend b { color: var(--iq-text-muted); }
.iq-plantafel-page .employee-utilization-view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.iq-plantafel-page .statistics-view-toggle {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--iq-border-subtle);
  border-radius: 9px;
  background: var(--iq-surface-secondary);
}
.iq-plantafel-page .statistics-view-toggle button {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--iq-text-secondary);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.iq-plantafel-page .statistics-view-toggle button.is-active { background: var(--iq-surface); color: var(--iq-accent); box-shadow: 0 2px 8px rgba(31, 52, 94, .07); }
.iq-plantafel-page .employee-utilization-view-controls > label {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding-left: 11px;
  border: 1px solid var(--iq-border);
  border-radius: 9px;
  color: var(--iq-text-secondary);
  font-size: 10px;
}
.iq-plantafel-page .employee-utilization-view-controls select {
  height: 36px;
  max-width: 170px;
  padding: 0 28px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--iq-text-primary);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
}

.iq-plantafel-page .employee-utilization-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.iq-plantafel-page .employee-utilization-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  min-width: 0;
  min-height: 325px;
  padding: 22px 17px 17px;
  overflow: hidden;
  border: 1px solid var(--iq-border);
  border-radius: 17px;
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  font: inherit;
  text-align: center;
  box-shadow: 0 5px 20px rgba(31, 52, 94, .055);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.iq-plantafel-page .employee-utilization-card:hover,
.iq-plantafel-page .employee-utilization-card:focus-visible {
  transform: translateY(-2px);
  border-color: #c7d1ee;
  outline: 0;
  box-shadow: 0 10px 27px rgba(31, 52, 94, .09);
}
.iq-plantafel-page .employee-utilization-percent-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f2f6;
  color: #34425a;
  font-size: 10px;
  font-weight: 650;
}
.iq-plantafel-page .employee-utilization-ring {
  position: relative;
  display: grid;
  width: 108px;
  height: 108px;
  margin-top: 0;
  place-items: center;
}
.iq-plantafel-page .employee-utilization-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.iq-plantafel-page .employee-utilization-ring circle { fill: none; stroke-width: 6; }
.iq-plantafel-page .employee-utilization-ring .ring-track { stroke: #edf0f4; }
.iq-plantafel-page .employee-utilization-ring .ring-value {
  stroke: var(--utilization-color);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--utilization-value));
  transition: stroke-dashoffset .45s ease;
}
.iq-plantafel-page .employee-utilization-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #27344c, #10192b);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.iq-plantafel-page .employee-utilization-avatar > span { font-size: 24px; font-weight: 550; letter-spacing: -.02em; }
.iq-plantafel-page .employee-utilization-avatar img { width: 100%; height: 100%; object-fit: cover; }
.iq-plantafel-page .employee-utilization-person { display: grid; gap: 4px; margin-top: 8px; }
.iq-plantafel-page .employee-utilization-person strong { overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.iq-plantafel-page .employee-utilization-person small { color: var(--iq-text-secondary); font-size: 10px; }
.iq-plantafel-page .employee-utilization-value { margin-top: 11px; font-size: 24px; line-height: 1; letter-spacing: -.035em; }
.iq-plantafel-page .employee-utilization-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--iq-success-soft);
  color: #167d55;
  font-size: 9px;
  font-weight: 650;
}
.iq-plantafel-page .employee-utilization-card.status-normal .employee-utilization-status,
.iq-plantafel-page .employee-utilization-status.status-normal { background: var(--iq-warning-soft); color: #a86600; }
.iq-plantafel-page .employee-utilization-card.status-free .employee-utilization-status,
.iq-plantafel-page .employee-utilization-status.status-free { background: #edf4ff; color: #2f6dc1; }
.iq-plantafel-page .employee-utilization-card.status-critical .employee-utilization-status,
.iq-plantafel-page .employee-utilization-status.status-critical { background: var(--iq-danger-soft); color: var(--iq-danger); }
.iq-plantafel-page .employee-utilization-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 18px;
}
.iq-plantafel-page .employee-utilization-time-grid > span { display: grid; gap: 5px; text-align: left; }
.iq-plantafel-page .employee-utilization-time-grid small { color: var(--iq-text-muted); font-size: 9px; }
.iq-plantafel-page .employee-utilization-time-grid strong { color: var(--iq-text-secondary) !important; font-size: 11px; font-weight: 550; }
.iq-plantafel-page .is-positive { color: var(--iq-success) !important; }
.iq-plantafel-page .is-negative { color: var(--iq-danger) !important; }
.iq-plantafel-page .is-neutral { color: var(--iq-text-muted) !important; }

.iq-plantafel-page .employee-utilization-list-wrap {
  overflow: auto;
  border: 1px solid var(--iq-border);
  border-radius: 15px;
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
}
.iq-plantafel-page .employee-utilization-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 11px; }
.iq-plantafel-page .employee-utilization-table th,
.iq-plantafel-page .employee-utilization-table td { padding: 12px 13px; border-bottom: 1px solid var(--iq-border-subtle); text-align: left; }
.iq-plantafel-page .employee-utilization-table th { background: var(--iq-surface-secondary); color: var(--iq-text-secondary); font-size: 9px; font-weight: 600; }
.iq-plantafel-page .employee-utilization-table tbody tr { cursor: pointer; transition: background .15s ease; }
.iq-plantafel-page .employee-utilization-table tbody tr:hover { background: var(--iq-surface-hover); }
.iq-plantafel-page .employee-utilization-table td:first-child { display: flex; align-items: center; gap: 9px; }
.iq-plantafel-page .employee-table-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 9px; font-weight: 650; }

.iq-plantafel-page .employee-utilization-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 2px 8px 0;
}
.iq-plantafel-page .employee-utilization-pagination p { margin: 0; color: var(--iq-text-secondary); font-size: 10px; }
.iq-plantafel-page .employee-utilization-pagination nav { justify-content: center; gap: 5px; }
.iq-plantafel-page .employee-utilization-pagination nav button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--iq-border);
  border-radius: 8px;
  background: var(--iq-surface);
  color: var(--iq-text-secondary);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.iq-plantafel-page .employee-utilization-pagination nav button.is-active { border-color: #b9c8ff; background: var(--iq-accent-soft); color: var(--iq-accent); }
.iq-plantafel-page .employee-utilization-pagination nav button:disabled { opacity: .42; cursor: default; }
.iq-plantafel-page .employee-utilization-pagination > label { justify-self: end; }
.iq-plantafel-page .employee-utilization-pagination select { height: 34px; padding: 0 28px 0 11px; border: 1px solid var(--iq-border); border-radius: 8px; background: var(--iq-surface); color: var(--iq-text-primary); font: inherit; font-size: 10px; }

.iq-plantafel-page .statistics-dimension-section { display: grid; gap: 14px; }
.iq-plantafel-page .statistics-dimension-heading { display: flex; align-items: end; justify-content: space-between; }
.iq-plantafel-page .statistics-dimension-heading h2 { margin: 0; font-size: 16px; }
.iq-plantafel-page .statistics-dimension-heading p { margin: 0; color: var(--iq-text-secondary); font-size: 10px; }
.iq-plantafel-page .statistics-dimension-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.iq-plantafel-page .statistics-dimension-grid article { padding: 16px; border: 1px solid var(--iq-border); border-radius: 14px; background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.iq-plantafel-page .statistics-dimension-grid article > span { color: var(--iq-text-muted); font-size: 9px; }
.iq-plantafel-page .statistics-dimension-grid article > strong { display: block; margin-top: 6px; font-size: 14px; }
.iq-plantafel-page .statistics-dimension-grid dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.iq-plantafel-page .statistics-dimension-grid dl div { display: grid; gap: 4px; }
.iq-plantafel-page .statistics-dimension-grid dt { color: var(--iq-text-muted); font-size: 8px; }
.iq-plantafel-page .statistics-dimension-grid dd { margin: 0; color: var(--iq-text-primary); font-size: 11px; font-weight: 650; }

.iq-plantafel-page .employee-utilization-detail-backdrop {
  position: fixed;
  z-index: 309;
  inset: 0;
  border: 0;
  background: rgba(24, 35, 58, .25);
  backdrop-filter: blur(2px);
}
.iq-plantafel-page .employee-utilization-detail {
  position: fixed;
  z-index: 310;
  top: 0;
  right: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(420px, 94vw);
  height: 100dvh;
  padding: 22px;
  overflow: auto;
  border-left: 1px solid var(--iq-border);
  background: var(--iq-surface);
  box-shadow: -16px 0 45px rgba(31, 52, 94, .14);
  animation: iq-utilization-detail-in .2s ease both;
}
.iq-plantafel-page .employee-utilization-detail > header { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--iq-border-subtle); }
.iq-plantafel-page .employee-utilization-detail > header span { color: var(--iq-accent); font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.iq-plantafel-page .employee-utilization-detail > header h2 { margin: 5px 0 3px; font-size: 22px; }
.iq-plantafel-page .employee-utilization-detail > header p { margin: 0; color: var(--iq-text-secondary); font-size: 11px; }
.iq-plantafel-page .employee-utilization-detail > header button { width: 34px; height: 34px; border: 1px solid var(--iq-border); border-radius: 9px; background: var(--iq-surface-secondary); color: var(--iq-text-primary); font-size: 18px; cursor: pointer; }
.iq-plantafel-page .employee-utilization-detail-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.iq-plantafel-page .employee-utilization-detail-kpis div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--iq-border-subtle); border-radius: 10px; background: var(--iq-surface-secondary); }
.iq-plantafel-page .employee-utilization-detail-kpis dt { color: var(--iq-text-muted); font-size: 9px; }
.iq-plantafel-page .employee-utilization-detail-kpis dd { margin: 0; font-size: 13px; font-weight: 650; }
.iq-plantafel-page .employee-utilization-detail section h3 { margin: 0 0 10px; font-size: 13px; }
.iq-plantafel-page .employee-utilization-detail-list { display: grid; gap: 8px; }
.iq-plantafel-page .employee-utilization-detail-list article { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--iq-border-subtle); border-radius: 10px; background: var(--iq-surface-secondary); }
.iq-plantafel-page .employee-utilization-detail-list strong { font-size: 11px; }
.iq-plantafel-page .employee-utilization-detail-list span,
.iq-plantafel-page .employee-utilization-detail-list small { color: var(--iq-text-secondary); font-size: 9px; }

@keyframes iq-utilization-reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes iq-utilization-detail-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

@media (max-width: 1450px) {
  .iq-plantafel-page .employee-utilization-toolbar { align-items: stretch; flex-direction: column; }
  .iq-plantafel-page .employee-utilization-actions { justify-content: flex-start; flex-wrap: wrap; }
  .iq-plantafel-page .employee-utilization-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .iq-plantafel-page .employee-utilization-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iq-plantafel-page .employee-utilization-kpi { align-items: flex-start; flex-wrap: wrap; }
  .iq-plantafel-page .employee-utilization-view-controls { width: 100%; margin-left: 0; justify-content: space-between; }
  .iq-plantafel-page .statistics-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-plantafel-page .statistics-dimension-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .iq-plantafel-page[data-plantafel-view="stats"] .management-panel,
  .iq-plantafel-page .management-panel:has(.employee-utilization-page) { padding: 0 12px 24px !important; }
  .iq-plantafel-page[data-plantafel-view="stats"] .top-header { gap: 14px; }
  .iq-plantafel-page[data-plantafel-view="stats"] .plantafel-header-actions { width: 100%; }
  .statistics-header-search { flex: 1; width: auto; }
  .iq-plantafel-page .statistics-tabs { width: 100%; overflow-x: auto; }
  .iq-plantafel-page .statistics-tabs button { flex: 0 0 auto; }
  .iq-plantafel-page .employee-utilization-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-plantafel-page .statistics-date-range { grid-column: 1 / -1; justify-content: center; }
  .iq-plantafel-page .statistics-date-range label { flex: 1; }
  .iq-plantafel-page .statistics-date-range input { width: 100%; }
  .iq-plantafel-page .employee-utilization-actions select,
  .iq-plantafel-page .statistics-location-control select,
  .iq-plantafel-page .statistics-filter-button,
  .iq-plantafel-page .statistics-export-button { width: 100%; }
  .iq-plantafel-page .employee-utilization-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .iq-plantafel-page .employee-utilization-card { min-height: 306px; padding-inline: 12px; }
  .iq-plantafel-page .employee-utilization-view-controls { align-items: stretch; flex-direction: column; }
  .iq-plantafel-page .statistics-view-toggle { justify-content: stretch; }
  .iq-plantafel-page .statistics-view-toggle button { flex: 1; }
  .iq-plantafel-page .employee-utilization-view-controls > label { justify-content: space-between; }
  .iq-plantafel-page .employee-utilization-pagination { grid-template-columns: 1fr; justify-items: center; }
  .iq-plantafel-page .employee-utilization-pagination > label { justify-self: center; }
}

@media (max-width: 480px) {
  .iq-plantafel-page .employee-utilization-grid,
  .iq-plantafel-page .statistics-filter-panel,
  .iq-plantafel-page .statistics-dimension-grid { grid-template-columns: 1fr; }
  .iq-plantafel-page .employee-utilization-card { min-height: 320px; }
  .iq-plantafel-page .employee-utilization-kpi > p { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .iq-plantafel-page .employee-utilization-card,
  .iq-plantafel-page .employee-utilization-ring .ring-value,
  .iq-plantafel-page .employee-utilization-detail,
  .iq-plantafel-page .statistics-filter-panel { animation: none !important; transition: none !important; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body.iq-reference-ui {
  min-height: 100vh;
  margin: 0;
  background: var(--iq-background);
  color: var(--iq-text-primary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.iq-reference-ui button,
body.iq-reference-ui input,
body.iq-reference-ui select,
body.iq-reference-ui textarea { font: inherit; }

body.iq-reference-ui button,
body.iq-reference-ui a { -webkit-tap-highlight-color: transparent; }

body.iq-reference-ui :focus-visible {
  outline: 3px solid rgba(63, 99, 245, .2);
  outline-offset: 2px;
}

@view-transition { navigation: auto; }

::view-transition-old(iq-fixed-sidebar),
::view-transition-new(iq-fixed-sidebar) {
  animation: none;
  mix-blend-mode: normal;
}

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

.iq-sidebar,
.iq-reference-ui .sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--iq-sidebar-width);
  height: 100vh;
  padding: 22px 12px 16px;
  overflow: hidden;
  border-right: 1px solid var(--iq-border);
  background: var(--iq-sidebar);
  color: var(--iq-text-primary);
  box-shadow: none;
  view-transition-name: iq-fixed-sidebar;
}

.iq-brand,
.iq-reference-ui .brand {
  display: flex;
  align-items: center;
  min-height: 46px;
  margin: 0 8px 24px;
  padding: 0;
  color: var(--iq-text-primary);
  text-decoration: none;
}

.iq-brand img,
.iq-reference-ui .brand-logo img,
.iq-kalkulation-page .brand img {
  display: block;
  width: 105px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.iq-nav,
.iq-reference-ui .side-nav,
.iq-kalkulation-page .tabs {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.iq-nav-item,
.iq-reference-ui .nav-item,
.iq-kalkulation-page .tabs button {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--iq-radius-control);
  background: transparent;
  color: #24324a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-align: left;
  text-decoration: none;
  transition: background var(--iq-transition), color var(--iq-transition);
}

.iq-nav-item:hover,
.iq-reference-ui .nav-item:hover,
.iq-kalkulation-page .tabs button:hover {
  transform: none;
  background: var(--iq-surface-hover);
  color: var(--iq-accent);
}

.iq-nav-item.active,
.iq-reference-ui .nav-item.active,
.iq-kalkulation-page .tabs button.active {
  border: 0;
  background: var(--iq-accent-soft);
  color: var(--iq-accent);
  font-weight: 600;
}

.iq-nav-icon,
.iq-reference-ui .nav-icon {
  display: grid;
  flex: 0 0 20px;
  place-items: center;
  width: 20px;
  height: 20px;
  color: currentColor;
  font-size: 15px;
  font-weight: 600;
}

.iq-nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--iq-accent-soft);
  color: var(--iq-accent);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.iq-nav-spacer { flex: 1; min-height: 16px; }
.iq-nav-divider { height: 1px; margin: 10px 10px; background: var(--iq-border-subtle); }

.iq-user-card,
.iq-reference-ui .user-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 14px 4px 0;
  padding: 12px 5px 0;
  border-top: 1px solid var(--iq-border-subtle);
  background: transparent;
}

.iq-user-avatar,
.iq-reference-ui .user-card .avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #edf2fa;
  color: #344460;
  font-size: 12px;
  font-weight: 600;
}

.iq-user-copy,
.iq-reference-ui .user-info { display: grid; min-width: 0; gap: 2px; }
.iq-user-copy strong,
.iq-reference-ui .user-info strong { overflow: hidden; color: var(--iq-text-primary); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.iq-user-copy span,
.iq-reference-ui .user-info span { color: var(--iq-text-muted); font-size: 11px; }

.iq-user-card > a,
.iq-reference-ui .hub-return {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  color: var(--iq-text-secondary);
  font-size: 0;
  text-decoration: none;
}
.iq-user-card > a::before,
.iq-reference-ui .hub-return::before { content: "↗"; font-size: 14px; }
.iq-user-card > a:hover,
.iq-reference-ui .hub-return:hover { background: var(--iq-surface-hover); color: var(--iq-accent); }

.iq-main,
.iq-reference-ui .main-area {
  min-width: 0;
  min-height: 100vh;
  padding: 24px 28px 30px;
  background: var(--iq-background);
}

.iq-page-header,
.iq-reference-ui .top-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.iq-page-title h1,
.iq-reference-ui .page-heading h1 {
  margin: 0;
  color: var(--iq-text-primary);
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.iq-page-title p,
.iq-reference-ui .page-description {
  margin: 7px 0 0;
  color: var(--iq-text-secondary);
  font-size: 13px;
}

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

.iq-control,
.iq-reference-ui .ghost-button,
.iq-reference-ui .icon-button,
.iq-reference-ui .primary-button,
.iq-kalkulation-page .btn,
.iq-kalkulation-page .icon-button {
  min-height: var(--iq-control-height);
  padding: 0 14px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-control);
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--iq-transition), background var(--iq-transition), color var(--iq-transition), box-shadow var(--iq-transition);
}

.iq-control:hover,
.iq-reference-ui .ghost-button:hover,
.iq-reference-ui .icon-button:hover,
.iq-kalkulation-page .btn:hover,
.iq-kalkulation-page .icon-button:hover {
  transform: none;
  border-color: #cfd7e6;
  background: var(--iq-surface-hover);
}

.iq-primary,
.iq-reference-ui .primary-button,
.iq-kalkulation-page .btn.primary {
  border-color: var(--iq-accent);
  background: var(--iq-accent);
  color: #fff;
  font-weight: 600;
}
.iq-primary:hover,
.iq-reference-ui .primary-button:hover,
.iq-kalkulation-page .btn.primary:hover { border-color: var(--iq-accent-strong); background: var(--iq-accent-strong); color: #fff; }

.iq-icon-button,
.iq-reference-ui .icon-button,
.iq-kalkulation-page .icon-button { display: grid; place-items: center; width: var(--iq-control-height); min-width: var(--iq-control-height); padding: 0; }

.iq-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
  height: var(--iq-control-height);
  padding: 0 12px 0 35px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-control);
  background: var(--iq-surface);
  color: var(--iq-text-muted);
}
.iq-search::before { content: "⌕"; position: absolute; left: 13px; top: 8px; font-size: 18px; line-height: 1; }
.iq-search input { width: 100%; border: 0 !important; outline: 0; background: transparent !important; color: var(--iq-text-primary) !important; padding: 0 !important; box-shadow: none !important; }
.iq-search input::placeholder { color: var(--iq-text-muted); }

.iq-select,
.iq-reference-ui select,
.iq-reference-ui input,
.iq-reference-ui textarea,
.iq-kalkulation-page select,
.iq-kalkulation-page input,
.iq-kalkulation-page textarea {
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-control);
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  box-shadow: none;
}
.iq-select,
.iq-reference-ui select,
.iq-kalkulation-page select { min-height: var(--iq-control-height); padding: 0 34px 0 12px; }
.iq-reference-ui input,
.iq-kalkulation-page input { min-height: var(--iq-control-height); padding: 0 12px; }
.iq-reference-ui textarea,
.iq-kalkulation-page textarea { padding: 10px 12px; }
.iq-reference-ui option,
.iq-kalkulation-page option { background: #fff; color: var(--iq-text-primary); }

.iq-card,
.iq-reference-ui .glass,
.iq-reference-ui .panel {
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-card);
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
  backdrop-filter: none;
}

.iq-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.iq-metric-card {
  position: relative;
  display: grid;
  min-height: 142px;
  align-content: space-between;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-card);
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
  transition: transform var(--iq-transition), box-shadow var(--iq-transition);
}
.iq-metric-card:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(31, 52, 94, .075); }
.iq-metric-card > small { color: var(--iq-text-secondary); font-size: 13px; font-weight: 500; }
.iq-metric-card > strong { color: var(--iq-text-primary); font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.iq-metric-card > span { color: var(--iq-text-muted); font-size: 12px; }
.iq-metric-icon { position: absolute; top: 40px; right: 20px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 20px; }
.iq-metric-card.success .iq-metric-icon { background: var(--iq-success-soft); color: var(--iq-success); }
.iq-metric-card.warning .iq-metric-icon { background: var(--iq-warning-soft); color: var(--iq-warning); }
.iq-metric-card.danger .iq-metric-icon { background: var(--iq-danger-soft); color: var(--iq-danger); }
.iq-metric-card .positive { color: var(--iq-success); font-weight: 600; }
.iq-metric-card .negative { color: var(--iq-danger); font-weight: 600; }

.iq-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; background: var(--iq-info-soft); color: var(--iq-info); font-size: 11px; font-weight: 600; }
.iq-status.success { background: var(--iq-success-soft); color: #098654; }
.iq-status.warning { background: var(--iq-warning-soft); color: #b87509; }
.iq-status.danger { background: var(--iq-danger-soft); color: #cb3348; }
.iq-status.muted { background: #f0f2f6; color: #68748a; }

/* Kalkulation DL */
.iq-kalkulation-page .app-shell { grid-template-columns: var(--iq-sidebar-width) minmax(0, 1fr); }
.iq-kalkulation-page .iq-main { display: grid; align-content: start; gap: 16px; }
.iq-kalkulation-page .topbar { position: static; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.iq-kalkulation-page .topbar-actions { display: flex; align-items: center; gap: 10px; }
.iq-kalkulation-page .role-chip { padding: 5px 9px; border: 0; border-radius: 999px; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 10px; }
.iq-kalkulation-page main { display: grid; gap: 16px; min-width: 0; margin: 0; }
.iq-kalkulation-page .hero { display: none; }
.iq-kalkulation-page .tabs { overflow: visible; }
.iq-kalkulation-page .tabs button::before { content: "▢"; display: grid; place-items: center; width: 18px; color: currentColor; font-size: 13px; }
.iq-kalkulation-page .tabs button[data-tab="overview"]::before { content: "⌂"; }
.iq-kalkulation-page .tabs button[data-tab="customers"]::before { content: "◉"; }
.iq-kalkulation-page .tabs button[data-tab="products"]::before { content: "□"; }
.iq-kalkulation-page .tabs button[data-tab="equipment"]::before { content: "◇"; }
.iq-kalkulation-page .tabs button[data-tab="import"]::before { content: "⇧"; }
.iq-kalkulation-page .iq-module-label { margin: 16px 12px 5px; color: var(--iq-text-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.iq-kalkulation-page .toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px auto;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-card);
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
}
.iq-kalkulation-page .toolbar .search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-control); background: var(--iq-surface-secondary); }
.iq-kalkulation-page .toolbar .search input { border: 0; background: transparent; }

.kdl-reference-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.kdl-header-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.kdl-header-controls select { min-width: 170px; }
.kdl-header-controls .week-select { min-width: 220px; }
.kdl-dashboard { display: grid; gap: 18px; }
.kdl-dashboard .iq-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kdl-analytics-grid { display: grid; grid-template-columns: 1.5fr 1.08fr .78fr; gap: 16px; }
.kdl-analytics-card { min-height: 280px; padding: 18px 20px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.kdl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.kdl-card-head h2 { margin: 0; color: var(--iq-text-primary); font-size: 14px; font-weight: 600; }
.kdl-card-head p { margin: 5px 0 0; color: var(--iq-text-muted); font-size: 11px; }
.kdl-chart-legend { display: flex; align-items: center; gap: 18px; color: var(--iq-text-muted); font-size: 10px; }
.kdl-chart-legend span::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--iq-accent); }
.kdl-cost-chart { position: relative; height: 185px; margin-top: 14px; border-bottom: 1px solid var(--iq-border); background: repeating-linear-gradient(to bottom, transparent 0 45px, var(--iq-border-subtle) 46px); }
.kdl-cost-chart svg { position: absolute; inset: 8px 8px 22px 28px; width: calc(100% - 36px); height: calc(100% - 30px); overflow: visible; }
.kdl-cost-chart .axis-labels { position: absolute; right: 6px; bottom: 2px; left: 28px; display: flex; justify-content: space-between; color: var(--iq-text-muted); font-size: 9px; }
.kdl-cost-chart .chart-value { position: absolute; top: 48px; right: 2px; padding: 4px 7px; border-radius: 6px; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 10px; font-weight: 600; }

.kdl-donut-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 205px; }
.kdl-donut { --value: 72; --donut-color: var(--iq-success); position: relative; display: grid; place-items: center; width: 132px; height: 132px; margin: auto; border-radius: 50%; background: conic-gradient(var(--donut-color) calc(var(--value) * 1%), #e9edf5 0); }
.kdl-donut::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; background: var(--iq-surface); }
.kdl-donut > span { position: relative; z-index: 1; display: grid; text-align: center; }
.kdl-donut strong { color: var(--iq-text-primary); font-size: 24px; font-weight: 600; }
.kdl-donut small { color: var(--iq-text-muted); font-size: 10px; }
.kdl-module-donut { background: conic-gradient(#4d6df8 0 38%, #7390ff 38% 62%, #29b7dd 62% 79%, #45cba1 79% 89%, #e5c45a 89% 95%, #f3ad38 95%); }
.kdl-donut-list { display: grid; gap: 9px; }
.kdl-donut-list span { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 7px; color: var(--iq-text-secondary); font-size: 10px; }
.kdl-donut-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--iq-accent)); }

.kdl-action-panel { padding: 16px 18px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.kdl-action-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kdl-action-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.kdl-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kdl-action-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; min-height: 62px; padding: 11px; border: 1px solid #f4dfc1; border-radius: 9px; background: #fffaf2; }
.kdl-action-card.danger { border-color: #f5d6dc; background: #fff7f8; }
.kdl-action-card.info { border-color: #dce8fb; background: #f7faff; }
.kdl-action-card > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid currentColor; border-radius: 50%; color: var(--iq-warning); font-weight: 600; }
.kdl-action-card.danger > span { color: var(--iq-danger); }
.kdl-action-card.info > span { color: var(--iq-info); }
.kdl-action-card strong { font-size: 12px; font-weight: 600; }
.kdl-action-card strong b { margin-right: 7px; color: var(--iq-warning); font-size: 17px; }
.kdl-action-card.danger strong b { color: var(--iq-danger); }
.kdl-action-card.info strong b { color: var(--iq-info); }
.kdl-action-card small { display: block; margin-top: 3px; color: var(--iq-text-muted); font-size: 10px; }

.kdl-service-panel { overflow: hidden; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.kdl-service-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--iq-border-subtle); }
.kdl-service-toolbar h2 { margin: 0 6px 0 0; font-size: 14px; }
.kdl-service-toolbar #overviewToolbarSlot { flex: 1; min-width: 0; }
.kdl-service-toolbar #overviewToolbarSlot .toolbar { grid-template-columns: minmax(190px, 1fr) 150px 150px auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.kdl-service-toolbar .iq-search { min-width: 240px; }
.kdl-service-toolbar .toolbar-spacer { flex: 1; }
.kdl-service-panel .table-wrap { overflow: auto; border: 0; border-radius: 0; box-shadow: none; }

.iq-kalkulation-page .table-wrap { overflow: auto; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.iq-kalkulation-page table { width: 100%; min-width: 980px; border-collapse: collapse; background: transparent; }
.iq-kalkulation-page th,
.iq-kalkulation-page td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--iq-border-subtle); background: transparent; color: var(--iq-text-secondary); font-size: 11px; vertical-align: middle; }
.iq-kalkulation-page th { position: static; color: var(--iq-text-muted); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.iq-kalkulation-page th:first-child,
.iq-kalkulation-page td:first-child { position: static; background: transparent; }
.iq-kalkulation-page td strong { color: var(--iq-text-primary); font-weight: 600; }
.iq-kalkulation-page tbody tr { transition: background var(--iq-transition); }
.iq-kalkulation-page tbody tr:hover { background: var(--iq-surface-hover); }
.iq-kalkulation-page tbody tr:hover td { background: transparent; }
.iq-kalkulation-page .row-actions .btn { min-height: 30px; padding: 0 9px; font-size: 10px; }

.iq-kalkulation-page .catalog,
.iq-kalkulation-page .dashboard-grid,
.iq-kalkulation-page .import-layout { gap: 14px; }
.iq-kalkulation-page .module-card,
.iq-kalkulation-page .panel { padding: 0; overflow: hidden; }
.iq-kalkulation-page .module-head { background: var(--iq-surface); color: var(--iq-text-primary); }
.iq-kalkulation-page .task-card { border-color: var(--iq-border-subtle); background: var(--iq-surface-secondary); }
.iq-kalkulation-page dialog { border-color: var(--iq-border); background: var(--iq-surface); color: var(--iq-text-primary); box-shadow: var(--iq-shadow-floating); }
.iq-kalkulation-page dialog::backdrop { background: rgba(30, 42, 68, .28); backdrop-filter: blur(3px); }
.iq-kalkulation-page dialog header,
.iq-kalkulation-page dialog footer { border-color: var(--iq-border); }
.iq-kalkulation-page dialog label { color: var(--iq-text-secondary); }
.iq-kalkulation-page .finance { border-color: #d8eee3; background: #f5fcf8; }
.iq-kalkulation-page .calculation-preview { border-color: #dce5ff; background: #f5f7ff; color: var(--iq-text-secondary); }

/* Plantafel */
.iq-plantafel-page { --iq-background: #ffffff; background: #ffffff; }
.iq-plantafel-page .app-shell { grid-template-columns: var(--iq-sidebar-width) minmax(0, 1fr); }
.iq-plantafel-page .main-area { position: static; overflow: visible; background: #ffffff; }
.iq-plantafel-page .background-layer,
.iq-plantafel-page .main-overlay { display: none; }
.iq-plantafel-page .content-panel { position: static; width: 100%; min-height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.iq-plantafel-page .brand { display: flex; }
.iq-plantafel-page .brand-subtitle,
.iq-plantafel-page .brand-fallback,
.iq-plantafel-page .breadcrumb { display: none; }
.iq-plantafel-page .side-nav { overflow-y: auto; }
.iq-plantafel-page .page-heading h1 { display: flex; align-items: center; gap: 8px; }
.iq-plantafel-page .page-heading h1::after { content: "i"; display: grid; place-items: center; width: 15px; height: 15px; border: 1px solid var(--iq-text-muted); border-radius: 50%; color: var(--iq-text-muted); font-size: 9px; font-weight: 600; }
.iq-plantafel-page .top-header { min-height: 64px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; }
.iq-plantafel-page .top-header h1,
.iq-plantafel-page .page-heading h1 { color: var(--iq-text-primary) !important; text-shadow: none !important; }
.iq-plantafel-page .page-description { color: var(--iq-text-primary) !important; text-shadow: none !important; }
.iq-plantafel-page .page-heading { padding-left: 18px; }

.plantafel-header-actions { display: flex; align-items: center; gap: 8px; }
.plantafel-header-actions .notification-button { position: relative; }
.plantafel-header-actions .notification-button::after { display: none; }
.plantafel-header-actions .notification-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.plantafel-header-actions .icon-button[aria-expanded="true"] { border-color: #b9c8ff; background: var(--iq-accent-soft); color: var(--iq-accent); }
.plantafel-notification-count { position: absolute; top: -5px; right: -5px; display: grid; min-width: 17px; height: 17px; place-items: center; padding: 0 4px; border: 2px solid #ffffff; border-radius: 99px; background: var(--iq-accent); color: #ffffff; font-size: 8px; font-weight: 700; line-height: 1; }
.plantafel-notification-count[hidden] { display: none !important; }
.plantafel-help-button { font-size: 12px; font-weight: 650; }

.iq-plantafel-page .header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: min(820px, calc(100% - 18px));
  max-width: 820px;
  margin: -3px 0 18px 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.iq-plantafel-page .week-nav { display: flex; align-items: center; gap: 6px; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.iq-plantafel-page .week-range { display: grid; place-items: center; min-width: 180px; min-height: var(--iq-control-height); padding: 0 14px; border: 1px solid var(--iq-border) !important; border-radius: var(--iq-radius-control); background: var(--iq-surface) !important; color: var(--iq-text-primary) !important; box-shadow: none !important; font-size: 12px; font-weight: 600; }
.iq-plantafel-page .week-nav .icon-button { border-color: var(--iq-border) !important; background: var(--iq-surface) !important; color: var(--iq-text-primary) !important; box-shadow: none !important; }
.iq-plantafel-page .autosave-status { min-height: var(--iq-control-height); padding: 0 12px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-control); background: var(--iq-surface); color: var(--iq-text-muted); font-size: 11px; }
.iq-plantafel-page .autosave-dot { background: var(--iq-success); box-shadow: none; }
.iq-plantafel-page .week-strip {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  width: calc(100% - 18px);
  margin: 0 0 18px 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.iq-plantafel-page .week-strip[hidden] { display: none !important; }
.iq-plantafel-page .week-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 8px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.iq-plantafel-page .week-card {
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-control);
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  box-shadow: none;
  text-align: left;
}
.iq-plantafel-page .week-card strong,
.iq-plantafel-page .week-card span { display: block; }
.iq-plantafel-page .week-card strong { font-size: 12px; font-weight: 650; }
.iq-plantafel-page .week-card span { margin-top: 3px; color: var(--iq-text-muted); font-size: 10px; }
.iq-plantafel-page .week-card:hover { border-color: #b9c8ff; background: var(--iq-surface-hover); box-shadow: none; transform: none; }
.iq-plantafel-page .week-card.active {
  min-height: 56px;
  border-color: var(--iq-accent);
  background: var(--iq-accent-soft);
  color: var(--iq-accent);
  box-shadow: none;
}
.iq-plantafel-page .week-card.active span { color: var(--iq-accent); }

.plantafel-control-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.planning-view-segments { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-control); background: var(--iq-surface); }
.planning-view-segments button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--iq-text-secondary); font-size: 11px; font-weight: 500; }
.planning-view-segments button.is-active { background: var(--iq-accent-soft); color: var(--iq-accent); }
.iq-plantafel-page .planning-search { display: flex; min-width: 230px; }
.iq-plantafel-page .planning-search input { width: 100%; min-height: var(--iq-control-height); border-color: var(--iq-border); background: var(--iq-surface); color: var(--iq-text-primary); font-weight: 400; }
.iq-plantafel-page .view-mode-select { display: none; }

.plantafel-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.plantafel-kpi-grid .iq-metric-card { min-height: 112px; padding: 17px; }
.plantafel-kpi-grid .iq-metric-card > strong { font-size: 24px; }
.plantafel-kpi-grid .iq-metric-icon { top: 38px; width: 42px; height: 42px; font-size: 17px; }

.iq-plantafel-page .board-toolbar { display: flex; align-items: center; justify-content: flex-start; gap: 24px; margin: 0 0 10px; padding: 0 0 0 18px; border: 0; background: transparent; box-shadow: none; }
.iq-plantafel-page .board-toolbar-summary h2 { margin: 0; color: var(--iq-text-primary); font-size: 14px; font-weight: 600; }
.iq-plantafel-page .board-toolbar-summary p { margin: 3px 0 0; color: var(--iq-text-muted); font-size: 11px; }
.iq-plantafel-page .board-actions { display: flex; gap: 8px; }
.iq-plantafel-page .board-actions > .planning-search,
.iq-plantafel-page .board-actions > .view-mode-select,
.iq-plantafel-page .board-actions > #planningFilterBtn { display: none; }
.iq-plantafel-page .planning-detail-shortcuts { display: grid; gap: 5px; }
.iq-plantafel-page .planning-detail-shortcut { display: flex; justify-content: space-between; min-height: 34px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--iq-text-secondary); text-align: left; }
.iq-plantafel-page .planning-detail-shortcut:hover { background: var(--iq-surface-hover); }
.iq-plantafel-page .planning-detail-shortcut strong { color: var(--iq-text-muted); font-size: 10px; }

.iq-plantafel-page .planning-filter-bar { margin: 0 0 12px; padding: 10px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); backdrop-filter: none; }
.iq-plantafel-page .planning-filter-bar label { color: var(--iq-text-secondary); }

.plantafel-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 14px; }
.iq-plantafel-page .board-frame { position: relative; min-width: 0; overflow: auto; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.iq-plantafel-page .board-shift { position: absolute; z-index: 12; top: 50%; display: grid; width: 34px; height: 54px; place-items: center; margin: 0; border: 1px solid var(--iq-border); border-radius: 12px; background: rgba(255, 255, 255, .96); color: var(--iq-text-primary); box-shadow: var(--iq-shadow-floating); transform: translateY(-50%); cursor: pointer; }
.iq-plantafel-page .board-shift-left { left: 8px; }
.iq-plantafel-page .board-shift-right { right: 8px; }
.iq-plantafel-page .board-shift:disabled { opacity: .25; cursor: default; }
.iq-plantafel-page .einsatzplanung-board { display: block; min-width: 1120px; min-height: 520px; padding: 0; border: 0; background: var(--iq-surface); box-shadow: none; }
.planning-grid-header,
.employee-schedule-row { display: grid; grid-template-columns: 190px repeat(7, minmax(128px, 1fr)); }
.planning-grid-header { position: sticky; top: 0; z-index: 8; min-height: 52px; border-bottom: 1px solid var(--iq-border); background: rgba(255, 255, 255, .97); }
.planning-grid-header > div { display: grid; place-items: center; padding: 8px; border-right: 1px solid var(--iq-border-subtle); color: var(--iq-text-secondary); font-size: 11px; text-align: center; }
.planning-grid-header > div:first-child { position: sticky; left: 0; z-index: 9; place-items: center start; padding-left: 16px; background: rgba(255, 255, 255, .98); color: var(--iq-text-primary); font-weight: 600; }
.planning-grid-header strong { display: block; color: var(--iq-text-primary); font-size: 11px; font-weight: 600; }
.planning-grid-header span { display: block; margin-top: 2px; color: var(--iq-text-muted); font-size: 10px; }
.planning-grid-header .today { background: #f7f9ff; }

.employee-schedule-row { min-height: 104px; border-bottom: 1px solid var(--iq-border-subtle); }
.employee-schedule-row:last-child { border-bottom: 0; }
.schedule-employee { position: sticky; left: 0; z-index: 6; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-content: center; gap: 9px; padding: 13px 12px; border-right: 1px solid var(--iq-border); background: var(--iq-surface); }
.schedule-employee-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #edf2fa; color: #344460; font-size: 10px; font-weight: 600; }
.schedule-employee-copy { min-width: 0; }
.schedule-employee-copy strong { display: block; overflow: hidden; color: var(--iq-text-primary); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.schedule-employee-copy small { display: block; overflow: hidden; margin-top: 2px; color: var(--iq-text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-hours { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--iq-text-secondary); font-size: 9px; }
.schedule-workload { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #e9edf4; }
.schedule-workload span { display: block; height: 100%; border-radius: inherit; background: var(--iq-success); }
.schedule-workload.warning span { background: var(--iq-warning); }
.schedule-workload.danger span { background: var(--iq-danger); }

.schedule-cell.day-column { position: relative; display: flex; min-height: 104px; padding: 8px; border: 0; border-right: 1px solid var(--iq-border-subtle); border-radius: 0; background: var(--iq-surface); box-shadow: none; }
.schedule-cell.today { background: #fafbff; }
.schedule-cell.drag-over { background: var(--iq-accent-soft); box-shadow: inset 0 0 0 2px rgba(63, 99, 245, .35); }
.schedule-cell .assignment-list { display: grid; align-content: start; gap: 6px; width: 100%; min-height: 0; padding: 0; }
.schedule-cell .empty-state,
.schedule-cell .day-header,
.schedule-cell .day-footer { display: none; }

.planning-day-grid { display: grid; grid-template-columns: repeat(6, minmax(175px, 1fr)); min-height: 560px; }
.planning-day-column.day-column { position: relative; display: flex; flex-direction: column; min-height: 560px; padding: 0; border: 0; border-right: 1px solid var(--iq-border-subtle); border-radius: 0; background: var(--iq-surface); box-shadow: none; }
.planning-day-column.day-column:last-child { border-right: 0; }
.planning-day-column.today { background: #fafbff; }
.planning-day-column.drag-over { background: var(--iq-accent-soft); box-shadow: inset 0 0 0 2px rgba(63, 99, 245, .35); }
.planning-day-header { position: sticky; top: 0; z-index: 7; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 10px 12px; border-bottom: 1px solid var(--iq-border); background: rgba(255, 255, 255, .97); }
.planning-day-column.today .planning-day-header { background: #f7f9ff; }
.planning-day-header strong { display: block; color: var(--iq-text-primary); font-size: 12px; font-weight: 650; }
.planning-day-header span { display: block; margin-top: 2px; color: var(--iq-text-muted); font-size: 10px; }
.planning-day-header small { color: var(--iq-text-muted); font-size: 9px; font-weight: 500; white-space: nowrap; }
.planning-day-column > .assignment-list { display: grid; align-content: start; gap: 8px; width: 100%; padding: 10px; }
.planning-day-empty { margin: auto 10px; padding: 18px 8px; border: 1px dashed var(--iq-border); border-radius: 9px; color: var(--iq-text-muted); font-size: 10px; text-align: center; }

.iq-plantafel-page .month-planning-grid { border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); }
.iq-plantafel-page .month-day { border-color: var(--iq-border-subtle); background: var(--iq-surface); color: var(--iq-text-primary); }
.iq-plantafel-page .month-day.is-outside { opacity: 1; background: var(--iq-surface-secondary); color: var(--iq-text-muted); }
.iq-plantafel-page .month-day.today { background: var(--iq-accent-soft); box-shadow: inset 0 0 0 1px rgba(63, 99, 245, .2); }
.iq-plantafel-page .month-day header span { color: var(--iq-text-primary); font-weight: 650; }
.iq-plantafel-page .month-day header small,
.iq-plantafel-page .month-day > div > small { color: var(--iq-text-muted); }
.iq-plantafel-page .month-day button { border: 1px solid #dce5ff; background: #f3f6ff; color: var(--iq-text-secondary); box-shadow: none; }
.iq-plantafel-page .month-day button:hover { border-color: #c3d0ff; background: var(--iq-accent-soft); color: var(--iq-accent-strong); }
.iq-plantafel-page .month-day button strong { color: var(--iq-text-primary); }

.iq-plantafel-page .assignment-card.schedule-card { position: relative; display: grid; gap: 5px; width: 100%; min-height: 76px; margin: 0; padding: 9px 24px 8px 9px; border: 1px solid var(--assignment-border, #cfe3ff); border-left-width: 1px; border-radius: 8px; background: var(--assignment-bg, #eff7ff); color: var(--iq-text-primary); box-shadow: none; cursor: pointer; transition: transform var(--iq-transition), box-shadow var(--iq-transition), border-color var(--iq-transition); }
.iq-plantafel-page .assignment-card.schedule-card:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(31, 52, 94, .08); }
.iq-plantafel-page .assignment-card.schedule-card.is-selected { border-color: var(--iq-accent); box-shadow: 0 0 0 2px rgba(63, 99, 245, .12); }
.schedule-card-head { display: flex; align-items: flex-start; gap: 6px; }
.schedule-card-icon { display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .65); color: var(--assignment-accent, var(--iq-info)); font-size: 11px; }
.schedule-card-title { min-width: 0; }
.schedule-card-title strong { display: block; overflow: hidden; color: #23324b; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card-title small { display: block; overflow: hidden; margin-top: 1px; color: #55647d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card-time { color: #5c6a80; font-size: 8px; }
.schedule-card-employee { display: block; overflow: hidden; color: #66748a; font-size: 8px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card-menu { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #76839a; font-size: 15px; cursor: pointer; }
.schedule-card-menu:hover { background: rgba(255, 255, 255, .8); }
.schedule-card-actions { display: none; position: absolute; top: 27px; right: 4px; z-index: 12; min-width: 92px; padding: 5px; border: 1px solid var(--iq-border); border-radius: 8px; background: #fff; box-shadow: var(--iq-shadow-floating); }
.schedule-card.show-actions .schedule-card-actions { display: grid; }
.schedule-card-actions button { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--iq-text-secondary); font-size: 9px; text-align: left; }
.schedule-card-actions button:hover { background: var(--iq-surface-hover); }
.schedule-card-actions .delete { color: var(--iq-danger); }
.schedule-card.type-service { --assignment-bg: #edf6ff; --assignment-border: #cce2fb; --assignment-accent: #2f86e7; }
.schedule-card.type-analysis { --assignment-bg: #ecfaf5; --assignment-border: #caeddf; --assignment-accent: #18a978; }
.schedule-card.type-cleaning { --assignment-bg: #fff8e9; --assignment-border: #f3dfb2; --assignment-accent: #dc991f; }
.schedule-card.type-project { --assignment-bg: #f4efff; --assignment-border: #ddd0fb; --assignment-accent: #8555dd; }
.schedule-card.type-report { --assignment-bg: #f8faff; --assignment-border: #aebdf1; --assignment-accent: #536fda; }
.schedule-card.type-overdue { --assignment-bg: #fff0f1; --assignment-border: #f3c4ca; --assignment-accent: var(--iq-danger); }

.assignment-detail-panel { position: sticky; top: 18px; min-height: 540px; padding: 18px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.assignment-detail-empty { display: grid; place-items: center; min-height: 500px; color: var(--iq-text-muted); text-align: center; }
.assignment-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--iq-border-subtle); }
.assignment-detail-head h2 { margin: 0; color: var(--iq-text-primary); font-size: 13px; font-weight: 600; }
.assignment-detail-head p { margin: 4px 0 0; color: var(--iq-text-secondary); font-size: 10px; }
.assignment-detail-close { display: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: var(--iq-surface-secondary); color: var(--iq-text-secondary); }
.assignment-detail-meta { display: grid; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--iq-border-subtle); }
.assignment-detail-meta div { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; color: var(--iq-text-secondary); font-size: 10px; }
.assignment-detail-meta span:first-child { color: var(--iq-text-muted); }
.assignment-detail-section { padding: 16px 0; border-bottom: 1px solid var(--iq-border-subtle); }
.assignment-detail-section h3 { margin: 0 0 10px; color: var(--iq-text-primary); font-size: 11px; font-weight: 600; }
.assignment-task-list { display: grid; gap: 8px; }
.assignment-task-list div { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 7px; color: var(--iq-text-secondary); font-size: 10px; }
.assignment-task-list i { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid #cbd3e0; border-radius: 50%; color: #fff; font-size: 8px; font-style: normal; }
.assignment-task-list .done i { border-color: var(--iq-success); background: var(--iq-success); }
.assignment-note { min-height: 66px; padding: 10px; border: 1px solid var(--iq-border); border-radius: 8px; background: var(--iq-surface-secondary); color: var(--iq-text-secondary); font-size: 10px; }
.assignment-detail-panel > .iq-control { width: 100%; margin-top: 16px; }

.planning-legend { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 14px 6px 0; color: var(--iq-text-muted); font-size: 9px; }
.planning-legend span { display: inline-flex; align-items: center; gap: 6px; }
.planning-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--legend-color); }

.iq-plantafel-page .side-nav { overflow-x: hidden !important; overflow-y: auto !important; }
.plantafel-task-menu { display: flex; flex: 0 0 auto; flex-direction: column; min-height: 0; max-height: none; margin: 0; padding: 0; overflow: visible; }
.plantafel-task-customer-filter { display: grid; gap: 5px; margin: 7px 12px 3px; color: var(--iq-text-muted); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.plantafel-task-customer-filter select { width: 100%; min-height: 34px; padding: 0 28px 0 9px; border: 1px solid var(--iq-border); border-radius: 8px; background: var(--iq-surface); color: var(--iq-text-primary); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; outline: none; cursor: pointer; }
.plantafel-task-customer-filter select:hover { border-color: #c7d2e5; background: var(--iq-surface-hover); }
.plantafel-task-customer-filter select:focus-visible { border-color: var(--iq-accent); box-shadow: 0 0 0 3px rgba(63, 99, 245, .12); }
.plantafel-task-label { display: flex; align-items: center; justify-content: space-between; margin: 14px 12px 5px; color: var(--iq-text-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.plantafel-task-label small { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 9px; letter-spacing: 0; }
.plantafel-task-tabs { display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; min-height: 0; overflow: visible; }
.plantafel-task-tab { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 7px 12px; border: 0; border-radius: var(--iq-radius-control); background: transparent; color: #24324a; text-align: left; cursor: grab; transition: background var(--iq-transition), color var(--iq-transition); }
.plantafel-task-tab:hover { background: var(--iq-surface-hover); color: var(--iq-accent); }
.plantafel-task-tab.dragging { opacity: .55; }
.plantafel-task-icon { display: grid; place-items: center; width: 18px; color: currentColor; font-size: 13px; }
.plantafel-task-copy { display: block; min-width: 0; }
.plantafel-task-copy strong,
.plantafel-task-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plantafel-task-copy strong { color: currentColor; font-size: 11px; font-weight: 600; }
.plantafel-task-copy small { margin-top: 2px; color: var(--iq-text-muted); font-size: 9px; font-weight: 400; }
.plantafel-task-empty { margin: 8px 12px; color: var(--iq-text-muted); font-size: 10px; }

.iq-plantafel-page .planning-operations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.iq-plantafel-page .operation-card { border-color: var(--iq-border); background: var(--iq-surface); color: var(--iq-text-primary); box-shadow: var(--iq-shadow-card); backdrop-filter: none; }
.iq-plantafel-page .operation-card small,
.iq-plantafel-page .compact-empty { color: var(--iq-text-muted); }
.iq-plantafel-page .open-shift-row,
.iq-plantafel-page .alert-row { border-color: var(--iq-border-subtle); background: var(--iq-surface-secondary); color: var(--iq-text-primary); }

.iq-plantafel-page .entry-drawer,
.iq-plantafel-page .planning-side-panel,
.iq-plantafel-page .publish-modal { border-color: var(--iq-border); background: var(--iq-surface); color: var(--iq-text-primary); box-shadow: var(--iq-shadow-floating); }
.iq-plantafel-page .drawer-header,
.iq-plantafel-page .panel-header { border-color: var(--iq-border); background: rgba(255, 255, 255, .96); }
.iq-plantafel-page .drawer-form label,
.iq-plantafel-page .panel-form label { color: var(--iq-text-secondary); }
.iq-plantafel-page .drawer-header h2 { color: var(--iq-text-primary) !important; text-shadow: none !important; }
.iq-plantafel-page .drawer-form label > span,
.iq-plantafel-page .drawer-form fieldset > legend { color: var(--iq-text-primary) !important; }
.iq-plantafel-page .toggle-row { border: 1px solid var(--iq-border) !important; background: var(--iq-surface-secondary) !important; color: var(--iq-text-primary) !important; box-shadow: none !important; }
.iq-plantafel-page .toggle-control { border: 1px solid #cbd4e2 !important; background: #e8edf5 !important; box-shadow: none !important; }
.iq-plantafel-page .toggle-control::after { background: #ffffff !important; box-shadow: 0 2px 6px rgba(31, 52, 94, .18) !important; }
.iq-plantafel-page .toggle-row input:checked + .toggle-control { border-color: var(--iq-accent) !important; background: var(--iq-accent) !important; box-shadow: 0 0 0 3px rgba(63, 99, 245, .12) !important; }
.iq-plantafel-page .toggle-copy strong { color: var(--iq-text-primary) !important; }
.iq-plantafel-page .toggle-copy small { color: var(--iq-text-secondary) !important; }
.iq-plantafel-page .day-picker { border: 1px solid var(--iq-border) !important; background: var(--iq-surface-secondary) !important; color: var(--iq-text-primary) !important; box-shadow: none !important; }
.iq-plantafel-page .day-picker legend { color: var(--iq-text-primary) !important; }
.iq-plantafel-page .day-picker-options span { border: 1px solid var(--iq-border) !important; background: var(--iq-surface) !important; color: var(--iq-text-primary) !important; box-shadow: none !important; }
.iq-plantafel-page .day-picker-options span:hover { border-color: #cbd5e5 !important; background: var(--iq-surface-hover) !important; }
.iq-plantafel-page .day-picker-options input:checked + span { border-color: var(--iq-accent) !important; background: var(--iq-accent) !important; color: #ffffff !important; box-shadow: 0 6px 14px rgba(63, 99, 245, .16) !important; }
.iq-plantafel-page .drawer-actions { border-top: 1px solid var(--iq-border) !important; background: var(--iq-surface) !important; box-shadow: none !important; backdrop-filter: none !important; }
.iq-plantafel-page .modal-backdrop,
.iq-plantafel-page .drawer-backdrop { background: rgba(30, 42, 68, .28); backdrop-filter: blur(3px); }
.iq-plantafel-page .planning-side-panel .panel-body { color: var(--iq-text-primary); }
.iq-plantafel-page .panel-intro,
.iq-plantafel-page .panel-item p,
.iq-plantafel-page .panel-item small { color: var(--iq-text-secondary); }
.iq-plantafel-page .panel-item,
.iq-plantafel-page .copy-preview-list > div,
.iq-plantafel-page .suggestion-list > article { border-color: var(--iq-border); background: var(--iq-surface-secondary); }

/* Plantafel / Auswertungen: use the same light operational UI as the Hub. */
.iq-plantafel-page .management-panel:has(.statistics-page) {
  width: 100%;
  min-height: 0;
  margin: 0 !important;
  padding: 14px 18px 34px;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Explicit view state avoids the legacy dark management surface even when :has() is unavailable. */
.iq-plantafel-page[data-plantafel-view="stats"] {
  background: var(--iq-background) !important;
}

.iq-plantafel-page[data-plantafel-view="stats"] .main-area,
.iq-plantafel-page[data-plantafel-view="stats"] .content-panel {
  background: var(--iq-background) !important;
}

.iq-plantafel-page[data-plantafel-view="stats"] .content-panel {
  display: block !important;
  min-height: 100vh !important;
  height: auto !important;
  overflow: visible !important;
}

.iq-plantafel-page[data-plantafel-view="stats"] .management-panel {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 14px 18px 34px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.iq-plantafel-page[data-plantafel-view="stats"] .statistics-page {
  width: 100%;
  max-width: none;
  padding: 0;
  background: transparent !important;
}

.iq-plantafel-page .statistics-page {
  display: grid;
  gap: 16px;
  color: var(--iq-text-primary);
}

.iq-plantafel-page .statistics-page h2,
.iq-plantafel-page .statistics-page h3,
.iq-plantafel-page .statistics-page strong {
  color: var(--iq-text-primary) !important;
  text-shadow: none !important;
}

.iq-plantafel-page .statistics-page .eyebrow {
  color: var(--iq-accent) !important;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.iq-plantafel-page .statistics-header,
.iq-plantafel-page .statistics-planning-summary,
.iq-plantafel-page .statistics-layout > .management-card {
  border: 1px solid var(--iq-border) !important;
  border-radius: var(--iq-radius-card) !important;
  background: var(--iq-surface) !important;
  box-shadow: var(--iq-shadow-card) !important;
  backdrop-filter: none !important;
}

.iq-plantafel-page .statistics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px !important;
}

.iq-plantafel-page .statistics-header h2 {
  margin: 3px 0 0;
  font-size: 16px;
  font-weight: 650;
}

.iq-plantafel-page .statistics-header p,
.iq-plantafel-page .statistics-page .section-title p {
  margin: 5px 0 0;
  color: var(--iq-text-muted) !important;
  font-size: 10px;
}

.iq-plantafel-page .statistics-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--iq-text-secondary) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.iq-plantafel-page .statistics-actions .date-control {
  display: grid;
  gap: 4px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.iq-plantafel-page .statistics-actions .date-control span {
  color: var(--iq-text-muted) !important;
  font-size: 9px;
  font-weight: 550;
}

.iq-plantafel-page .statistics-actions select,
.iq-plantafel-page .statistics-actions input,
.iq-plantafel-page .statistics-actions .secondary-button {
  min-height: 38px;
  border: 1px solid var(--iq-border) !important;
  border-radius: var(--iq-radius-control) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
  font-size: 11px;
}

.iq-plantafel-page .statistics-actions select { min-width: 145px; }
.iq-plantafel-page .statistics-actions input { min-width: 138px; }
.iq-plantafel-page .statistics-actions .secondary-button {
  padding: 0 14px;
  color: var(--iq-accent) !important;
  font-weight: 600;
}
.iq-plantafel-page .statistics-actions .secondary-button:hover {
  transform: none !important;
  border-color: #c9d2fa !important;
  background: var(--iq-accent-soft) !important;
}

.iq-plantafel-page .stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.iq-plantafel-page .stat-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 7px;
  min-height: 140px;
  padding: 18px !important;
  overflow: hidden;
  border: 1px solid var(--iq-border) !important;
  border-radius: var(--iq-radius-card) !important;
  background: var(--iq-surface) !important;
  box-shadow: var(--iq-shadow-card) !important;
  backdrop-filter: none !important;
}

.iq-plantafel-page .stat-card::before { display: none; }
.iq-plantafel-page .stat-card:hover { transform: none !important; box-shadow: var(--iq-shadow-card) !important; }
.iq-plantafel-page .stat-card > span {
  order: -2;
  color: var(--iq-text-secondary) !important;
  font-size: 11px;
  font-weight: 550;
}
.iq-plantafel-page .stat-card > strong {
  padding-right: 52px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.iq-plantafel-page .stat-card > small {
  color: var(--iq-text-muted) !important;
  font-size: 10px;
  font-weight: 500;
}
.iq-plantafel-page .stat-icon {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0 !important;
  border-radius: 50%;
  background: var(--iq-accent-soft) !important;
  color: var(--iq-accent) !important;
  font-size: 10px;
  font-weight: 700;
}
.iq-plantafel-page .stat-card:nth-child(2) .stat-icon { background: var(--iq-success-soft) !important; color: var(--iq-success) !important; }
.iq-plantafel-page .stat-card:nth-child(3) .stat-icon { background: var(--iq-warning-soft) !important; color: #b87509 !important; }
.iq-plantafel-page .stat-card:nth-child(4) .stat-icon { background: var(--iq-violet-soft) !important; color: var(--iq-violet) !important; }

.iq-plantafel-page .statistics-planning-summary {
  display: grid;
  gap: 14px;
  padding: 18px !important;
}
.iq-plantafel-page .statistics-planning-summary > .section-title {
  display: grid !important;
  gap: 4px;
  align-items: start;
  justify-content: stretch;
  margin: 0 !important;
  padding: 0 0 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--iq-border-subtle) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.iq-plantafel-page .statistics-planning-summary > .section-title::before,
.iq-plantafel-page .statistics-planning-summary > .section-title::after { display: none !important; }
.iq-plantafel-page .statistics-planning-summary > .section-title h2 {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 650;
}
.iq-plantafel-page .statistics-planning-summary > .section-title p {
  max-width: none;
  margin: 2px 0 0;
  color: var(--iq-text-muted) !important;
  font-size: 10px;
  text-align: left;
}
.iq-plantafel-page .statistics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.iq-plantafel-page .statistics-kpi-grid .kpi-widget {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 112px;
  padding: 13px !important;
  border: 1px solid var(--iq-border-subtle) !important;
  border-radius: 10px !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.iq-plantafel-page .statistics-kpi-grid .kpi-widget:hover { transform: none !important; box-shadow: none !important; }
.iq-plantafel-page .statistics-kpi-grid .kpi-icon {
  width: 28px;
  height: 28px;
  border: 0 !important;
  background: var(--iq-accent-soft) !important;
}
.iq-plantafel-page .statistics-kpi-grid .kpi-widget p {
  margin: 0 0 6px;
  color: var(--iq-text-muted) !important;
  font-size: 9px;
}
.iq-plantafel-page .statistics-kpi-grid .kpi-widget strong { font-size: 20px; font-weight: 700; }
.iq-plantafel-page .statistics-kpi-grid .kpi-widget small { color: var(--iq-text-muted) !important; }
.iq-plantafel-page .statistics-kpi-grid .kpi-widget div > span { margin-top: 6px; color: var(--iq-accent) !important; font-size: 9px; }
.iq-plantafel-page .statistics-kpi-grid .kpi-widget > i {
  height: 4px;
  background: #e7ebf2 !important;
}

.iq-plantafel-page .statistics-live-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--iq-border-subtle) !important;
  border-radius: 9px;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
  box-shadow: none !important;
}
.iq-plantafel-page .statistics-live-status h3 { margin: 0 0 7px; font-size: 11px; }
.iq-plantafel-page .statistics-live-status p { color: var(--iq-success) !important; font-size: 10px; }
.iq-plantafel-page .statistics-live-status small { color: var(--iq-text-muted) !important; font-size: 9px; }

.iq-plantafel-page .statistics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  align-items: start;
  gap: 14px;
}
.iq-plantafel-page .statistics-layout > .management-card {
  display: grid;
  gap: 12px;
  padding: 17px !important;
}
.iq-plantafel-page .statistics-layout .section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--iq-text-primary) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.iq-plantafel-page .statistics-layout .section-title h2 { margin: 0; font-size: 13px; font-weight: 650; }
.iq-plantafel-page .statistics-layout .section-title p { max-width: 260px; text-align: right; }
.iq-plantafel-page .util-list,
.iq-plantafel-page .ranking-list,
.iq-plantafel-page .activity-list,
.iq-plantafel-page .warning-list,
.iq-plantafel-page .free-list { display: grid; gap: 8px; }

.iq-plantafel-page .util-row,
.iq-plantafel-page .ranking-row,
.iq-plantafel-page .activity-row,
.iq-plantafel-page .free-row,
.iq-plantafel-page .kw-card {
  border: 1px solid var(--iq-border-subtle) !important;
  border-radius: 9px !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
}
.iq-plantafel-page .util-row { padding: 11px; }
.iq-plantafel-page .ranking-row,
.iq-plantafel-page .activity-row,
.iq-plantafel-page .free-row { padding: 10px; }
.iq-plantafel-page .util-main span,
.iq-plantafel-page .ranking-main span,
.iq-plantafel-page .activity-row span,
.iq-plantafel-page .free-row span { color: var(--iq-text-muted) !important; font-size: 9px; }
.iq-plantafel-page .util-main strong,
.iq-plantafel-page .ranking-main strong,
.iq-plantafel-page .activity-row strong,
.iq-plantafel-page .free-row strong { font-size: 10px; font-weight: 600; }
.iq-plantafel-page .rank-number,
.iq-plantafel-page .free-row .initials {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--iq-accent-soft) !important;
  color: var(--iq-accent) !important;
  font-size: 9px;
  font-weight: 650;
}
.iq-plantafel-page .util-progress,
.iq-plantafel-page .mini-bar { background: #e7ebf2 !important; }
.iq-plantafel-page .util-progress span,
.iq-plantafel-page .mini-bar span { background: var(--iq-accent) !important; }
.iq-plantafel-page .status-pill { font-size: 9px; font-weight: 600; }
.iq-plantafel-page .kw-grid { gap: 8px; }
.iq-plantafel-page .kw-card { padding: 10px; border-top: 1px solid var(--iq-border-subtle) !important; }
.iq-plantafel-page .kw-card strong { font-size: 10px; }
.iq-plantafel-page .kw-card span { color: var(--iq-text-muted) !important; font-size: 9px; }
.iq-plantafel-page .kw-card small { font-size: 9px; font-weight: 600; }
.iq-plantafel-page .warning-row {
  padding: 10px;
  border-radius: 9px !important;
  box-shadow: none !important;
}
.iq-plantafel-page .warning-row.notice { border: 1px solid #f4dfb8 !important; background: var(--iq-warning-soft) !important; }
.iq-plantafel-page .warning-row.critical { border: 1px solid #f3d2d8 !important; background: var(--iq-danger-soft) !important; }
.iq-plantafel-page .warning-row strong { font-size: 10px; }
.iq-plantafel-page .warning-row span { color: var(--iq-text-secondary) !important; font-size: 9px; }
.iq-plantafel-page .stats-empty {
  padding: 14px;
  border: 1px dashed var(--iq-border) !important;
  border-radius: 9px;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-muted) !important;
  box-shadow: none !important;
  font-size: 10px;
}

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

@media (max-width: 1050px) {
  .iq-plantafel-page .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-plantafel-page .statistics-layout { grid-template-columns: 1fr; }
  .iq-plantafel-page .stats-section-wide { grid-row: auto; }
}

@media (max-width: 760px) {
  .iq-plantafel-page .management-panel:has(.statistics-page) { padding: 10px 0 26px; }
  .iq-plantafel-page .statistics-header,
  .iq-plantafel-page .statistics-actions { align-items: stretch; flex-direction: column; }
  .iq-plantafel-page .statistics-actions,
  .iq-plantafel-page .statistics-actions select,
  .iq-plantafel-page .statistics-actions input,
  .iq-plantafel-page .statistics-actions .secondary-button { width: 100%; }
  .iq-plantafel-page .statistics-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-plantafel-page .statistics-layout .section-title { display: block; }
  .iq-plantafel-page .statistics-layout .section-title p { text-align: left; }
}

@media (max-width: 520px) {
  .iq-plantafel-page .stat-grid,
  .iq-plantafel-page .statistics-kpi-grid { grid-template-columns: 1fr; }
}

/* Shared desktop shell: the sidebar never moves; only the app content scrolls. */
@media (min-width: 761px) {
  body.iq-reference-ui { height: 100vh; overflow: hidden; }
  .iq-app-shell,
  .iq-reference-ui .app-shell { display: block; min-height: 100vh; }
  .iq-sidebar,
  .iq-reference-ui .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: var(--iq-sidebar-width);
    height: 100vh;
  }
  .iq-main,
  .iq-reference-ui .main-area {
    width: calc(100% - var(--iq-sidebar-width));
    height: 100vh;
    margin-left: var(--iq-sidebar-width);
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .iq-plantafel-page .brand-logo { min-height: 46px !important; background: transparent !important; }
  .iq-plantafel-page .brand-logo img { width: 105px !important; height: 34px !important; max-width: 105px !important; max-height: 34px !important; object-fit: contain !important; filter: none !important; }
}

@media (max-width: 1320px) {
  :root { --iq-sidebar-width: 210px; }
  .plantafel-workspace { grid-template-columns: minmax(0, 1fr) 250px; }
  .kdl-analytics-grid { grid-template-columns: 1.35fr 1fr; }
  .kdl-analytics-card:last-child { grid-column: span 2; }
  .plantafel-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .iq-app-shell,
  .iq-reference-ui .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .iq-sidebar,
  .iq-reference-ui .sidebar { width: 78px; padding-inline: 9px; }
  .iq-main,
  .iq-reference-ui .main-area { width: calc(100% - 78px); margin-left: 78px; }
  .iq-brand,
  .iq-reference-ui .brand { justify-content: center; margin-inline: 0; }
  .iq-brand img,
  .iq-reference-ui .brand-logo img,
  .iq-kalkulation-page .brand img { width: 48px; object-position: left; object-fit: cover; }
  .iq-nav-item,
  .iq-reference-ui .nav-item,
  .iq-kalkulation-page .tabs button { justify-content: center; padding: 0; font-size: 0; }
  .iq-nav-icon,
  .iq-reference-ui .nav-icon { font-size: 15px; }
  .iq-user-card,
  .iq-reference-ui .user-card { grid-template-columns: 1fr; justify-items: center; }
  .iq-user-copy,
  .iq-reference-ui .user-info,
  .iq-user-card > a,
  .iq-reference-ui .hub-return { display: none; }
  .iq-main,
  .iq-reference-ui .main-area { padding: 20px; }
  .kdl-dashboard .iq-metric-grid,
  .plantafel-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kdl-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plantafel-workspace { grid-template-columns: minmax(0, 1fr); }
  .assignment-detail-panel { position: fixed; top: 0; right: 0; z-index: 130; width: min(360px, 92vw); height: 100vh; overflow: auto; transform: translateX(105%); transition: transform var(--iq-transition); border-radius: 0; }
  .assignment-detail-panel.has-selection { transform: none; }
  .assignment-detail-close { display: grid; place-items: center; }
  .plantafel-task-menu { display: none !important; }
}

@media (max-width: 760px) {
  body.iq-reference-ui { height: auto; overflow: auto; }
  .iq-app-shell,
  .iq-reference-ui .app-shell { display: block; }
  .iq-sidebar,
  .iq-reference-ui .sidebar { position: sticky !important; inset: auto; width: 100%; height: auto; padding: 8px 12px; flex-direction: row; align-items: center; overflow-x: auto; }
  .iq-brand,
  .iq-reference-ui .brand { flex: 0 0 70px; min-height: 40px; margin: 0 8px 0 0; }
  .iq-brand img,
  .iq-reference-ui .brand-logo img,
  .iq-kalkulation-page .brand img { width: 66px; object-fit: contain; }
  .iq-nav,
  .iq-reference-ui .side-nav,
  .iq-kalkulation-page .tabs { flex-direction: row; flex: none; overflow-x: auto; }
  .iq-nav-item,
  .iq-reference-ui .nav-item,
  .iq-kalkulation-page .tabs button { flex: 0 0 42px; }
  .iq-user-card,
  .iq-reference-ui .user-card,
  .iq-nav-spacer,
  .iq-nav-divider,
  .iq-module-label { display: none; }
  .iq-main,
  .iq-reference-ui .main-area { width: 100%; height: auto; margin-left: 0; padding: 16px 12px 24px; overflow: visible !important; }
  .iq-page-header,
  .iq-reference-ui .top-header,
  .kdl-reference-header { align-items: flex-start; flex-direction: column; }
  .iq-header-actions,
  .kdl-header-controls { width: 100%; justify-content: flex-start; }
  .kdl-header-controls select { min-width: 0; flex: 1; }
  .kdl-dashboard .iq-metric-grid,
  .plantafel-kpi-grid,
  .kdl-action-grid { grid-template-columns: 1fr; }
  .kdl-analytics-grid { grid-template-columns: 1fr; }
  .kdl-analytics-card:last-child { grid-column: auto; }
  .kdl-donut-layout { grid-template-columns: 1fr; }
  .iq-kalkulation-page .toolbar { grid-template-columns: 1fr; }
  .iq-kalkulation-page .toolbar .search { grid-column: auto; }
  .kdl-service-toolbar { flex-wrap: wrap; }
  .kdl-service-toolbar .iq-search { width: 100%; min-width: 0; }
  .iq-plantafel-page .header-controls { justify-content: flex-start; overflow-x: auto; }
  .plantafel-control-bar { justify-content: flex-start; width: 100%; }
  .planning-view-segments button[data-reference-view="month"] { display: none; }
  .iq-plantafel-page .planning-search { min-width: min(100%, 220px); }
  .iq-plantafel-page .board-toolbar { align-items: flex-start; }
  .planning-day-grid { grid-template-columns: repeat(6, 150px); }
}

/* Aufgabenverwaltung – reference implementation */
body.iq-dashboard-page .hub-task-center {
  position: relative;
  grid-column: 2;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 26px 24px 30px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: var(--iq-background);
  color: var(--iq-text-primary);
  box-shadow: none;
  backdrop-filter: none;
}

.task-reference-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 20px;
  align-items: start;
  min-height: 62px;
}

.task-reference-title > div { display: flex; align-items: center; gap: 8px; }
.task-reference-title h1 { margin: 0; color: var(--iq-text-primary); font-size: 25px; font-weight: 700; letter-spacing: -.03em; }
.task-reference-title p { margin: 7px 0 0; color: var(--iq-text-secondary); font-size: 11px; }
.task-info-button {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--iq-text-muted);
  border-radius: 50%;
  background: transparent;
  color: var(--iq-text-muted);
  font-size: 9px;
  font-weight: 700;
}

.task-reference-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.task-reference-actions button,
.task-reference-search {
  min-height: 36px;
  border: 1px solid var(--iq-border);
  border-radius: 7px;
  background: var(--iq-surface);
  color: var(--iq-text-secondary);
  box-shadow: none;
}
.task-reference-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; font-size: 10px; font-weight: 600; }
.task-reference-actions .task-icon-button { width: 34px; padding: 0; border-color: transparent; background: transparent; font-size: 13px; }
.task-reference-actions svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.task-reference-search { display: grid; grid-template-columns: 16px minmax(190px, 250px); align-items: center; gap: 6px; padding: 0 10px; }
body.iq-dashboard-page .hub-task-center .task-reference-search input {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--iq-text-primary);
  box-shadow: none;
  font-size: 10px;
}
body.iq-dashboard-page .hub-task-center .task-reference-search input::placeholder { color: var(--iq-text-muted); }
.task-reference-actions .task-create-button { min-width: 138px; border-color: #315ce8; background: #315ce8; color: #fff; }
.task-reference-actions .task-create-button:hover { background: #244fd8; }

.task-reference-popovers { position: relative; z-index: 15; }
.task-filter-panel,
.task-columns-panel {
  position: absolute;
  top: 4px;
  right: 150px;
  display: grid;
  width: min(690px, calc(100vw - 280px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--iq-border);
  border-radius: 10px;
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-floating);
}
.task-filter-panel[hidden], .task-columns-panel[hidden] { display: none !important; }
.task-filter-panel label { display: grid; gap: 5px; color: var(--iq-text-secondary); font-size: 9px; font-weight: 600; }
body.iq-dashboard-page .hub-task-center .task-filter-panel select,
body.iq-dashboard-page .hub-task-center .task-filter-panel input {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--iq-border);
  border-radius: 6px;
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  box-shadow: none;
  font-size: 10px;
}
.task-filter-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 3px; }
.task-reset-filter,
.task-apply-filter { min-height: 34px; padding: 0 13px; border: 1px solid var(--iq-border); border-radius: 6px; background: var(--iq-surface-secondary); color: var(--iq-accent); font-size: 10px; font-weight: 600; }
.task-apply-filter { border-color: var(--iq-accent); background: var(--iq-accent); color: #fff; }
.task-apply-filter:hover { border-color: var(--iq-accent-strong); background: var(--iq-accent-strong); }
.task-filter-panel.has-pending-filters .task-apply-filter { box-shadow: 0 0 0 3px rgba(63, 99, 245, .12); }
.task-columns-panel { right: 82px; width: 225px; max-height: min(560px, 70vh); grid-template-columns: 1fr; overflow: auto; }
.task-columns-panel strong { color: var(--iq-text-primary); font-size: 11px; }
.task-columns-panel label { display: flex; align-items: center; gap: 8px; color: var(--iq-text-secondary); font-size: 10px; }
.task-columns-panel input { width: 14px; min-height: 14px; accent-color: var(--iq-accent); }

.task-quick-filters { display: flex; gap: 7px; margin: 12px 0 18px; overflow-x: auto; }
.task-quick-filters button {
  display: inline-flex;
  min-height: 29px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--iq-border);
  border-radius: 7px;
  background: var(--iq-surface);
  color: var(--iq-text-secondary);
  font-size: 9px;
  font-weight: 600;
}
.task-quick-filters button b { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 6px; background: var(--iq-surface-secondary); color: var(--iq-text-muted); font-size: 8px; }
.task-quick-filters button.is-active { border-color: #d7e0ff; background: #f2f5ff; color: var(--iq-accent); }
.task-quick-filters button.is-active b { background: #e4eaff; color: var(--iq-accent); }
.task-quick-filters button.overdue b { background: var(--iq-danger-soft); color: var(--iq-danger); }
.task-quick-filters button.done b { background: var(--iq-success-soft); color: var(--iq-success); }

.task-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.task-kpi-card {
  position: relative;
  display: grid;
  min-height: 128px;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: start;
  padding: 17px;
  border: 1px solid var(--iq-border);
  border-radius: 10px;
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
}
.task-kpi-card small,
.task-kpi-card strong,
.task-kpi-card span { display: block; }
.task-kpi-card small { min-height: 28px; color: var(--iq-text-secondary); font-size: 10px; font-weight: 500; }
.task-kpi-card strong { margin-top: 3px; color: var(--iq-text-primary); font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.task-kpi-card span { margin-top: 16px; color: var(--iq-text-muted); font-size: 8px; line-height: 1.25; }
.task-kpi-card i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #edf2ff; color: var(--iq-accent); }
.task-kpi-card i svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.task-kpi-card.orange i { background: var(--iq-warning-soft); color: var(--iq-warning); }
.task-kpi-card.red i { background: var(--iq-danger-soft); color: var(--iq-danger); }
.task-kpi-card.green i { background: var(--iq-success-soft); color: var(--iq-success); }
.task-kpi-card.purple i { background: #f1eaff; color: #8952e8; }
.task-kpi-visual { display: grid; justify-items: end; gap: 22px; color: var(--iq-accent); }
.task-kpi-sparkline { position: absolute; right: 12px; bottom: 12px; width: 70px; height: 28px; overflow: visible; }
.task-kpi-sparkline polyline { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-kpi-card.orange .task-kpi-visual { color: var(--iq-warning); }
.task-kpi-card.red .task-kpi-visual { color: var(--iq-danger); }
.task-kpi-card.green .task-kpi-visual { color: var(--iq-success); }
.task-kpi-card.purple .task-kpi-visual { color: #8952e8; }

.task-reference-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; align-items: start; }
.task-table-card,
.task-detail-panel { min-width: 0; overflow: hidden; border: 1px solid var(--iq-border); border-radius: 10px; background: var(--iq-surface); box-shadow: var(--iq-shadow-card); }
.task-reference-workspace:has(> .task-detail-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.task-list-heading { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--iq-border); background: var(--iq-surface); }
.task-list-heading strong,
.task-list-heading span { display: block; }
.task-list-heading strong { color: var(--iq-text-primary); font-size: 11px; font-weight: 650; }
.task-list-heading span { margin-top: 3px; color: var(--iq-text-muted); font-size: 8px; }
.task-list-heading button { min-height: 29px; padding: 0 10px; border: 1px solid var(--iq-border); border-radius: 6px; background: var(--iq-surface-secondary); color: var(--iq-accent); font-size: 8px; font-weight: 600; }
.task-table-scroll { min-height: 180px; overflow: auto; }
.task-reference-table { width: 100%; min-width: 820px; border-collapse: collapse; color: var(--iq-text-secondary); font-size: 9px; }
.task-reference-table th,
.task-reference-table td { padding: 12px 10px; border: 0; border-bottom: 1px solid var(--iq-border-subtle); text-align: left; vertical-align: middle; }
.task-reference-table th { position: sticky; top: 0; z-index: 2; height: 42px; background: #fbfcff; color: var(--iq-text-muted); font-size: 8px; font-weight: 600; white-space: nowrap; }
.task-reference-table tbody tr { cursor: pointer; transition: background var(--iq-transition), box-shadow var(--iq-transition); }
.task-reference-table tbody tr:hover { background: #fafbff; }
.task-reference-table tbody tr.is-active { background: #f4f7ff; box-shadow: inset 3px 0 0 var(--iq-accent); }
.task-reference-table strong { color: var(--iq-text-primary); font-size: 9px; font-weight: 600; }
.task-reference-table .task-primary-text { font-size: 10px; }
.task-reference-table .task-secondary-text { display: block; margin-top: 5px; color: var(--iq-accent); font-size: 8px; white-space: nowrap; }
.task-reference-table td:nth-child(n+3) .task-secondary-text { color: var(--iq-text-muted); }
.task-check-cell { width: 34px; text-align: center !important; }
.task-check-cell input { width: 14px !important; min-height: 14px !important; accent-color: var(--iq-accent); }
.task-sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; }
.task-sort-button span { color: #b6bfd1; font-size: 8px; }
.task-sort-button.is-active { color: var(--iq-accent); }
.task-actions-cell { width: 62px; text-align: center !important; }
.task-row-menu { position: relative; display: inline-block; }
.task-row-menu summary { width: 30px; list-style: none; cursor: pointer; color: var(--iq-text-secondary); font-weight: 700; }
.task-row-menu summary::-webkit-details-marker { display: none; }
.task-row-menu > div { position: absolute; right: 0; z-index: 20; display: grid; width: 155px; padding: 5px; border: 1px solid var(--iq-border); border-radius: 8px; background: var(--iq-surface); box-shadow: var(--iq-shadow-floating); }
.task-row-menu button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--iq-text-secondary); font-size: 9px; text-align: left; }
.task-row-menu button:hover { background: var(--iq-surface-hover); color: var(--iq-text-primary); }
.task-row-menu button.is-danger { color: var(--iq-danger); }
.task-status-badge,
.task-calibration-missing { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; border-radius: 5px; background: var(--iq-info-soft); color: var(--iq-info); font-size: 8px; font-weight: 600; white-space: nowrap; }
.task-status-badge.status-erledigt,
.task-status-badge.status-faellig,
.task-status-badge.status-fallig,
.task-status-badge.status-fällig { background: var(--iq-success-soft); color: var(--iq-success); }
.task-status-badge.status-geplant,
.task-status-badge.status-offen { background: var(--iq-warning-soft); color: #c17600; }
.task-status-badge.status-ueberfaellig,
.task-status-badge.status-uberfallig,
.task-status-badge.status-überfällig { background: var(--iq-danger-soft); color: var(--iq-danger); }
.task-status-badge.status-entwurf,
.task-status-badge.status-archiviert,
.task-status-badge.status-nicht-erforderlich { background: #f1f3f7; color: #697389; }
.task-status-badge.status-in-bearbeitung { background: var(--iq-info-soft); color: var(--iq-info); }
.task-calibration-missing { background: var(--iq-warning-soft); color: #a56800; }
.task-selection-bar { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 7px 12px; border-bottom: 1px solid var(--iq-border); background: #f7f9ff; font-size: 9px; }
.task-selection-bar button { min-height: 27px; padding: 0 9px; border: 1px solid var(--iq-border); border-radius: 5px; background: var(--iq-surface); color: var(--iq-text-secondary); font-size: 8px; }
.task-selection-bar button.is-danger { color: var(--iq-danger); }
.task-reference-empty { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 8px; color: var(--iq-text-muted); text-align: center; }
.task-reference-empty svg { width: 24px; height: 24px; fill: none; stroke: currentColor; }
.task-reference-empty strong { font-size: 12px; }
.task-reference-empty p { margin: 0; font-size: 9px; }
.task-reference-empty button { min-height: 32px; padding: 0 12px; border: 1px solid var(--iq-border); border-radius: 6px; background: var(--iq-accent); color: #fff; font-size: 9px; font-weight: 600; }
.task-reference-loading { display: grid; gap: 10px; padding: 18px; }
.task-reference-loading i { display: block; height: 48px; border-radius: 7px; background: linear-gradient(90deg, #f4f6fa 25%, #fbfcfe 45%, #f4f6fa 65%); background-size: 220% 100%; animation: task-loading 1.2s linear infinite; }
@keyframes task-loading { to { background-position: -220% 0; } }
.task-pagination { display: grid; min-height: 51px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 8px 12px; color: var(--iq-text-muted); font-size: 8px; }
.task-page-buttons { display: flex; align-items: center; gap: 5px; }
.task-page-buttons button { min-width: 29px; height: 29px; padding: 0 7px; border: 1px solid var(--iq-border); border-radius: 6px; background: var(--iq-surface); color: var(--iq-text-secondary); font-size: 9px; }
.task-page-buttons button.is-active { border-color: #cbd7ff; background: #f1f4ff; color: var(--iq-accent); }
.task-page-buttons button:disabled { opacity: .4; }
.task-pagination label { justify-self: end; }
body.iq-dashboard-page .hub-task-center .task-pagination select { min-height: 31px; padding: 0 9px; border: 1px solid var(--iq-border); border-radius: 6px; background: var(--iq-surface); color: var(--iq-text-secondary); font-size: 8px; }

.task-detail-panel { position: sticky; top: 18px; min-height: 610px; animation: task-panel-in .2s ease-out; }
@keyframes task-panel-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.task-detail-head { display: grid; min-height: 58px; grid-template-columns: 24px minmax(0, 1fr) auto 24px; gap: 7px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--iq-border); }
.task-detail-head > button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--iq-text-muted); font-size: 16px; }
.task-detail-head strong { overflow: hidden; color: var(--iq-text-primary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.task-detail-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--iq-border); }
.task-detail-tabs button { min-width: 0; min-height: 38px; padding: 0 3px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--iq-text-muted); font-size: 7px; }
.task-detail-tabs button.is-active { border-bottom-color: var(--iq-accent); color: var(--iq-accent); }
.task-detail-content { max-height: 520px; overflow: auto; }
.task-detail-section { padding: 15px 13px; border-bottom: 1px solid var(--iq-border-subtle); }
.task-detail-section h3 { margin: 0 0 12px; color: var(--iq-text-primary); font-size: 10px; }
.task-info-row { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 8px; padding: 6px 0; font-size: 8px; }
.task-info-row span,
.task-info-block > span { color: var(--iq-text-muted); }
.task-info-row strong { color: var(--iq-text-secondary); font-weight: 500; text-align: left; }
.task-info-block { padding: 6px 0; font-size: 8px; }
.task-info-block p { margin: 7px 0 0; color: var(--iq-text-secondary); line-height: 1.55; }
.task-detail-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.task-detail-list span { padding: 5px 7px; border-radius: 5px; background: var(--iq-surface-secondary); color: var(--iq-text-secondary); font-size: 8px; }
.task-detail-list p,
.task-product-list > p,
.task-history-list > p { color: var(--iq-text-muted); font-size: 8px; line-height: 1.5; }
.task-product-list { display: grid; gap: 8px; }
.task-product-list article { display: grid; gap: 3px; padding: 9px; border: 1px solid var(--iq-border-subtle); border-radius: 7px; background: var(--iq-surface-secondary); }
.task-product-list strong { color: var(--iq-text-primary); font-size: 9px; }
.task-product-list span,
.task-product-list small { color: var(--iq-text-muted); font-size: 7px; }
.task-history-list { display: grid; }
.task-history-list article { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 7px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--iq-border-subtle); }
.task-history-list i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--iq-accent); }
.task-history-list strong,
.task-history-list span { display: block; font-size: 8px; }
.task-history-list strong { color: var(--iq-text-secondary); }
.task-history-list span,
.task-history-list time { margin-top: 3px; color: var(--iq-text-muted); font-size: 7px; }
.task-current-note { padding: 10px; border-radius: 7px; background: var(--iq-surface-secondary); color: var(--iq-text-secondary); font-size: 8px; line-height: 1.55; }
.task-note-editor { display: grid; gap: 5px; margin-top: 12px; color: var(--iq-text-muted); font-size: 8px; }
body.iq-dashboard-page .hub-task-center .task-note-editor textarea { min-height: 84px; padding: 9px; border: 1px solid var(--iq-border); border-radius: 7px; background: var(--iq-surface); color: var(--iq-text-primary); font-size: 9px; resize: vertical; }
.task-note-save { min-height: 32px; margin-top: 8px; padding: 0 11px; border: 0; border-radius: 6px; background: var(--iq-accent); color: #fff; font-size: 8px; font-weight: 600; }
.task-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-top: 1px solid var(--iq-border); }
.task-detail-actions button { min-height: 36px; border: 1px solid var(--iq-border); border-radius: 7px; background: var(--iq-surface); color: var(--iq-text-secondary); font-size: 8px; font-weight: 600; }
.task-detail-actions .task-detail-primary { border-color: var(--iq-accent); background: var(--iq-accent); color: #fff; }
.task-detail-actions .task-detail-primary:disabled { border-color: var(--iq-border); background: var(--iq-surface-secondary); color: var(--iq-text-muted); cursor: not-allowed; }
.task-detail-actions .task-detail-complete { grid-column: 1 / -1; border-color: #ffd7db; color: var(--iq-danger); }

.task-editor-dialog { width: min(760px, calc(100vw - 28px)); max-height: 92vh; padding: 0; overflow: auto; border: 1px solid var(--iq-border); border-radius: 12px; background: var(--iq-surface); color: var(--iq-text-primary); box-shadow: var(--iq-shadow-floating); }
.task-editor-dialog::backdrop { background: rgba(22, 31, 52, .28); backdrop-filter: blur(3px); }
body.iq-dashboard-page .task-editor-dialog .hub-task-form { display: block; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.task-editor-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--iq-border); }
.task-editor-head small { color: var(--iq-accent); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.task-editor-head h2 { margin: 3px 0 0; font-size: 18px; }
.task-editor-head button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--iq-border); border-radius: 7px; background: var(--iq-surface); color: var(--iq-text-secondary); }
.task-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.task-form-grid label { display: grid; gap: 6px; color: var(--iq-text-secondary); font-size: 9px; font-weight: 600; }
.task-form-grid .task-form-wide { grid-column: 1 / -1; }
body.iq-dashboard-page .task-editor-dialog input,
body.iq-dashboard-page .task-editor-dialog select,
body.iq-dashboard-page .task-editor-dialog textarea { min-height: 38px; padding: 8px 10px; border: 1px solid var(--iq-border); border-radius: 7px; background: var(--iq-surface); color: var(--iq-text-primary); font-size: 10px; box-shadow: none; }
body.iq-dashboard-page .task-editor-dialog textarea { min-height: 70px; resize: vertical; }
body.iq-dashboard-page .task-editor-dialog .hub-task-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--iq-border); }
body.iq-dashboard-page .task-editor-dialog .hub-task-form-message { flex: 1 1 100%; align-self: center; margin: 0 auto 0 0; color: var(--iq-danger); font-size: 9px; font-weight: 600; line-height: 1.4; }
body.iq-dashboard-page .task-editor-dialog .hub-task-form-actions button { min-height: 36px; padding: 0 15px; border: 1px solid var(--iq-border); border-radius: 7px; background: var(--iq-surface); color: var(--iq-text-secondary); font-size: 9px; box-shadow: none; }
body.iq-dashboard-page .task-editor-dialog .hub-task-form-actions button[type="submit"] { border-color: var(--iq-accent); background: var(--iq-accent); color: #fff; }

@media (max-width: 1320px) {
  .task-reference-header { grid-template-columns: 1fr; }
  .task-reference-actions { justify-content: flex-start; flex-wrap: wrap; }
  .task-reference-search { flex: 1 1 260px; }
  .task-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-reference-workspace { grid-template-columns: minmax(0, 1fr); }
  .task-detail-panel { position: fixed; top: 0; right: 0; z-index: 1200; width: min(380px, 100vw); height: 100vh; min-height: 0; border-radius: 0; box-shadow: var(--iq-shadow-floating); }
  .task-detail-content { max-height: calc(100vh - 180px); }
}

/* A normal desktop keeps the table and its detail panel in one stable workspace. */
@media (min-width: 1051px) and (max-width: 1320px) {
  .task-reference-workspace { grid-template-columns: minmax(0, 1fr) 265px; }
  .task-detail-panel { position: sticky; top: 18px; width: auto; height: auto; min-height: 610px; border-radius: 10px; box-shadow: var(--iq-shadow-card); }
  .task-detail-content { max-height: 520px; }
}

@media (max-width: 760px) {
  body.iq-dashboard-page .hub-task-center { grid-column: 1; padding: 18px 12px 26px; }
  .task-reference-actions .task-icon-button { display: none; }
  .task-reference-search { order: 4; flex-basis: 100%; grid-template-columns: 16px 1fr; }
  .task-reference-actions .task-toolbar-button { flex: 1; }
  .task-reference-actions .task-create-button { flex: 1 1 150px; }
  .task-filter-panel { position: fixed; inset: auto 10px 10px; z-index: 1300; width: auto; max-height: 75vh; grid-template-columns: 1fr; overflow: auto; }
  .task-columns-panel { position: fixed; inset: auto 10px 10px auto; z-index: 1300; width: min(260px, calc(100vw - 20px)); }
  .task-kpi-grid { display: flex; margin-inline: -12px; padding: 0 12px 5px; overflow-x: auto; }
  .task-kpi-card { min-width: 185px; min-height: 112px; }
  .task-reference-table { display: block; min-width: 0; }
  .task-reference-table thead { display: none; }
  .task-reference-table tbody,
  .task-reference-table tr,
  .task-reference-table td { display: block; }
  .task-reference-table tr { position: relative; margin: 10px; padding: 12px; border: 1px solid var(--iq-border); border-radius: 9px; }
  .task-reference-table td { padding: 5px 0; border: 0; }
  .task-reference-table .task-check-cell { position: absolute; top: 12px; right: 42px; width: auto; }
  .task-reference-table .task-actions-cell { position: absolute; top: 10px; right: 8px; width: auto; }
  .task-pagination { grid-template-columns: 1fr; justify-items: center; }
  .task-pagination label { justify-self: center; }
  .task-detail-panel { width: 100vw; }
  .task-form-grid { grid-template-columns: 1fr; }
  .task-form-grid .task-form-wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Shared analytics components and IQ Hub reference dashboard */
body.iq-dashboard-page {
  --iq-sidebar-width: 218px;
  background: var(--iq-background);
  color: var(--iq-text-primary);
}

body.iq-dashboard-page .shell,
body.iq-dashboard-page .hub-view {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: visible;
  background: var(--iq-background);
  color: var(--iq-text-primary);
}

body.iq-dashboard-page .hub-view::before,
body.iq-dashboard-page .hub-view::after { display: none; }

body.iq-dashboard-page .hub-sidebar {
  top: 0;
  box-sizing: border-box;
  width: var(--iq-sidebar-width);
  min-height: 100vh;
  padding: 22px 10px 14px;
  border: 0;
  border-right: 1px solid var(--iq-border);
  border-radius: 0;
  background: var(--iq-sidebar);
  color: var(--iq-text-primary);
  box-shadow: none;
  backdrop-filter: none;
}

body.iq-dashboard-page .sidebar-logo {
  min-height: 42px;
  margin: 0 10px 20px;
  padding: 0;
}

body.iq-dashboard-page .sidebar-logo-image {
  width: 105px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

body.iq-dashboard-page .sidebar-top-logout { display: none; }

body.iq-dashboard-page .sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

body.iq-dashboard-page .sidebar-link {
  display: flex;
  flex: 0 0 42px;
  grid-template-columns: none;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--iq-radius-control);
  background: transparent;
  color: #24324a;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background var(--iq-transition), color var(--iq-transition);
}

body.iq-dashboard-page .sidebar-link svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

body.iq-dashboard-page .sidebar-link:hover {
  transform: none;
  border: 0;
  background: var(--iq-surface-hover);
  color: var(--iq-accent);
  box-shadow: none;
}

body.iq-dashboard-page .sidebar-link.is-active {
  border: 0;
  background: var(--iq-accent-soft);
  color: var(--iq-accent);
  box-shadow: none;
  font-weight: 600;
}

body.iq-dashboard-page .sidebar-profile {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 8px;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px 10px 5px;
  border-top: 1px solid var(--iq-border-subtle);
  color: var(--iq-text-primary);
}

body.iq-dashboard-page .profile-photo {
  width: 38px;
  height: 38px;
  border: 1px solid #d8dde8;
  box-shadow: none;
}

body.iq-dashboard-page .sidebar-profile strong {
  overflow: hidden;
  color: var(--iq-text-primary);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.iq-dashboard-page .sidebar-profile span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--iq-text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.iq-dashboard-page .online-dot {
  width: 7px;
  height: 7px;
  border: 0;
  background: var(--iq-success);
  box-shadow: none;
}

body.iq-dashboard-page .hub-sidebar .hub-logout-btn {
  width: calc(100% - 20px);
  min-height: 34px;
  margin: 7px 10px 0;
  border: 1px solid var(--iq-border);
  border-radius: 9px;
  background: var(--iq-surface-secondary);
  color: var(--iq-text-secondary);
  box-shadow: none;
  font-size: 11px;
  backdrop-filter: none;
}

body.iq-dashboard-page .hub-dashboard {
  display: block;
  min-width: 0;
  padding: 27px 32px 34px;
  background: var(--iq-background);
  color: var(--iq-text-primary);
}

body.iq-dashboard-page .dashboard-header {
  display: flex;
  min-height: 47px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.dashboard-title-line { display: flex; align-items: center; gap: 9px; }
.dashboard-title h1 {
  margin: 0;
  color: var(--iq-text-primary);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.dashboard-title > p { margin: 7px 0 0; color: var(--iq-text-secondary); font-size: 12px; }
.dashboard-info-btn,
.dashboard-help-btn {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid #9eabc1;
  border-radius: 50%;
  background: transparent;
  color: #63718a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.dashboard-info-btn { width: 14px; height: 14px; font-size: 8px; }

body.iq-dashboard-page .dashboard-tools {
  position: relative;
  display: flex;
  width: auto;
  max-width: none;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0;
}

body.iq-dashboard-page .dashboard-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 30px;
  width: 285px;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 18px;
  background: #f2f5fa;
  box-shadow: none;
  backdrop-filter: none;
}

body.iq-dashboard-page .dashboard-search svg,
body.iq-dashboard-page .notification-btn svg {
  width: 15px;
  height: 15px;
  stroke: #61718c;
  stroke-width: 1.8;
}

body.iq-dashboard-page .dashboard-search input {
  min-height: 34px;
  padding: 0 7px;
  color: var(--iq-text-primary);
  font-size: 11px;
}
body.iq-dashboard-page .dashboard-search input::placeholder { color: var(--iq-text-muted); }
.dashboard-search kbd {
  display: grid;
  min-width: 26px;
  height: 20px;
  place-items: center;
  border: 1px solid #dfe4ed;
  border-radius: 6px;
  background: #fff;
  color: var(--iq-text-muted);
  font-family: inherit;
  font-size: 9px;
}

body.iq-dashboard-page .notification-btn,
body.iq-dashboard-page .dashboard-help-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.iq-dashboard-page .notification-btn:hover,
body.iq-dashboard-page .notification-btn[aria-expanded="true"],
body.iq-dashboard-page .dashboard-help-btn:hover { transform: none; background: var(--iq-surface-hover); }
body.iq-dashboard-page .notification-btn i { top: 0; right: 0; width: 14px; height: 14px; font-size: 8px; }

body.iq-dashboard-page .notification-panel {
  top: 44px;
  right: 28px;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-card);
  background: rgba(255,255,255,.98);
  color: var(--iq-text-primary);
  box-shadow: var(--iq-shadow-floating);
  backdrop-filter: blur(18px);
}
body.iq-dashboard-page .notification-panel strong { color: var(--iq-text-primary); }
body.iq-dashboard-page .notification-item,
body.iq-dashboard-page .notification-empty { border-color: var(--iq-border-subtle); background: var(--iq-surface-secondary); color: var(--iq-text-secondary); }
body.iq-dashboard-page .notification-item strong { color: var(--iq-text-primary); }
body.iq-dashboard-page .notification-item time { color: var(--iq-text-muted); }

.dashboard-filterbar {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  margin: -1px 0 12px;
}
.dashboard-filter-control {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  min-width: 148px;
  height: 38px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--iq-border);
  border-radius: 9px;
  background: var(--iq-surface);
  color: var(--iq-text-secondary);
  box-shadow: 0 1px 2px rgba(31,52,94,.02);
}
.dashboard-week-control { min-width: 226px; }
.dashboard-filter-control svg,
.dashboard-filter-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-filter-control select {
  width: 100%;
  height: 36px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--iq-text-primary);
  font-size: 11px;
}
.dashboard-filter-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--iq-border);
  border-radius: 9px;
  background: var(--iq-surface);
  color: var(--iq-accent);
  font-size: 11px;
  font-weight: 500;
}
.dashboard-filter-button:hover,
.dashboard-filter-button[aria-expanded="true"] { background: var(--iq-accent-soft); border-color: #d7defe; }

.dashboard-advanced-filters {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 13px;
  padding: 12px;
  border: 1px solid var(--iq-border);
  border-radius: 12px;
  background: var(--iq-surface);
  box-shadow: var(--iq-shadow-card);
}
.dashboard-advanced-filters label { display: grid; gap: 5px; color: var(--iq-text-muted); font-size: 9px; }
.dashboard-advanced-filters select,
.dashboard-advanced-filters button {
  min-width: 150px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--iq-border);
  border-radius: 8px;
  background: var(--iq-surface-secondary);
  color: var(--iq-text-primary);
  font-size: 10px;
}
.dashboard-advanced-filters button { min-width: auto; color: var(--iq-accent); }

.dashboard-content { display: block; min-width: 0; }
.dashboard-skeleton-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.dashboard-skeleton-grid i {
  display: block;
  min-height: 146px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-card);
  background: linear-gradient(90deg, #f5f7fb 20%, #edf1f7 45%, #f5f7fb 70%);
  background-size: 240% 100%;
  animation: iq-dashboard-skeleton 1.25s linear infinite;
}
@keyframes iq-dashboard-skeleton { to { background-position: -240% 0; } }

.iq-metric-card,
.iq-analytics-card,
.dashboard-metric-card,
.dashboard-analytics-card,
.dashboard-action-section,
.dashboard-table-card,
.dashboard-location-card,
.dashboard-overview-card,
.dashboard-rail-card {
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-card);
  background: var(--iq-surface);
  color: var(--iq-text-primary);
  box-shadow: var(--iq-shadow-card);
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.dashboard-metric-card {
  position: relative;
  display: grid;
  min-height: 146px;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: start;
  padding: 18px 17px;
  overflow: hidden;
  transition: transform var(--iq-transition), box-shadow var(--iq-transition), border-color var(--iq-transition);
}
.dashboard-metric-card:hover { transform: translateY(-2px); border-color: #dbe1ed; box-shadow: 0 12px 30px rgba(31,52,94,.09); }
.dashboard-metric-card span { display: block; color: var(--iq-text-primary); font-size: 11px; font-weight: 500; }
.dashboard-metric-card strong { display: block; margin-top: 10px; color: var(--iq-text-primary); font-size: 24px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.dashboard-metric-card small { display: block; margin-top: 9px; color: var(--iq-text-secondary); font-size: 9px; }
.dashboard-metric-card em { display: block; margin-top: 10px; color: var(--metric-color, var(--iq-text-muted)); font-size: 9px; font-style: normal; font-weight: 500; }
.dashboard-metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--metric-soft, var(--iq-accent-soft));
  color: var(--metric-color, var(--iq-accent));
}
.dashboard-metric-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.metric-blue { --metric-color: var(--iq-accent); --metric-soft: var(--iq-accent-soft); }
.metric-green { --metric-color: var(--iq-success); --metric-soft: var(--iq-success-soft); }
.metric-orange { --metric-color: #f08924; --metric-soft: #fff2e8; }
.metric-red { --metric-color: var(--iq-danger); --metric-soft: var(--iq-danger-soft); }
.metric-violet { --metric-color: var(--iq-violet); --metric-soft: var(--iq-violet-soft); }

.dashboard-reference-layout { display: grid; grid-template-columns: minmax(0, 1fr) 255px; gap: 16px; align-items: start; }
.dashboard-reference-main { display: grid; gap: 16px; min-width: 0; }
.dashboard-analytics-grid { display: grid; grid-template-columns: 1fr 1.02fr 1.08fr; gap: 16px; }
.dashboard-analytics-card { min-height: 282px; padding: 18px 16px 14px; }
.dashboard-analytics-card > header,
.dashboard-action-section > header,
.dashboard-table-card > header,
.dashboard-location-card > header,
.dashboard-overview-card > header,
.dashboard-rail-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-analytics-card h2,
.dashboard-action-section h2,
.dashboard-table-card h2,
.dashboard-location-card h2,
.dashboard-overview-card h2,
.dashboard-rail-card h2 {
  margin: 0;
  color: var(--iq-text-primary);
  font-size: 11px;
  font-weight: 600;
}
.dashboard-analytics-card header > span,
.dashboard-location-card header > span,
.dashboard-overview-card header > span { color: var(--iq-text-muted); font-size: 9px; }

.dashboard-donut-layout { display: grid; grid-template-columns: 126px minmax(0, 1fr); align-items: center; gap: 13px; min-height: 206px; }
.dashboard-donut {
  position: relative;
  display: grid;
  width: 122px;
  height: 122px;
  place-items: center;
  border-radius: 50%;
  background: var(--dashboard-donut);
  transform: rotate(-90deg);
}
.dashboard-donut::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--iq-surface); }
.dashboard-donut > div { position: relative; z-index: 1; display: grid; place-items: center; transform: rotate(90deg); }
.dashboard-donut strong { color: var(--iq-text-primary); font-size: 19px; font-weight: 600; line-height: 1; }
.dashboard-donut span { margin-top: 5px; color: var(--iq-text-muted); font-size: 8px; }
.dashboard-chart-legend { display: grid; gap: 10px; min-width: 0; }
.dashboard-chart-legend > span { display: grid; grid-template-columns: 8px minmax(0,1fr); column-gap: 7px; align-items: center; min-width: 0; }
.dashboard-chart-legend i { grid-row: span 2; width: 7px; height: 7px; border-radius: 50%; background: var(--legend-color); }
.dashboard-chart-legend b { overflow: hidden; color: var(--iq-text-secondary); font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-chart-legend em { color: var(--iq-text-muted); font-size: 8px; font-style: normal; }

.dashboard-card-link {
  display: flex;
  width: 100%;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  border: 1px solid var(--iq-border);
  border-radius: 8px;
  background: transparent;
  color: var(--iq-text-secondary);
  font-size: 9px;
  transition: background var(--iq-transition), color var(--iq-transition);
}
.dashboard-card-link:hover { background: var(--iq-surface-hover); color: var(--iq-accent); }
.dashboard-card-link span { color: var(--iq-accent); }

.dashboard-line-card { position: relative; }
.dashboard-line-chart-wrap { position: relative; min-height: 215px; padding-top: 4px; }
.dashboard-line-chart { display: block; width: 100%; height: 207px; overflow: visible; }
.dashboard-chart-gridline { fill: none; stroke: var(--iq-border-subtle); stroke-width: 1; }
.dashboard-chart-line { fill: none; stroke: var(--iq-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-line-chart circle { fill: #fff; stroke: var(--iq-accent); stroke-width: 2; }
.dashboard-line-chart text { fill: var(--iq-text-muted); font-family: inherit; font-size: 8px; }
.dashboard-line-current { position: absolute; top: 8px; right: 5px; padding: 3px 6px; border-radius: 5px; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 9px; font-weight: 500; }

.dashboard-action-section { min-height: 116px; padding: 15px 14px 14px; }
.dashboard-action-section > header { margin-bottom: 11px; }
.dashboard-action-section > header button { border: 0; background: transparent; color: var(--iq-accent); font-size: 8px; }
.dashboard-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.dashboard-action-card {
  display: grid;
  grid-template-columns: 27px auto minmax(0,1fr);
  grid-template-rows: 18px 14px;
  align-items: center;
  gap: 0 7px;
  min-height: 57px;
  padding: 8px 10px;
  border: 1px solid var(--action-border, var(--iq-border));
  border-radius: 8px;
  background: var(--action-bg, var(--iq-surface-secondary));
  color: var(--iq-text-primary);
  text-align: left;
}
.dashboard-action-card > i { grid-row: 1 / 3; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--action-color, var(--iq-accent)); }
.dashboard-action-card svg { width: 13px; height: 13px; fill: none; stroke: currentColor; }
.dashboard-action-card strong { font-size: 13px; font-weight: 600; }
.dashboard-action-card span { overflow: hidden; color: var(--iq-text-primary); font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-action-card small { grid-column: 2 / 4; color: var(--iq-text-muted); font-size: 8px; }
.action-red { --action-color: var(--iq-danger); --action-bg: #fff7f8; --action-border: #f9dfe3; }
.action-orange { --action-color: #f08924; --action-bg: #fff8f2; --action-border: #f7e5d4; }
.action-yellow { --action-color: #e7a52c; --action-bg: #fffaf0; --action-border: #f4e8c9; }
.action-blue { --action-color: var(--iq-info); --action-bg: #f5f9ff; --action-border: #dfeafb; }

.dashboard-bottom-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 16px; }
.dashboard-table-card,
.dashboard-location-card { min-height: 260px; padding: 16px 14px 13px; }
.dashboard-table-wrap { width: 100%; min-height: 188px; margin-top: 9px; overflow-x: auto; }
.dashboard-data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dashboard-data-table th { height: 28px; padding: 0 8px; border-bottom: 1px solid var(--iq-border); color: var(--iq-text-muted); font-size: 8px; font-weight: 500; text-align: left; }
.dashboard-data-table td { height: 34px; padding: 0 8px; border-bottom: 1px solid var(--iq-border-subtle); overflow: hidden; color: var(--iq-text-secondary); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-data-table td strong { color: var(--iq-text-primary); font-size: 8px; font-weight: 500; }
.dashboard-data-table tbody tr { cursor: pointer; transition: background var(--iq-transition); }
.dashboard-data-table tbody tr:hover { background: var(--iq-surface-hover); }
.dashboard-data-table th:nth-child(1) { width: 27%; }
.dashboard-data-table th:nth-child(2) { width: 20%; }
.dashboard-data-table th:nth-child(3) { width: 21%; }
.dashboard-data-table th:nth-child(4) { width: 16%; }
.dashboard-data-table th:nth-child(5) { width: 16%; }
.dashboard-status-badge { display: inline-flex; min-height: 19px; align-items: center; padding: 0 7px; border-radius: 5px; background: var(--iq-warning-soft); color: #b87814; font-size: 7px; font-weight: 500; }
.dashboard-status-badge.status-erledigt,
.dashboard-status-badge.status-abgeschlossen { background: var(--iq-success-soft); color: var(--iq-success); }
.dashboard-status-badge.status-inarbeit { background: var(--iq-accent-soft); color: var(--iq-accent); }
.dashboard-progress { display: inline-block; width: 45px; height: 3px; margin-right: 4px; overflow: hidden; border-radius: 4px; background: #edf0f5; vertical-align: middle; }
.dashboard-progress i { display: block; height: 100%; border-radius: inherit; background: var(--iq-accent); }
.dashboard-data-table td:last-child b { color: var(--iq-text-muted); font-size: 7px; font-weight: 500; }

.dashboard-location-list { display: grid; gap: 15px; min-height: 188px; align-content: center; margin-top: 8px; }
.dashboard-location-list > div { display: grid; grid-template-columns: 82px minmax(0,1fr) 42px; align-items: center; gap: 9px; }
.dashboard-location-list span { overflow: hidden; color: var(--iq-text-secondary); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-location-list > div > i { height: 7px; overflow: hidden; border-radius: 6px; background: #eef1f8; }
.dashboard-location-list b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #526ef5, #6f86fa); }
.dashboard-location-list strong { color: var(--iq-text-primary); font-size: 8px; font-weight: 500; text-align: right; }

.dashboard-right-rail { display: grid; gap: 14px; }
.dashboard-overview-card,
.dashboard-rail-card { padding: 16px 14px 13px; }
.dashboard-overview-card { min-height: 282px; }
.dashboard-gauge { position: relative; display: grid; height: 105px; place-items: center; margin-top: 7px; }
.dashboard-gauge svg { position: absolute; inset: 0; width: 100%; height: 80px; overflow: visible; }
.dashboard-gauge path { fill: none; stroke: #e5e9f1; stroke-width: 8; stroke-linecap: round; }
.dashboard-gauge path.is-value { stroke: var(--iq-success); stroke-dasharray: calc(var(--gauge-progress) * 1) 100; }
.dashboard-gauge strong { align-self: end; margin-bottom: 23px; color: var(--iq-text-primary); font-size: 23px; font-weight: 600; }
.dashboard-gauge > span { position: absolute; bottom: 9px; color: var(--iq-text-muted); font-size: 8px; }
.dashboard-overview-list { display: grid; gap: 8px; padding-top: 9px; border-top: 1px solid var(--iq-border-subtle); }
.dashboard-overview-list > span { display: grid; grid-template-columns: 19px 26px minmax(0,1fr); align-items: center; color: var(--iq-text-secondary); font-size: 8px; }
.dashboard-overview-list i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--overview-soft); color: var(--overview-color); }
.dashboard-overview-list svg { width: 10px; height: 10px; fill: none; stroke: currentColor; }
.dashboard-overview-list b { color: var(--iq-text-primary); font-size: 10px; font-weight: 600; }
.dashboard-overview-list .is-green { --overview-color: var(--iq-success); --overview-soft: var(--iq-success-soft); }
.dashboard-overview-list .is-blue { --overview-color: var(--iq-info); --overview-soft: var(--iq-info-soft); }
.dashboard-overview-list .is-red { --overview-color: var(--iq-danger); --overview-soft: var(--iq-danger-soft); }
.dashboard-overview-list .is-violet { --overview-color: var(--iq-violet); --overview-soft: var(--iq-violet-soft); }

.dashboard-rail-card { min-height: 184px; }
.dashboard-appointment-list,
.dashboard-message-list { display: grid; min-height: 124px; align-content: center; margin-top: 8px; }
.dashboard-appointment-list > div { display: grid; grid-template-columns: 40px 7px minmax(0,1fr); gap: 7px; align-items: start; min-height: 37px; padding: 7px 0; }
.dashboard-appointment-list time { color: var(--iq-text-primary); font-size: 8px; font-weight: 500; }
.appointment-dot { width: 5px; height: 5px; margin-top: 3px; border-radius: 50%; background: var(--iq-accent); }
.dot-1 { background: var(--iq-warning); }
.dot-2 { background: var(--iq-success); }
.dashboard-appointment-list p,
.dashboard-message-list p { min-width: 0; margin: 0; }
.dashboard-appointment-list strong,
.dashboard-appointment-list span,
.dashboard-message-list strong,
.dashboard-message-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-appointment-list strong,
.dashboard-message-list strong { color: var(--iq-text-primary); font-size: 8px; font-weight: 500; }
.dashboard-appointment-list span,
.dashboard-message-list span { margin-top: 3px; color: var(--iq-text-muted); font-size: 7px; }
.dashboard-message-list > div { display: grid; grid-template-columns: 20px minmax(0,1fr) 42px; gap: 7px; align-items: center; min-height: 42px; padding: 7px 0; border-bottom: 1px solid var(--iq-border-subtle); }
.dashboard-message-list > div > i { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: var(--iq-accent-soft); color: var(--iq-accent); }
.dashboard-message-list svg { width: 10px; height: 10px; fill: none; stroke: currentColor; }
.dashboard-message-list time { color: var(--iq-text-muted); font-size: 7px; text-align: right; }
.dashboard-empty-copy { margin: 0; padding: 15px 5px; color: var(--iq-text-muted); font-size: 9px; line-height: 1.45; }

body.iq-dashboard-page .hub-kpi-center,
body.iq-dashboard-page .hub-task-center,
body.iq-dashboard-page .hub-report-center {
  min-width: 0;
  background: var(--iq-background);
}

@media (max-width: 1380px) {
  body.iq-dashboard-page { --iq-sidebar-width: 210px; }
  body.iq-dashboard-page .hub-dashboard { padding-inline: 24px; }
  .dashboard-reference-layout { grid-template-columns: minmax(0,1fr) 235px; }
  .dashboard-donut-layout { grid-template-columns: 105px minmax(0,1fr); }
  .dashboard-donut { width: 104px; height: 104px; }
}

@media (max-width: 1180px) {
  .dashboard-metric-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .dashboard-skeleton-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .dashboard-reference-layout { grid-template-columns: 1fr; }
  .dashboard-right-rail { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .dashboard-analytics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-analytics-card:last-child { grid-column: span 2; }
}

@media (max-width: 900px) {
  body.iq-dashboard-page .hub-dashboard { padding: 22px 18px 28px; }
  body.iq-dashboard-page .dashboard-header { align-items: flex-start; flex-direction: column; }
  body.iq-dashboard-page .dashboard-tools { width: 100%; justify-content: flex-start; }
  body.iq-dashboard-page .dashboard-search { width: min(100%, 340px); }
  .dashboard-filterbar { justify-content: flex-start; overflow-x: auto; }
  .dashboard-advanced-filters { align-items: stretch; flex-direction: column; }
  .dashboard-advanced-filters select,
  .dashboard-advanced-filters button { width: 100%; }
  .dashboard-metric-grid,
  .dashboard-skeleton-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .dashboard-right-rail { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body.iq-dashboard-page .hub-sidebar { width: 100%; min-height: 0; height: 58px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--iq-border); }
  body.iq-dashboard-page .sidebar-logo { flex: 0 0 72px; min-height: 38px; margin: 0 8px 0 0; }
  body.iq-dashboard-page .sidebar-logo-image { width: 70px; }
  body.iq-dashboard-page .sidebar-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  body.iq-dashboard-page .sidebar-link { flex: 0 0 42px; justify-content: center; padding: 0; font-size: 0; }
  body.iq-dashboard-page .sidebar-profile,
  body.iq-dashboard-page .hub-sidebar .hub-logout-btn { display: none; }
  body.iq-dashboard-page .hub-theme-switch {
    min-height: 38px !important;
    flex: 0 0 64px !important;
    grid-template-columns: 1fr !important;
    margin: 0 0 0 6px !important;
    padding: 0 !important;
    border-top: 0 !important;
  }
  body.iq-dashboard-page .hub-theme-switch .iq-sidebar-theme-label { display: none !important; }
  body.iq-dashboard-page .hub-dashboard { padding: 18px 12px 26px; }
  .dashboard-title h1 { font-size: 24px; }
  .dashboard-filterbar { margin-top: 12px; }
  .dashboard-week-control { min-width: 210px; }
  .dashboard-metric-grid,
  .dashboard-skeleton-grid,
  .dashboard-analytics-grid,
  .dashboard-action-grid { grid-template-columns: 1fr; }
  .dashboard-analytics-card:last-child { grid-column: auto; }
  .dashboard-metric-card { min-height: 128px; }
  .dashboard-donut-layout { grid-template-columns: 118px minmax(0,1fr); }
  .dashboard-donut { width: 112px; height: 112px; }
  .dashboard-table-card { padding-inline: 10px; }
  .dashboard-table-wrap { overflow-x: auto; }
  .dashboard-data-table { min-width: 620px; }
}

@media (max-width: 480px) {
  body.iq-dashboard-page .dashboard-tools { gap: 7px; }
  body.iq-dashboard-page .dashboard-search { width: calc(100% - 70px); }
  .dashboard-search kbd { display: none; }
  body.iq-dashboard-page .dashboard-search { grid-template-columns: 18px minmax(0,1fr); }
  .dashboard-donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .dashboard-chart-legend { width: 100%; }
}

/* One persistent IQ Hub sidebar for every linked application. */
body.iq-sidebar-shell { --iq-sidebar-width: 218px; }

.iq-global-sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  z-index: 1000 !important;
  display: flex !important;
  box-sizing: border-box !important;
  width: var(--iq-sidebar-width) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  flex-direction: column !important;
  padding: 22px 10px 14px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-right: 1px solid var(--iq-border) !important;
  border-radius: 0 !important;
  background: var(--iq-sidebar) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  view-transition-name: iq-fixed-sidebar;
}

.iq-global-sidebar-brand {
  display: flex !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  align-items: center !important;
  margin: 0 10px 20px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-decoration: none !important;
}

.iq-global-sidebar-brand img {
  display: block !important;
  width: 105px !important;
  height: 34px !important;
  max-width: 105px !important;
  max-height: 34px !important;
  object-fit: contain !important;
  object-position: left center !important;
  filter: none !important;
}

.iq-global-sidebar-nav {
  display: flex !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  scrollbar-color: #d8deea transparent;
  scrollbar-width: thin;
}

.iq-global-sidebar-link {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: var(--iq-radius-control) !important;
  background: transparent !important;
  color: #24324a !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-align: left !important;
  text-decoration: none !important;
  transition: background var(--iq-transition), color var(--iq-transition) !important;
}

.iq-global-sidebar-link > i {
  display: grid !important;
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
  place-items: center !important;
  color: currentColor !important;
  font-style: normal !important;
}

.iq-global-sidebar-link svg,
.iq-global-sidebar-logout svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.iq-global-sidebar-link > span {
  display: block !important;
  overflow: hidden !important;
  color: inherit !important;
  font: inherit !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.iq-global-sidebar-link:hover {
  transform: none !important;
  background: var(--iq-surface-hover) !important;
  color: var(--iq-accent) !important;
  box-shadow: none !important;
}

.iq-global-sidebar-link.is-active {
  background: var(--iq-accent-soft) !important;
  color: var(--iq-accent) !important;
  font-weight: 600 !important;
}

.iq-global-module-slot {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 2px 0 7px 20px !important;
  padding: 2px 0 2px 8px !important;
  overflow: visible !important;
  border: 0 !important;
  border-left: 1px solid #dfe4ee !important;
  background: transparent !important;
  box-shadow: none !important;
}

.iq-global-module-slot .plantafel-task-menu,
.iq-global-module-slot .nav,
.iq-global-module-slot .tabs,
.iq-global-module-slot .sidebar-nav,
.iq-global-local-tools {
  display: flex !important;
  width: 100% !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.iq-global-module-slot button,
.iq-global-module-slot a,
.iq-global-local-tools button {
  display: flex !important;
  width: 100% !important;
  min-height: 34px !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--iq-text-secondary) !important;
  box-shadow: none !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-decoration: none !important;
}

.iq-global-module-slot button:hover,
.iq-global-module-slot a:hover,
.iq-global-module-slot button.active,
.iq-global-module-slot button.is-active {
  transform: none !important;
  background: var(--iq-surface-hover) !important;
  color: var(--iq-accent) !important;
}

.iq-global-module-slot .sidebar-btn { font-size: 0 !important; }
.iq-global-module-slot .sidebar-btn::after {
  content: attr(title) !important;
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 10px !important;
  opacity: 1 !important;
  transform: none !important;
}
.iq-global-module-slot .sidebar-btn svg { width: 14px !important; height: 14px !important; flex: 0 0 14px !important; }

.iq-global-module-slot .plantafel-task-label { margin: 6px 7px 3px !important; font-size: 8px !important; }
.iq-global-module-slot .plantafel-task-customer-filter { margin: 5px 7px 3px !important; }
.iq-global-module-slot .plantafel-task-customer-filter select { min-height: 32px !important; }
.iq-global-module-slot .plantafel-task-tab { min-height: 34px !important; padding: 5px 7px !important; }
.iq-global-module-slot .plantafel-task-copy strong { font-size: 9px !important; }
.iq-global-module-slot .plantafel-task-copy small { font-size: 8px !important; }

.iq-sidebar-theme-switch {
  display: grid !important;
  min-height: 42px !important;
  flex: 0 0 auto !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 10px 10px 0 !important;
  padding: 10px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--iq-border-subtle) !important;
  background: transparent !important;
  color: var(--iq-text-secondary) !important;
  box-shadow: none !important;
}

.iq-sidebar-theme-label {
  display: block !important;
  overflow: hidden !important;
  color: var(--iq-text-muted) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.iq-sidebar-theme-options {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 2px !important;
  border: 1px solid var(--iq-border) !important;
  border-radius: 9px !important;
  background: var(--iq-surface-secondary) !important;
  box-shadow: none !important;
}

.iq-sidebar-theme-switch button {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--iq-text-muted) !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background var(--iq-transition), color var(--iq-transition), box-shadow var(--iq-transition) !important;
}

.iq-sidebar-theme-switch button:hover {
  background: var(--iq-surface-hover) !important;
  color: var(--iq-text-primary) !important;
}

.iq-sidebar-theme-switch button.is-active,
.iq-sidebar-theme-switch button[aria-pressed="true"] {
  background: var(--iq-surface) !important;
  color: var(--iq-accent) !important;
  box-shadow: 0 1px 4px rgba(31, 52, 94, .12) !important;
}

.iq-sidebar-theme-switch button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--iq-accent) 24%, transparent) !important;
  outline-offset: 2px !important;
}

.iq-sidebar-theme-switch svg {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.iq-global-sidebar-profile {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 8px !important;
  min-height: 56px !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 12px 0 0 !important;
  padding: 12px 10px 5px !important;
  border: 0 !important;
  border-top: 1px solid var(--iq-border-subtle) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
}

.iq-global-sidebar-avatar {
  display: grid !important;
  width: 38px !important;
  height: 38px !important;
  place-items: center !important;
  overflow: hidden !important;
  border: 1px solid #d8dde8 !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #e1ddd5, #8b837c) !important;
  color: #172033 !important;
  box-shadow: none !important;
  font-size: 0 !important;
  font-weight: 600 !important;
}

.iq-global-sidebar-user-copy { display: block !important; min-width: 0 !important; }
.iq-global-sidebar-user-copy strong,
.iq-global-sidebar-user-copy small {
  display: block !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--iq-text-primary) !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.iq-global-sidebar-user-copy strong { font-size: 12px !important; font-weight: 600 !important; }
.iq-global-sidebar-user-copy small { margin-top: 3px !important; color: var(--iq-text-muted) !important; font-size: 10px !important; font-weight: 400 !important; }
.iq-global-online-dot { width: 7px !important; height: 7px !important; border: 0 !important; border-radius: 50% !important; background: var(--iq-success) !important; box-shadow: none !important; }

.iq-global-sidebar-logout {
  display: flex !important;
  width: calc(100% - 20px) !important;
  min-height: 34px !important;
  flex: 0 0 34px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 7px 10px 0 !important;
  padding: 0 10px !important;
  border: 1px solid var(--iq-border) !important;
  border-radius: 9px !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}
.iq-global-sidebar-logout:hover { background: var(--iq-surface-hover) !important; color: var(--iq-accent) !important; }
.iq-global-sidebar-logout:disabled { opacity: .55 !important; cursor: wait !important; }

@media (min-width: 761px) {
  body.iq-sidebar-shell { padding-left: 0 !important; }
  body.iq-sidebar-shell > .app-shell:not(main) {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.iq-sidebar-shell > .app-shell:not(main) > .main-area,
  body.iq-sidebar-shell > .app-shell:not(main) > .main,
  body.iq-sidebar-shell > .app-shell:not(main) > .iq-main {
    box-sizing: border-box !important;
    width: calc(100% - var(--iq-sidebar-width)) !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    margin-left: var(--iq-sidebar-width) !important;
    overflow-x: hidden !important;
  }
  body.iq-sidebar-shell > main.app-shell {
    box-sizing: border-box !important;
    width: calc(100% - var(--iq-sidebar-width)) !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    margin: 0 0 0 var(--iq-sidebar-width) !important;
  }
  body.iq-sidebar-shell.enterprise-wochenbericht-v2,
  body.iq-sidebar-shell.enterprise-wochenbericht-v2:not(.mobile-timer-active) { padding-left: 0 !important; }
  body.iq-sidebar-shell.enterprise-wochenbericht-v2 > header,
  body.iq-sidebar-shell.enterprise-wochenbericht-v2 > main {
    box-sizing: border-box !important;
    width: calc(100% - var(--iq-sidebar-width)) !important;
    max-width: none !important;
    margin-left: var(--iq-sidebar-width) !important;
  }
}

/* Central task page state: isolate it from the legacy dashboard and login artwork. */
body.iq-task-page #loginView { display: none !important; }
body.iq-task-page .hub-view { background: var(--iq-background) !important; }
body.iq-task-page .hub-view::before,
body.iq-task-page .hub-view::after { display: none !important; }
body.iq-task-page .hub-task-center {
  display: block !important;
  width: calc(100% - var(--iq-sidebar-width)) !important;
  min-height: 100dvh;
  margin: 0 0 0 var(--iq-sidebar-width) !important;
  padding: 26px 24px 30px !important;
  overflow-x: hidden !important;
  background: var(--iq-background) !important;
  isolation: isolate;
}
body.iq-task-page .task-table-card,
body.iq-task-page .hub-task-list,
body.iq-task-page .task-table-scroll { display: block; visibility: visible; opacity: 1; }
body.iq-task-page .task-table-card { min-height: 320px; }
body.iq-task-page .hub-task-center { height: 100dvh !important; overflow-y: auto !important; }

/* Aufgaben / Auswertungen: light IQ Hub analytics surface. */
body.iq-analytics-page #loginView { display: none !important; }
body.iq-analytics-page .hub-view {
  background: var(--iq-background) !important;
  color: var(--iq-text-primary) !important;
}
body.iq-analytics-page .hub-view::before,
body.iq-analytics-page .hub-view::after { display: none !important; }

/* Keep Auswertungen in the content column beside the persistent Hub sidebar.
   Legacy tablet rules switch .hub-view to block layout, which otherwise lets
   the analytics surface slide underneath the navigation. */
@media (min-width: 761px) {
  body.iq-analytics-page .hub-view {
    display: grid !important;
    grid-template-columns: var(--iq-sidebar-width) minmax(0, 1fr) !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.iq-analytics-page .hub-sidebar {
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: var(--iq-sidebar-width) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 22px 10px 14px !important;
  }

  body.iq-analytics-page .hub-kpi-center {
    grid-column: 2 !important;
    grid-row: 1 !important;
    max-width: none !important;
  }
}

body.iq-analytics-page .hub-kpi-center {
  display: block !important;
  grid-column: 2 !important;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 26px 24px 36px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: var(--iq-background) !important;
  color: var(--iq-text-primary) !important;
  isolation: isolate;
}
body.iq-analytics-page .kpi-dashboard-shell {
  gap: 16px !important;
  max-width: 1720px;
  margin: 0 auto;
}
body.iq-analytics-page .kpi-hero {
  grid-template-columns: minmax(220px, .7fr) minmax(620px, 1.3fr) !important;
  align-items: end !important;
  gap: 20px !important;
  padding: 0 2px 3px !important;
}
body.iq-analytics-page .kpi-hero .eyebrow,
body.iq-analytics-page .executive-section .eyebrow,
body.iq-analytics-page .summary-widget .eyebrow,
body.iq-analytics-page .alert-widget .eyebrow,
body.iq-analytics-page .kpi-drilldown .eyebrow {
  margin: 0 0 4px !important;
  color: var(--iq-accent) !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}
body.iq-analytics-page .kpi-hero h1 {
  margin: 0 !important;
  color: var(--iq-text-primary) !important;
  font-size: 27px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -.025em !important;
}
body.iq-analytics-page .kpi-hero p:not(.eyebrow) {
  max-width: 520px !important;
  margin: 7px 0 0 !important;
  color: var(--iq-text-secondary) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
body.iq-analytics-page .kpi-filter-bar {
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
}
body.iq-analytics-page .kpi-date-pill,
body.iq-analytics-page .kpi-filter-bar select,
body.iq-analytics-page .kpi-segmented,
body.iq-analytics-page .kpi-segmented button,
body.iq-analytics-page .kpi-filter-bar .hub-secondary-btn {
  min-height: 36px !important;
  border: 1px solid var(--iq-border) !important;
  border-radius: 8px !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-secondary) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  font-size: 11px !important;
  font-weight: 550 !important;
}
body.iq-analytics-page .kpi-date-pill { padding: 0 11px !important; color: var(--iq-text-primary) !important; }
body.iq-analytics-page .kpi-filter-bar select {
  min-width: 112px !important;
  max-width: 145px;
  padding: 0 28px 0 10px !important;
  outline: none !important;
}
body.iq-analytics-page .kpi-filter-bar select:focus { border-color: #b8c4fa !important; box-shadow: 0 0 0 3px rgba(63, 99, 245, .1) !important; }
body.iq-analytics-page .kpi-segmented { padding: 3px !important; background: var(--iq-surface-secondary) !important; }
body.iq-analytics-page .kpi-segmented button {
  min-height: 28px !important;
  padding: 0 9px !important;
  border: 0 !important;
  background: transparent !important;
}
body.iq-analytics-page .kpi-segmented button.is-active {
  background: var(--iq-surface) !important;
  color: var(--iq-accent) !important;
  box-shadow: 0 1px 4px rgba(31, 52, 94, .09) !important;
}
body.iq-analytics-page .kpi-filter-bar .hub-secondary-btn { padding: 0 12px !important; }
body.iq-analytics-page .kpi-filter-bar .hub-secondary-btn:hover { border-color: #c9d2fa !important; background: var(--iq-accent-soft) !important; color: var(--iq-accent) !important; transform: none !important; }

body.iq-analytics-page .live-status-bar { gap: 8px !important; }
body.iq-analytics-page .live-status-item {
  min-height: 68px !important;
  padding: 11px !important;
  border: 1px solid var(--iq-border) !important;
  border-radius: 10px !important;
  background: var(--iq-surface) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
body.iq-analytics-page .live-status-item i { width: 7px !important; height: 7px !important; box-shadow: none !important; }
body.iq-analytics-page .live-status-item span { color: var(--iq-text-muted) !important; font-size: 10px !important; font-weight: 500 !important; }
body.iq-analytics-page .live-status-item strong { color: var(--iq-text-primary) !important; font-size: 18px !important; font-weight: 700 !important; }
body.iq-analytics-page .live-status-green { color: var(--iq-success) !important; }
body.iq-analytics-page .live-status-cyan { color: var(--iq-cyan) !important; }
body.iq-analytics-page .live-status-orange { color: var(--iq-warning) !important; }
body.iq-analytics-page .live-status-red { color: var(--iq-danger) !important; }

body.iq-analytics-page .executive-topline { gap: 12px !important; }
body.iq-analytics-page .summary-widget,
body.iq-analytics-page .alert-widget,
body.iq-analytics-page .executive-section,
body.iq-analytics-page .kpi-card,
body.iq-analytics-page .kpi-panel,
body.iq-analytics-page .kpi-table-panel {
  border: 1px solid var(--iq-border) !important;
  border-radius: 11px !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
  backdrop-filter: none !important;
}
body.iq-analytics-page .summary-widget,
body.iq-analytics-page .alert-widget { padding: 17px !important; }
body.iq-analytics-page .summary-widget header,
body.iq-analytics-page .alert-widget header,
body.iq-analytics-page .executive-section-head { margin-bottom: 12px !important; }
body.iq-analytics-page .summary-widget h2,
body.iq-analytics-page .alert-widget h2,
body.iq-analytics-page .executive-section-head h2,
body.iq-analytics-page .kpi-panel h2,
body.iq-analytics-page .kpi-table-panel h2 {
  color: var(--iq-text-primary) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}
body.iq-analytics-page .summary-widget header span,
body.iq-analytics-page .alert-widget header span,
body.iq-analytics-page .executive-section-head > span {
  padding: 5px 8px !important;
  border-radius: 6px !important;
  background: var(--iq-accent-soft) !important;
  color: var(--iq-accent) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}
body.iq-analytics-page .summary-widget > p { color: var(--iq-text-secondary) !important; font-size: 12px !important; line-height: 1.55 !important; }
body.iq-analytics-page .alert-list { gap: 7px !important; max-height: 215px !important; }
body.iq-analytics-page .alert-item {
  gap: 8px !important;
  padding: 9px 10px !important;
  border: 1px solid var(--iq-border-subtle) !important;
  border-radius: 8px !important;
  background: var(--iq-surface-secondary) !important;
}
body.iq-analytics-page .alert-item i { width: 7px !important; height: 7px !important; box-shadow: none !important; }
body.iq-analytics-page .alert-item strong { color: var(--iq-text-primary) !important; font-size: 11px !important; font-weight: 600 !important; }
body.iq-analytics-page .alert-item span { color: var(--iq-text-muted) !important; font-size: 10px !important; }
body.iq-analytics-page .alert-critical { color: var(--iq-danger) !important; }
body.iq-analytics-page .alert-warning { color: var(--iq-warning) !important; }

body.iq-analytics-page .executive-section { padding: 16px !important; }
body.iq-analytics-page .executive-kpi-grid,
body.iq-analytics-page .executive-chart-grid,
body.iq-analytics-page .kpi-detail-grid { gap: 10px !important; }
body.iq-analytics-page .kpi-card {
  gap: 8px !important;
  min-height: 148px !important;
  padding: 14px !important;
  overflow: hidden !important;
}
body.iq-analytics-page .kpi-card::after { display: none !important; }
body.iq-analytics-page .kpi-card-top { gap: 10px !important; }
body.iq-analytics-page .kpi-card-top > span { color: var(--iq-text-secondary) !important; font-size: 11px !important; font-weight: 550 !important; }
body.iq-analytics-page .kpi-card-top i {
  width: 39px !important;
  height: 39px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--iq-accent-soft) !important;
}
body.iq-analytics-page .kpi-card-top svg { width: 19px !important; height: 19px !important; }
body.iq-analytics-page .kpi-card > strong { color: var(--iq-text-primary) !important; font-size: 27px !important; font-weight: 700 !important; }
body.iq-analytics-page .kpi-card > p,
body.iq-analytics-page .kpi-panel p,
body.iq-analytics-page .kpi-table-panel p { color: var(--iq-text-muted) !important; font-size: 10px !important; }
body.iq-analytics-page .kpi-card footer { align-items: center !important; }
body.iq-analytics-page .kpi-card-category { right: 14px !important; bottom: 8px !important; color: #b0b8c8 !important; font-size: 8px !important; font-weight: 550 !important; }
body.iq-analytics-page .kpi-tone-cyan .kpi-card-top i { background: var(--iq-cyan-soft) !important; color: var(--iq-cyan) !important; }
body.iq-analytics-page .kpi-tone-green .kpi-card-top i { background: var(--iq-success-soft) !important; color: var(--iq-success) !important; }
body.iq-analytics-page .kpi-tone-blue .kpi-card-top i { background: var(--iq-info-soft) !important; color: var(--iq-info) !important; }
body.iq-analytics-page .kpi-tone-orange .kpi-card-top i { background: var(--iq-warning-soft) !important; color: var(--iq-warning) !important; }
body.iq-analytics-page .kpi-tone-red .kpi-card-top i { background: var(--iq-danger-soft) !important; color: var(--iq-danger) !important; }
body.iq-analytics-page .kpi-tone-purple .kpi-card-top i { background: var(--iq-violet-soft) !important; color: var(--iq-violet) !important; }
body.iq-analytics-page .kpi-card.is-drillable:hover,
body.iq-analytics-page .kpi-card.is-drillable:focus-visible {
  transform: translateY(-1px) !important;
  border-color: #cfd7fa !important;
  box-shadow: 0 10px 28px rgba(31, 52, 94, .10) !important;
}
body.iq-analytics-page .kpi-trend,
body.iq-analytics-page .kpi-status {
  min-height: 23px !important;
  padding: 0 7px !important;
  border-radius: 6px !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
}
body.iq-analytics-page .kpi-trend small { color: var(--iq-text-muted) !important; font-size: 8px !important; }
body.iq-analytics-page .kpi-trend-positive,
body.iq-analytics-page .kpi-status-stable { color: var(--iq-success) !important; background: var(--iq-success-soft) !important; }
body.iq-analytics-page .kpi-trend-warning,
body.iq-analytics-page .kpi-status-warning { color: #b97808 !important; background: var(--iq-warning-soft) !important; }
body.iq-analytics-page .kpi-trend-danger,
body.iq-analytics-page .kpi-status-critical { color: var(--iq-danger) !important; background: var(--iq-danger-soft) !important; }
body.iq-analytics-page .kpi-status-neutral { color: var(--iq-info) !important; background: var(--iq-info-soft) !important; }
body.iq-analytics-page .kpi-status i { width: 5px !important; height: 5px !important; box-shadow: none !important; }
body.iq-analytics-page .kpi-card-progress,
body.iq-analytics-page .kpi-target-line,
body.iq-analytics-page .project-budget-track,
body.iq-analytics-page .absence-stack,
body.iq-analytics-page .kpi-bar-row div { background: #edf0f5 !important; }
body.iq-analytics-page .kpi-card-progress { height: 5px !important; }
body.iq-analytics-page .kpi-card-progress span,
body.iq-analytics-page .kpi-target-line span { background: linear-gradient(90deg, var(--iq-accent), var(--iq-cyan)) !important; }

body.iq-analytics-page .kpi-panel,
body.iq-analytics-page .kpi-table-panel { padding: 15px !important; }
body.iq-analytics-page .kpi-panel header,
body.iq-analytics-page .kpi-table-panel header { margin-bottom: 13px !important; }
body.iq-analytics-page .kpi-panel header span,
body.iq-analytics-page .kpi-table-count { color: var(--iq-accent) !important; font-size: 12px !important; font-weight: 650 !important; }
body.iq-analytics-page .kpi-line-chart .chart-axis { stroke: #e8ebf2 !important; stroke-width: 2 !important; }
body.iq-analytics-page .kpi-line-chart .chart-line { stroke: var(--iq-cyan) !important; stroke-width: 3 !important; filter: none !important; }
body.iq-analytics-page .kpi-chart-green .chart-line,
body.iq-analytics-page .kpi-chart-green circle { stroke: var(--iq-success) !important; }
body.iq-analytics-page .kpi-chart-blue .chart-line,
body.iq-analytics-page .kpi-chart-blue circle { stroke: var(--iq-info) !important; }
body.iq-analytics-page .kpi-chart-orange .chart-line,
body.iq-analytics-page .kpi-chart-orange circle { stroke: var(--iq-warning) !important; }
body.iq-analytics-page .kpi-line-chart circle { fill: var(--iq-surface) !important; }
body.iq-analytics-page .kpi-chart-labels { color: var(--iq-text-muted) !important; font-size: 9px !important; font-weight: 500 !important; }
body.iq-analytics-page .kpi-bar-list { gap: 11px !important; }
body.iq-analytics-page .kpi-bar-row { grid-template-columns: 74px minmax(0, 1fr) 34px !important; gap: 9px !important; }
body.iq-analytics-page .kpi-bar-row span,
body.iq-analytics-page .kpi-bar-row b { color: var(--iq-text-secondary) !important; font-size: 10px !important; font-weight: 550 !important; }
body.iq-analytics-page .kpi-bar-row div { height: 7px !important; }
body.iq-analytics-page .kpi-bar-row i { background: var(--iq-cyan) !important; }
body.iq-analytics-page .kpi-bar-red i { background: var(--iq-danger) !important; }
body.iq-analytics-page .kpi-bar-blue i { background: var(--iq-info) !important; }
body.iq-analytics-page .kpi-bar-orange i { background: var(--iq-warning) !important; }

body.iq-analytics-page .attendance-ring,
body.iq-analytics-page .productive-donut {
  width: 145px !important;
  height: 145px !important;
  background:
    radial-gradient(circle at center, var(--iq-surface) 0 58%, transparent 59%),
    conic-gradient(var(--iq-accent) calc(var(--attendance-value, var(--productive)) * 1%), #e7eaf1 0) !important;
  box-shadow: none !important;
}
body.iq-analytics-page .productive-donut {
  background:
    radial-gradient(circle at center, var(--iq-surface) 0 58%, transparent 59%),
    conic-gradient(var(--iq-cyan) 0 calc(var(--productive) * 1%), var(--iq-info) 0 calc((var(--productive) + var(--admin)) * 1%), var(--iq-warning) 0 calc((var(--productive) + var(--admin) + var(--waiting)) * 1%), var(--iq-success) 0 calc((var(--productive) + var(--admin) + var(--waiting) + var(--breaks)) * 1%), var(--iq-danger) 0) !important;
}
body.iq-analytics-page .attendance-ring strong,
body.iq-analytics-page .productive-donut strong { color: var(--iq-text-primary) !important; font-size: 26px !important; font-weight: 700 !important; }
body.iq-analytics-page .attendance-ring small,
body.iq-analytics-page .productive-donut small { margin-bottom: 39px !important; color: var(--iq-text-muted) !important; font-size: 9px !important; font-weight: 500 !important; }
body.iq-analytics-page .productive-legend span { color: var(--iq-text-secondary) !important; font-size: 9px !important; font-weight: 500 !important; }

body.iq-analytics-page .project-utilization-list { gap: 8px !important; }
body.iq-analytics-page .project-utilization-list article,
body.iq-analytics-page .kpi-employee-row,
body.iq-analytics-page .kpi-open-shift,
body.iq-analytics-page .kpi-data-row,
body.iq-analytics-page .kpi-empty {
  border: 1px solid var(--iq-border-subtle) !important;
  border-radius: 8px !important;
  background: var(--iq-surface-secondary) !important;
}
body.iq-analytics-page .project-utilization-list article { padding: 9px !important; }
body.iq-analytics-page .project-utilization-list strong,
body.iq-analytics-page .kpi-employee-row strong,
body.iq-analytics-page .kpi-open-shift strong { color: var(--iq-text-primary) !important; font-size: 10px !important; font-weight: 600 !important; }
body.iq-analytics-page .project-utilization-list span,
body.iq-analytics-page .project-utilization-list b,
body.iq-analytics-page .kpi-employee-row span,
body.iq-analytics-page .kpi-open-shift span,
body.iq-analytics-page .kpi-employee-row small { color: var(--iq-text-muted) !important; font-size: 9px !important; font-weight: 500 !important; }
body.iq-analytics-page .project-utilization-list b.is-warning { color: #b97808 !important; }
body.iq-analytics-page .project-budget-track i { background: linear-gradient(90deg, var(--iq-accent), var(--iq-warning)) !important; }
body.iq-analytics-page .kpi-employee-list,
body.iq-analytics-page .kpi-open-shift-list { gap: 7px !important; }
body.iq-analytics-page .kpi-employee-row,
body.iq-analytics-page .kpi-open-shift { min-height: 50px !important; padding: 9px !important; }
body.iq-analytics-page .kpi-employee-avatar { width: 36px !important; height: 36px !important; background: var(--iq-accent-soft) !important; color: var(--iq-accent) !important; font-size: 9px !important; }
body.iq-analytics-page .kpi-employee-row b { color: var(--iq-text-primary) !important; font-size: 10px !important; }
body.iq-analytics-page .kpi-open-shift b { border-radius: 6px !important; background: var(--iq-surface) !important; color: var(--iq-text-secondary) !important; font-size: 9px !important; }
body.iq-analytics-page .priority-kritisch { background: var(--iq-danger-soft) !important; color: var(--iq-danger) !important; }
body.iq-analytics-page .priority-hoch { background: var(--iq-warning-soft) !important; color: #b97808 !important; }
body.iq-analytics-page .kpi-data-table { gap: 5px !important; }
body.iq-analytics-page .kpi-data-row { padding: 9px 10px !important; }
body.iq-analytics-page .kpi-data-row strong,
body.iq-analytics-page .kpi-data-row span { color: var(--iq-text-secondary) !important; font-size: 9px !important; }
body.iq-analytics-page .kpi-data-head { background: var(--iq-accent-soft) !important; }
body.iq-analytics-page .kpi-data-head strong { color: var(--iq-text-primary) !important; font-weight: 600 !important; }

body.iq-analytics-page .kpi-drilldown { background: rgba(17, 26, 46, .24) !important; backdrop-filter: blur(6px) !important; }
body.iq-analytics-page .kpi-drilldown-panel {
  border: 1px solid var(--iq-border) !important;
  border-radius: 13px !important;
  background: var(--iq-surface) !important;
  box-shadow: var(--iq-shadow-floating) !important;
}
body.iq-analytics-page .kpi-drilldown-panel h2,
body.iq-analytics-page .kpi-drilldown-content h3 { color: var(--iq-text-primary) !important; }
body.iq-analytics-page .kpi-drilldown-panel .hub-secondary-btn {
  min-height: 36px !important;
  border: 1px solid var(--iq-border) !important;
  border-radius: 8px !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
  box-shadow: none !important;
}

@media (max-width: 1450px) {
  body.iq-analytics-page .kpi-hero { grid-template-columns: 1fr !important; align-items: start !important; }
  body.iq-analytics-page .kpi-filter-bar { justify-content: flex-start !important; }
}

@media (max-width: 1050px) and (min-width: 761px) {
  body.iq-analytics-page .hub-kpi-center { padding: 22px 18px 30px !important; }
  body.iq-analytics-page .live-status-bar { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.iq-analytics-page .executive-kpi-grid,
  body.iq-analytics-page .executive-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  body.iq-analytics-page .hub-kpi-center {
    grid-column: 1;
    width: 100% !important;
    min-height: calc(100dvh - 58px) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 18px 12px 26px !important;
  }
  body.iq-analytics-page .kpi-filter-bar,
  body.iq-analytics-page .kpi-filter-bar select,
  body.iq-analytics-page .kpi-date-pill,
  body.iq-analytics-page .kpi-segmented,
  body.iq-analytics-page .kpi-filter-bar .hub-secondary-btn { width: 100% !important; max-width: none !important; }
  body.iq-analytics-page .kpi-segmented { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.iq-analytics-page .live-status-bar { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.iq-analytics-page .executive-topline,
  body.iq-analytics-page .executive-kpi-grid,
  body.iq-analytics-page .executive-chart-grid,
  body.iq-analytics-page .kpi-detail-grid { grid-template-columns: 1fr !important; }
}

@media (min-width: 761px) {
  body.iq-task-page .task-reference-table tbody { display: table-row-group; }
  body.iq-task-page .task-reference-table tbody tr { display: table-row; visibility: visible; opacity: 1; }
}

@media (max-width: 1050px) and (min-width: 761px) {
  body.iq-task-page .hub-task-center { width: calc(100% - 78px) !important; margin-left: 78px !important; }
  body.iq-task-page .task-detail-panel { width: min(380px, calc(100vw - 78px)); }
}

@media (max-width: 760px) {
  body.iq-task-page .hub-task-center { width: 100% !important; min-height: calc(100dvh - 58px); margin-left: 0 !important; padding: 18px 12px 26px !important; }
  body.iq-task-page .task-detail-panel { top: 58px; height: calc(100dvh - 58px); }
}

@media (min-width: 761px) and (max-width: 1050px) {
  body.iq-sidebar-shell { --iq-sidebar-width: 78px; }
  .iq-global-sidebar { padding-inline: 9px !important; }
  .iq-global-sidebar-brand { justify-content: center !important; margin-inline: 0 !important; }
  .iq-global-sidebar-brand img { width: 48px !important; max-width: 48px !important; object-fit: cover !important; object-position: left !important; }
  .iq-global-sidebar-link { justify-content: center !important; padding: 0 !important; }
  .iq-global-sidebar-link > span,
  .iq-global-module-slot,
  .iq-global-sidebar-user-copy,
  .iq-global-sidebar-logout > span,
  .iq-global-sidebar .iq-sidebar-theme-label { display: none !important; }
  .iq-global-sidebar .iq-sidebar-theme-switch { grid-template-columns: 1fr !important; justify-items: center !important; margin-inline: 0 !important; }
  .iq-global-sidebar-profile { grid-template-columns: 1fr !important; justify-items: center !important; padding-inline: 0 !important; }
  .iq-global-online-dot { display: none !important; }
  .iq-global-sidebar-logout { width: 42px !important; margin-inline: auto !important; padding: 0 !important; }
}

@media (max-width: 760px) {
  body.iq-sidebar-shell { --iq-sidebar-width: 100%; padding-left: 0 !important; }
  .iq-global-sidebar {
    position: sticky !important;
    inset: 0 !important;
    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 8px 10px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--iq-border) !important;
  }
  .iq-global-sidebar-brand { min-height: 38px !important; flex: 0 0 72px !important; margin: 0 8px 0 0 !important; }
  .iq-global-sidebar-brand img { width: 70px !important; max-width: 70px !important; }
  .iq-global-sidebar-nav { flex-direction: row !important; overflow-x: auto !important; overflow-y: hidden !important; }
  .iq-global-sidebar-link { flex: 0 0 42px !important; justify-content: center !important; padding: 0 !important; }
  .iq-global-sidebar-link > span,
  .iq-global-module-slot,
  .iq-global-sidebar-profile,
  .iq-global-sidebar-logout { display: none !important; }
  .iq-global-sidebar .iq-sidebar-theme-switch {
    min-height: 38px !important;
    flex: 0 0 64px !important;
    grid-template-columns: 1fr !important;
    margin: 0 0 0 6px !important;
    padding: 0 !important;
    border-top: 0 !important;
  }
  .iq-global-sidebar .iq-sidebar-theme-label { display: none !important; }
  body.iq-sidebar-shell > .app-shell:not(main),
  body.iq-sidebar-shell > main.app-shell,
  body.iq-sidebar-shell.enterprise-wochenbericht-v2 > header,
  body.iq-sidebar-shell.enterprise-wochenbericht-v2 > main {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin-left: 0 !important;
  }
}

/* Plantafel action menu and action panels must stay above the planning grid. */
.iq-plantafel-page .content-panel {
  overflow: visible !important;
}

.iq-plantafel-page .board-toolbar {
  position: relative !important;
  z-index: 120 !important;
  overflow: visible !important;
  backdrop-filter: none !important;
}

.iq-plantafel-page .board-actions {
  position: relative;
  z-index: 121;
  overflow: visible;
}
.iq-plantafel-page .planning-action-group { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 6px; padding-bottom: 2px; overflow-x: auto; }

.iq-plantafel-page .planning-action-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--iq-text-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--iq-transition), border-color var(--iq-transition);
}

.iq-plantafel-page .planning-action-item:hover,
.iq-plantafel-page .planning-action-item:focus-visible {
  border-color: var(--iq-border);
  background: var(--iq-surface-hover);
  outline: 0;
}

.iq-plantafel-page .planning-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--iq-accent-soft);
  color: var(--iq-accent);
  font-size: 16px;
  font-weight: 700;
}

.iq-plantafel-page .planning-action-copy { min-width: 0; }
.iq-plantafel-page .planning-action-copy strong,
.iq-plantafel-page .planning-action-copy small { display: block; }
.iq-plantafel-page .planning-action-copy strong { color: inherit; font-size: 11px; font-weight: 650; }
.iq-plantafel-page .planning-action-copy small { margin-top: 2px; color: var(--iq-text-muted); font-size: 9px; line-height: 1.35; }

.iq-plantafel-page .planning-detail-shortcuts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--iq-border-subtle);
}

.iq-plantafel-page .planning-action-item.is-danger { color: var(--iq-danger); }
.iq-plantafel-page .planning-action-item.is-danger .planning-action-icon { background: var(--iq-danger-soft); color: var(--iq-danger); }
.iq-plantafel-page .planning-action-item.is-danger:hover { border-color: #ffd3d7; background: var(--iq-danger-soft); }

.iq-plantafel-page .planning-side-panel {
  z-index: 1600 !important;
  background: var(--iq-surface) !important;
}

.iq-plantafel-page #planningModalBackdrop {
  z-index: 1590 !important;
}

.iq-plantafel-page .planning-confirm-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid #ffd3d7;
  border-radius: var(--iq-radius-card);
  background: var(--iq-danger-soft);
}

.iq-plantafel-page .planning-confirm-card p { margin: 5px 0 0; color: var(--iq-text-secondary); line-height: 1.5; }
.iq-plantafel-page .planning-confirm-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #ffffff; color: var(--iq-danger); font-size: 20px; font-weight: 750; }
.iq-plantafel-page .planning-confirm-summary,
.iq-plantafel-page .planning-template-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin-top: 14px; padding: 13px; border: 1px solid var(--iq-border); border-radius: 10px; background: var(--iq-surface-secondary); color: var(--iq-text-secondary); }
.iq-plantafel-page .planning-confirm-summary strong,
.iq-plantafel-page .planning-template-summary strong { color: var(--iq-text-primary); }
.iq-plantafel-page .planning-danger-action { min-height: var(--iq-control-height); padding: 0 15px; border: 0; border-radius: var(--iq-radius-control); background: var(--iq-danger); color: #ffffff; font-weight: 650; cursor: pointer; }
.iq-plantafel-page .planning-danger-action:disabled { opacity: .55; cursor: wait; }
.iq-plantafel-page .planning-template-form { margin: 14px 0 18px; padding: 16px; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-card); background: var(--iq-surface-secondary); }
.iq-plantafel-page .planning-template-form input { background: var(--iq-surface) !important; color: var(--iq-text-primary) !important; }
.iq-plantafel-page .planning-template-form .primary-button { justify-self: end; }
.iq-plantafel-page .planning-panel-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; color: var(--iq-text-primary); }
.iq-plantafel-page .planning-panel-section-heading span { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 99px; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 10px; font-weight: 650; }
.iq-plantafel-page .planning-restore-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; }
.iq-plantafel-page .planning-restore-button { min-height: 34px; padding: 0 11px; border: 1px solid #b9c8ff; border-radius: 8px; background: var(--iq-accent-soft); color: var(--iq-accent); font-size: 10px; font-weight: 650; cursor: pointer; }
.iq-plantafel-page .planning-help-list .panel-item-icon { background: var(--iq-accent-soft); color: var(--iq-accent); }

@media (max-width: 760px) {
  .iq-plantafel-page .header-controls {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
  .iq-plantafel-page .board-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0;
  }
  .iq-plantafel-page .planning-restore-item { grid-template-columns: 30px minmax(0, 1fr); }
  .iq-plantafel-page .planning-restore-button { grid-column: 2; justify-self: start; margin-top: 6px; }
}

/* Plantafel: all planning actions are permanently visible in one horizontal toolbar. */
.iq-plantafel-page .board-actions {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.iq-plantafel-page .planning-inline-actions {
  display: flex;
  min-width: 0;
  width: 100%;
  align-items: center;
  gap: 6px;
  padding: 2px 2px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e5 transparent;
}

.iq-plantafel-page .planning-inline-actions::-webkit-scrollbar { height: 5px; }
.iq-plantafel-page .planning-inline-actions::-webkit-scrollbar-thumb { border-radius: 99px; background: #cbd5e5; }

.iq-plantafel-page .planning-inline-actions .planning-action-item {
  display: inline-flex;
  width: auto;
  min-width: max-content;
  min-height: 38px;
  flex: 0 0 auto;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-control);
  background: var(--iq-surface);
  box-shadow: none;
  white-space: nowrap;
}

.iq-plantafel-page .planning-inline-actions .planning-action-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 12px;
}

.iq-plantafel-page .planning-inline-actions .planning-action-copy strong { font-size: 10px; }
.iq-plantafel-page .planning-inline-actions .planning-action-copy small { display: none; }

.iq-plantafel-page .planning-inline-actions .planning-detail-shortcut {
  display: inline-flex;
  width: auto;
  min-width: max-content;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--iq-border);
  border-radius: var(--iq-radius-control);
  background: var(--iq-surface);
  color: var(--iq-text-secondary);
  white-space: nowrap;
}

.iq-plantafel-page .planning-inline-actions .planning-detail-shortcut:hover,
.iq-plantafel-page .planning-inline-actions .planning-detail-shortcut.is-active { border-color: #b9c8ff; background: var(--iq-accent-soft); color: var(--iq-accent); }
.iq-plantafel-page .planning-inline-actions .planning-detail-shortcut strong { padding: 2px 6px; border-radius: 99px; background: var(--iq-surface-secondary); color: var(--iq-text-muted); font-size: 8px; }

@media (max-width: 760px) {
  .iq-plantafel-page .board-actions { width: 100%; flex-basis: 100%; }
}

/* Plantafel: keep filter and save state in the first/top control row. */
.iq-plantafel-page .header-controls {
  width: calc(100% - 18px);
  max-width: none;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.iq-plantafel-page .header-controls::-webkit-scrollbar { display: none; }
.iq-plantafel-page .header-controls > * { flex-shrink: 0; }
.iq-plantafel-page .header-controls .planning-search {
  min-width: 210px;
  max-width: 320px;
  flex: 1 1 260px;
}
.iq-plantafel-page .header-controls #planningFilterBtn,
.iq-plantafel-page .header-controls #autosaveStatus { flex: 0 0 auto; }

/* Requested hidden actions stay unavailable even when the view state is refreshed. */
.iq-plantafel-page [data-planning-hidden="true"] { display: none !important; }

/* Plantafel uses the full content width without the optional right detail panel. */
.iq-plantafel-page .plantafel-workspace {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
}
.iq-plantafel-page #assignmentDetailPanel { display: none !important; }

/* Shared desktop logo: 15 percent larger than the previous 105 px size. */
@media (min-width: 1051px) {
  .iq-brand img,
  .iq-reference-ui .brand-logo img,
  .iq-kalkulation-page .brand img,
  body.iq-dashboard-page .sidebar-logo-image {
    width: 121px !important;
    height: 39px !important;
    max-width: 121px !important;
    max-height: 39px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }
}

/* Keep the utilization canvas flush below its shared page header after legacy stats overrides. */
.iq-plantafel-page[data-plantafel-view="stats"] .management-panel:has(.employee-utilization-page) {
  padding: 0 18px 30px !important;
}
@media (max-width: 760px) {
  .iq-plantafel-page[data-plantafel-view="stats"] .management-panel:has(.employee-utilization-page) {
    padding: 0 12px 24px !important;
  }
}

/* IQ HUB global dark theme -------------------------------------------------
   One persisted preference drives every standalone module and the Hub shell. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --iq-background: #061317;
  --iq-sidebar: #08191e;
  --iq-surface: #0b1b20;
  --iq-surface-secondary: #10252b;
  --iq-surface-hover: #153139;
  --iq-border: rgba(148, 202, 211, .16);
  --iq-border-subtle: rgba(148, 202, 211, .1);
  --iq-text-primary: #f3fbfc;
  --iq-text-secondary: #abc3c8;
  --iq-text-muted: #78949a;
  --iq-accent: #22c7bb;
  --iq-accent-strong: #16aaa3;
  --iq-accent-soft: rgba(34, 199, 187, .14);
  --iq-success: #42d6a0;
  --iq-success-soft: rgba(66, 214, 160, .13);
  --iq-warning: #efb84f;
  --iq-warning-soft: rgba(239, 184, 79, .14);
  --iq-danger: #ff7180;
  --iq-danger-soft: rgba(255, 113, 128, .14);
  --iq-info: #55a7ff;
  --iq-info-soft: rgba(85, 167, 255, .14);
  --iq-violet: #ad83ff;
  --iq-violet-soft: rgba(173, 131, 255, .14);
  --iq-cyan: #36cde2;
  --iq-cyan-soft: rgba(54, 205, 226, .13);
  --iq-shadow-card: 0 10px 30px rgba(0, 0, 0, .2), 0 1px 1px rgba(255, 255, 255, .025);
  --iq-shadow-floating: 0 22px 60px rgba(0, 0, 0, .42);

  /* Wochenbericht */
  --dash-bg: #061317;
  --dash-surface: rgba(11, 27, 32, .9);
  --dash-surface-strong: #0b1b20;
  --dash-card-soft: #10252b;
  --dash-border: rgba(148, 202, 211, .16);
  --dash-muted: #78949a;
  --dash-text: #f3fbfc;
  --dash-ink-soft: #abc3c8;
  --dash-accent: #22c7bb;
  --dash-accent-soft: rgba(34, 199, 187, .14);
  --dash-green: #42d6a0;
  --dash-red: #ff7180;
  --dash-orange: #efb84f;
  --dash-shadow: 0 20px 55px rgba(0, 0, 0, .32);
  --glass-surface: rgba(11, 27, 32, .84);

  /* Zeiterfassung */
  --time-bg: #061317;
  --time-surface: #0b1b20;
  --time-border: rgba(148, 202, 211, .16);
  --time-border-strong: rgba(148, 202, 211, .23);
  --time-text: #f3fbfc;
  --time-text-soft: #abc3c8;
  --time-muted: #78949a;
  --time-blue: #55a7ff;
  --time-blue-soft: rgba(85, 167, 255, .14);
  --time-green: #42d6a0;
  --time-green-soft: rgba(66, 214, 160, .13);
  --time-orange: #efb84f;
  --time-orange-soft: rgba(239, 184, 79, .14);
  --time-red: #ff7180;
  --time-red-soft: rgba(255, 113, 128, .14);
  --time-violet: #ad83ff;
  --time-violet-soft: rgba(173, 131, 255, .14);
  --time-shadow: 0 10px 30px rgba(0, 0, 0, .2);

  /* Plantafel legacy variables still used by operational components. */
  --bg: #061317;
  --panel: rgba(11, 27, 32, .9);
  --panel-solid: #0b1b20;
  --sidebar: #08191e;
  --text: #f3fbfc;
  --muted: #8ba7ad;
  --line: rgba(148, 202, 211, .16);
  --shadow: 0 18px 46px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.iq-reference-ui,
html[data-theme="dark"] body.iq-dashboard-page,
html[data-theme="dark"] body.time-reference-page,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 {
  background: var(--iq-background) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .iq-main,
html[data-theme="dark"] .main,
html[data-theme="dark"] .main-area,
html[data-theme="dark"] .hub-view,
html[data-theme="dark"] .hub-dashboard,
html[data-theme="dark"] .hub-task-center,
html[data-theme="dark"] .hub-report-center,
html[data-theme="dark"] .time-reference-shell,
html[data-theme="dark"] .leave-reference-main {
  background-color: var(--iq-background) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] .iq-sidebar,
html[data-theme="dark"] .iq-reference-ui .sidebar,
html[data-theme="dark"] .hub-sidebar,
html[data-theme="dark"] .sidebar {
  border-color: var(--iq-border) !important;
  background: var(--iq-sidebar) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] .iq-brand img,
html[data-theme="dark"] .brand-logo-image,
html[data-theme="dark"] .sidebar-logo-image,
html[data-theme="dark"] .brand-logo img {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .iq-reference-ui option,
html[data-theme="dark"] .iq-kalkulation-page option,
html[data-theme="dark"] option {
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: var(--iq-border) !important;
  background-color: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--iq-text-muted) !important; }

html[data-theme="dark"] dialog,
html[data-theme="dark"] .modal,
html[data-theme="dark"] [class*="detail-drawer"],
html[data-theme="dark"] [class*="detail-panel"] {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-floating) !important;
}

/* Main dashboard, tasks and reports. */
html[data-theme="dark"] body.iq-dashboard-page .dashboard-search,
html[data-theme="dark"] body.iq-dashboard-page .task-reference-search,
html[data-theme="dark"] body.iq-report-page .report-search,
html[data-theme="dark"] body.iq-report-page .report-search kbd,
html[data-theme="dark"] body.iq-report-page .report-tabs button.is-active,
html[data-theme="dark"] body.iq-report-page .report-card-link,
html[data-theme="dark"] body.iq-report-page .report-table-footer button,
html[data-theme="dark"] body.iq-report-page .report-detail-drawer header button {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] body.iq-report-page .report-filter-panel select,
html[data-theme="dark"] body.iq-report-page .report-table-sort select,
html[data-theme="dark"] body.iq-report-page .report-table-footer select,
html[data-theme="dark"] body.iq-report-page .report-detail-drawer textarea,
html[data-theme="dark"] body.iq-report-page .report-data-table th {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
}

html[data-theme="dark"] body.iq-report-page .report-donut::after,
html[data-theme="dark"] .personnel-donut::before,
html[data-theme="dark"] .customer-donut::after,
html[data-theme="dark"] .leave-donut::before { background: var(--iq-surface) !important; }

/* Personalplanung, employees and customers contain older hard-coded cards. */
html[data-theme="dark"] .personal-reference-page .personnel-global-search,
html[data-theme="dark"] .personal-reference-page .personnel-tabs,
html[data-theme="dark"] .personal-reference-page .personnel-metric-card,
html[data-theme="dark"] .personal-reference-page .personnel-card,
html[data-theme="dark"] .personal-reference-page .personnel-table-card,
html[data-theme="dark"] .personal-reference-page .personnel-calendar,
html[data-theme="dark"] .personal-reference-page .personnel-detail-drawer,
html[data-theme="dark"] .personal-reference-page .employee-reference-card,
html[data-theme="dark"] .personal-reference-page .employee-reference-table tr,
html[data-theme="dark"] .personal-reference-page .customer-tabs,
html[data-theme="dark"] .personal-reference-page .customer-week-select,
html[data-theme="dark"] .personal-reference-page .customer-filter-button,
html[data-theme="dark"] .personal-reference-page .customer-view-toggle,
html[data-theme="dark"] .personal-reference-page .customer-filter-panel,
html[data-theme="dark"] .personal-reference-page .customer-filter-panel select,
html[data-theme="dark"] .personal-reference-page .customer-filter-panel button,
html[data-theme="dark"] .personal-reference-page .customer-metric-card,
html[data-theme="dark"] .personal-reference-page .customer-analytics-card,
html[data-theme="dark"] .personal-reference-page .customer-directory-card,
html[data-theme="dark"] .personal-reference-page .customer-aside-card,
html[data-theme="dark"] .personal-reference-page .customer-card-link,
html[data-theme="dark"] .personal-reference-page .customer-grid-card,
html[data-theme="dark"] .personal-reference-page .customer-pagination button,
html[data-theme="dark"] .personal-reference-page .customer-pagination select,
html[data-theme="dark"] .personal-reference-page .customer-quick-actions > button,
html[data-theme="dark"] .personal-reference-page .ghost,
html[data-theme="dark"] .personal-reference-page .modal {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
}

html[data-theme="dark"] .personal-reference-page table th,
html[data-theme="dark"] .personal-reference-page table td,
html[data-theme="dark"] .personal-reference-page .personnel-shift-cell,
html[data-theme="dark"] .personal-reference-page .customer-reference-table tbody tr:hover {
  border-color: var(--iq-border-subtle) !important;
  background-color: var(--iq-surface) !important;
  color: var(--iq-text-secondary) !important;
}

/* Zeiterfassung uses a second token family plus a few fixed white controls. */
html[data-theme="dark"] .time-reference-page .time-search,
html[data-theme="dark"] .time-reference-page .time-tab.active,
html[data-theme="dark"] .time-reference-page .time-more-views > div,
html[data-theme="dark"] .time-reference-page .time-arrow-group,
html[data-theme="dark"] .time-reference-page .time-arrow-group button,
html[data-theme="dark"] .time-reference-page .time-entry-table tfoot th,
html[data-theme="dark"] .time-reference-page .time-select-button,
html[data-theme="dark"] .time-reference-page .time-week-metric,
html[data-theme="dark"] .time-reference-page .time-card-link,
html[data-theme="dark"] .time-reference-page .time-quick-actions button,
html[data-theme="dark"] .time-reference-page .plan-item,
html[data-theme="dark"] .time-reference-page .time-badge {
  border-color: var(--time-border) !important;
  background: var(--time-surface) !important;
  color: var(--time-text-soft) !important;
}

html[data-theme="dark"] .time-reference-page .time-entry-table th,
html[data-theme="dark"] .time-reference-page .time-entry-table td {
  border-color: var(--time-border) !important;
  background: var(--time-surface) !important;
  color: var(--time-text-soft) !important;
}

/* Urlaubsplaner calendar, tables and drawers. */
html[data-theme="dark"] .iq-leave-page .leave-timeline-header,
html[data-theme="dark"] .iq-leave-page .leave-timeline-employee,
html[data-theme="dark"] .iq-leave-page .leave-data-table th,
html[data-theme="dark"] .iq-leave-page .leave-data-table td,
html[data-theme="dark"] .iq-leave-page .leave-table-action,
html[data-theme="dark"] .iq-leave-page .leave-outline-link,
html[data-theme="dark"] .iq-leave-page .leave-request-card,
html[data-theme="dark"] .iq-leave-page .leave-dialog,
html[data-theme="dark"] .iq-leave-page .leave-dialog-close,
html[data-theme="dark"] .iq-leave-page .leave-dialog-actions,
html[data-theme="dark"] .iq-leave-page .leave-detail-panel {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
}

/* Wochenbericht: keep the data-rich dashboard dark even where legacy CSS uses white. */
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .metric-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .analytics-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .analytics-panel,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .directory-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .missing-report-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .work-table-panel,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .enterprise-table-wrap,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .sidebar-user-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .mobile-overview-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .mobile-admin-card,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 .mobile-task-card {
  border-color: var(--dash-border) !important;
  background: var(--dash-surface-strong) !important;
  color: var(--dash-text) !important;
  box-shadow: var(--iq-shadow-card) !important;
}

html[data-theme="dark"] body.enterprise-wochenbericht-v2 table th,
html[data-theme="dark"] body.enterprise-wochenbericht-v2 table td {
  border-color: var(--dash-border) !important;
  background-color: var(--dash-surface-strong) !important;
  color: var(--dash-ink-soft) !important;
}

@media (prefers-reduced-motion: no-preference) {
  html[data-theme] body,
  html[data-theme] .iq-sidebar,
  html[data-theme] .iq-surface,
  html[data-theme] .iq-card { transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease; }
}

/* Global dark-mode completeness audit -------------------------------------
   Module reference styles are intentionally loaded after this shared file on
   some routes. These selectors therefore use the persisted root theme plus
   !important so fixed light reference surfaces cannot override dark mode. */
:root[data-theme="dark"] {
  --wb-bg: #061317;
  --wb-surface: #0b1b20;
  --wb-surface-soft: #10252b;
  --wb-border: rgba(148, 202, 211, .16);
  --wb-border-soft: rgba(148, 202, 211, .1);
  --wb-text: #f3fbfc;
  --wb-text-secondary: #abc3c8;
  --wb-muted: #78949a;
  --wb-blue: #55a7ff;
  --wb-blue-soft: rgba(85, 167, 255, .14);
  --wb-green: #42d6a0;
  --wb-green-soft: rgba(66, 214, 160, .13);
  --wb-orange: #efb84f;
  --wb-orange-soft: rgba(239, 184, 79, .14);
  --wb-red: #ff7180;
  --wb-red-soft: rgba(255, 113, 128, .14);
  --wb-violet: #ad83ff;
  --wb-violet-soft: rgba(173, 131, 255, .14);
  --wb-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] *,
html[data-theme="dark"] *::before,
html[data-theme="dark"] *::after { scrollbar-color: #31535b transparent; }

html[data-theme="dark"] ::selection { background: rgba(34, 199, 187, .28); color: #ffffff; }

/* Fixed global navigation and its preserved module submenus. */
html[data-theme="dark"] .iq-global-sidebar,
html[data-theme="dark"] .iq-global-module-slot,
html[data-theme="dark"] .iq-global-sidebar-profile {
  border-color: var(--iq-border) !important;
  background: var(--iq-sidebar) !important;
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] .iq-global-sidebar-link,
html[data-theme="dark"] .iq-global-module-slot button,
html[data-theme="dark"] .iq-global-module-slot a,
html[data-theme="dark"] .iq-global-sidebar-logout {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] .iq-global-module-slot :is(.plantafel-task-label, .plantafel-task-copy, .plantafel-task-copy strong, .plantafel-task-copy small),
html[data-theme="dark"] .iq-global-module-slot :is(button, a) :is(span, strong, small),
html[data-theme="dark"] body.iq-dashboard-page .hub-sidebar :is(.sidebar-profile strong, .sidebar-profile span, .hub-logout-btn, .iq-sidebar-theme-label),
html[data-theme="dark"] .iq-global-sidebar-user-copy :is(strong, small),
html[data-theme="dark"] .iq-global-sidebar .iq-sidebar-theme-label {
  color: inherit !important;
}
html[data-theme="dark"] body.iq-dashboard-page .hub-sidebar :is(.sidebar-link, .sidebar-profile, .hub-logout-btn, .iq-sidebar-theme-label) {
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] body.iq-dashboard-page .hub-sidebar .sidebar-link:hover,
html[data-theme="dark"] body.iq-dashboard-page .hub-sidebar .sidebar-link.is-active,
html[data-theme="dark"] body.iq-dashboard-page .hub-sidebar .hub-logout-btn:hover {
  background: var(--iq-surface-hover) !important;
  color: var(--iq-accent) !important;
}
html[data-theme="dark"] .iq-global-sidebar-link:hover,
html[data-theme="dark"] .iq-global-sidebar-link.is-active,
html[data-theme="dark"] .iq-global-module-slot button:hover,
html[data-theme="dark"] .iq-global-module-slot a:hover,
html[data-theme="dark"] .iq-global-module-slot button.active,
html[data-theme="dark"] .iq-global-module-slot button.is-active,
html[data-theme="dark"] .iq-global-sidebar-logout:hover {
  background: var(--iq-surface-hover) !important;
  color: var(--iq-accent) !important;
}

/* Dashboard, Aufgaben, Auswertungen and Einstellungen in the Hub shell. */
html[data-theme="dark"] body.iq-dashboard-page :is(
  .dashboard-search, .dashboard-week-control, .dashboard-filter-control,
  .dashboard-filter-button, .dashboard-advanced-filters, .dashboard-metric-card,
  .dashboard-analytics-card, .dashboard-overview-card, .dashboard-rail-card,
  .dashboard-table-card, .dashboard-line-card, .dashboard-location-card,
  .dashboard-messages-card, .dashboard-action-card, .dashboard-card-link
),
html[data-theme="dark"] body.iq-task-page :is(
  .task-reference-search, .task-quick-filters, .task-toolbar-button,
  .task-icon-button, .task-filter-panel, .task-columns-panel, .task-table-card,
  .task-detail-panel, .task-editor-dialog, .task-row-menu, .task-note-editor,
  .task-pagination button, .task-page-buttons, .task-reference-empty
),
html[data-theme="dark"] body.iq-analytics-page :is(
  .kpi-hero, .kpi-filter-bar, .kpi-card, .kpi-panel, .kpi-attendance-panel,
  .kpi-performance-panel, .kpi-trend-panel, .kpi-data-table-panel,
  .kpi-table-panel, .kpi-drilldown-panel, .kpi-segmented, .kpi-date-pill
),
html[data-theme="dark"] :is(.hub-task-center, .hub-kpi-center, .hub-report-center) :is(input, select, textarea) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.iq-task-page :is(.task-reference-table, .task-reference-table th, .task-reference-table td, .task-selection-bar),
html[data-theme="dark"] body.iq-analytics-page :is(.kpi-data-head, .kpi-data-row, .kpi-data-table),
html[data-theme="dark"] body.iq-dashboard-page :is(.dashboard-data-table, .dashboard-data-table th, .dashboard-data-table td) {
  border-color: var(--iq-border-subtle) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.iq-task-page .task-reference-table tbody tr:hover,
html[data-theme="dark"] body.iq-task-page .task-reference-table tbody tr.is-active,
html[data-theme="dark"] body.iq-dashboard-page .dashboard-data-table tbody tr:hover,
html[data-theme="dark"] body.iq-analytics-page .kpi-data-row:hover { background: var(--iq-surface-hover) !important; }
html[data-theme="dark"] :is(
  .hub-secondary-btn, .hub-task-row-actions button, .hub-task-list-meta span,
  .notification-btn i, .ghost, .hub-message
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] :is(.dashboard-title, .task-reference-title, .kpi-hero) :is(h1, h2, strong),
html[data-theme="dark"] body.iq-dashboard-page :is(.dashboard-metric-card, .dashboard-analytics-card, .dashboard-overview-card) :is(h2, h3, strong),
html[data-theme="dark"] body.iq-task-page :is(.task-kpi-card, .task-detail-panel, .task-editor-dialog) :is(h2, h3, strong),
html[data-theme="dark"] body.iq-analytics-page :is(.kpi-card, .kpi-panel) :is(h2, h3, strong) { color: var(--iq-text-primary) !important; }
html[data-theme="dark"] :is(.dashboard-reference-loading span, .task-reference-loading i, .report-reference-loading span) {
  border-color: var(--iq-border) !important;
  background: linear-gradient(100deg, #0b1b20 20%, #153139 45%, #0b1b20 70%) !important;
  background-size: 220% 100% !important;
}
html[data-theme="dark"] .dashboard-skeleton-grid i {
  border-color: var(--iq-border) !important;
  background: linear-gradient(90deg, #0b1b20 20%, #153139 45%, #0b1b20 70%) !important;
  background-size: 240% 100% !important;
}

/* Plantafel operational board, statistics, drawers and action panels. */
html[data-theme="dark"] body.iq-plantafel-page,
html[data-theme="dark"] body.iq-plantafel-page :is(.main-area, .board-shell, .management-panel, .advanced-view) {
  background: var(--iq-background) !important;
  color: var(--iq-text-primary) !important;
}

/* Plantafel dark-mode parity: the light reference page declares its own
   background token, so restore the global dark canvas at page scope first. */
html[data-theme="dark"] body.iq-plantafel-page {
  --iq-background: #061317;
  background-color: var(--iq-background) !important;
}
html[data-theme="dark"] .iq-global-sidebar-brand img {
  filter: none !important;
}
html[data-theme="dark"] .sidebar-logo-image.iq-theme-light-logo { display: none !important; }
.sidebar-logo-image.iq-theme-dark-logo { display: none !important; }
html[data-theme="dark"] .sidebar-logo-image.iq-theme-dark-logo {
  display: block !important;
  filter: none !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.content-panel, .top-header, .header-controls, .week-strip, .week-cards, .board-toolbar, .plantafel-workspace) {
  border-color: var(--iq-border-subtle) !important;
  background: transparent !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.page-heading h1, .board-toolbar-summary h2) {
  color: var(--iq-text-primary) !important;
  text-shadow: none !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.page-description, .board-toolbar-summary p) {
  color: var(--iq-text-secondary) !important;
  text-shadow: none !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.board-frame, .einsatzplanung-board, .month-planning-grid, .assignment-detail-panel) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.planning-day-column.day-column, .schedule-cell.day-column, .month-day) {
  border-color: var(--iq-border-subtle) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.planning-grid-header, .planning-day-header) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .planning-grid-header > div,
html[data-theme="dark"] body.iq-plantafel-page .planning-grid-header > div:first-child {
  border-color: var(--iq-border-subtle) !important;
  background: transparent !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.planning-grid-header strong, .planning-day-header strong) {
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.planning-grid-header span, .planning-day-header span, .planning-day-header small) {
  color: var(--iq-text-muted) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .planning-grid-header .today,
html[data-theme="dark"] body.iq-plantafel-page .planning-day-column.today .planning-day-header {
  background: var(--iq-accent-soft) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .board-shift {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-floating) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .month-day button {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .assignment-card.schedule-card {
  color: var(--iq-text-primary) !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .2) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card.type-service {
  --assignment-bg: rgba(85, 167, 255, .13);
  --assignment-border: rgba(85, 167, 255, .34);
  --assignment-accent: #79bdff;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card.type-analysis {
  --assignment-bg: rgba(66, 214, 160, .13);
  --assignment-border: rgba(66, 214, 160, .32);
  --assignment-accent: #65e1b2;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card.type-cleaning {
  --assignment-bg: rgba(239, 184, 79, .14);
  --assignment-border: rgba(239, 184, 79, .34);
  --assignment-accent: #f5c769;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card.type-project {
  --assignment-bg: rgba(173, 131, 255, .14);
  --assignment-border: rgba(173, 131, 255, .34);
  --assignment-accent: #bea0ff;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card.type-report {
  --assignment-bg: rgba(54, 205, 226, .13);
  --assignment-border: rgba(54, 205, 226, .32);
  --assignment-accent: #64d9e9;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card.type-overdue {
  --assignment-bg: rgba(255, 113, 128, .14);
  --assignment-border: rgba(255, 113, 128, .36);
  --assignment-accent: #ff8995;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.schedule-card-title strong, .schedule-card-time, .schedule-card-employee) {
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.schedule-card-title small, .schedule-card-menu) {
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card-icon {
  background: var(--iq-surface-secondary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page .schedule-card-menu:hover {
  background: var(--iq-surface-hover) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(
  .sidebar-employees, .sidebar-employee, .user-card, .week-nav, .week-card,
  .filter-bar, .management-card, .checkbox-field, .stat-card, .util-row,
  .ranking-row, .activity-row, .free-row, .kw-card, .day-column,
  .publish-summary div, .test-email-row, .entry-drawer, .toggle-row,
  .day-picker-options span, .schedule-card-actions, .planning-side-panel,
  .panel-header, .panel-item, .copy-preview-list > div, .suggestion-list > article,
  .planning-template-form, .planning-confirm-summary, .planning-template-summary
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(
  .icon-button, .ghost-button, .control-select, .autosave-status,
  .secondary-button, .hub-return, .danger-button, .add-day-button,
  .task-badge, .assignment-delete-button, .empty-add-button
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(input, select, textarea) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] body.iq-plantafel-page :is(.week-card, .day-column, .month-day, .planning-group-row).today,
html[data-theme="dark"] body.iq-plantafel-page :is(.schedule-cell, .planning-day-column).today { background: var(--iq-accent-soft) !important; }
html[data-theme="dark"] body.iq-plantafel-page .toggle-control::after { background: #d9f5f2 !important; }

/* Personalplanung, central employee management and customer management. */
html[data-theme="dark"] body.personal-reference-page :is(
  .personnel-global-search, .personnel-tabs, .personnel-tabs button.is-active,
  .personnel-week-selector, .personnel-location-select, .personnel-filter-button,
  .personnel-filter-popover, .personnel-metric-card, .personnel-card,
  .card, .table-card, .planning-panel, .personnel-grid-head,
  .personnel-employee-cell, .personnel-shift-cell, .personnel-card-link,
  .personnel-detail-drawer, .personnel-detail-drawer > header button,
  .employee-status-tabs, .employee-status-tabs button.is-active b,
  .employee-search-field, .employee-search-field button, .employee-metric-card,
  .employee-directory-card, .employee-reference-table, .employee-reference-table tbody tr,
  .employee-edit-button, .customer-tabs, .customer-week-select,
  .customer-filter-button, .customer-view-toggle, .customer-filter-panel,
  .customer-metric-card, .customer-analytics-card, .customer-directory-card,
  .customer-aside-card, .customer-card-link, .customer-grid-card,
  .customer-pagination button, .customer-pagination select,
  .customer-quick-actions > button, .modal
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.personal-reference-page :is(
  .personnel-global-search kbd, .employee-status-tabs button b,
  .employee-role-chip, .employee-role-chip.is-unassigned,
  .personnel-drawer-person, .customer-filter-panel select,
  .customer-filter-panel button, .modal-head, .modal-body, .modal-actions,
  .modal form, .modal-head .icon-button
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.personal-reference-page :is(
  .employee-reference-table th, .employee-reference-table td,
  .customer-reference-table th, .customer-reference-table td
) {
  border-color: var(--iq-border-subtle) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.personal-reference-page :is(.employee-reference-table, .customer-reference-table) tbody tr:hover,
html[data-theme="dark"] body.personal-reference-page .personnel-shift-cell.is-weekend { background: var(--iq-surface-hover) !important; }
html[data-theme="dark"] body.personal-reference-page :is(
  .personnel-metric-card span, .employee-metric-card span,
  .personnel-employee-copy strong, .personnel-absence-list strong,
  .personnel-utilization-legend b, .employee-code, .employee-workplace,
  .employee-directory-header h2, .customer-reference-table strong
) { color: var(--iq-text-primary) !important; }
html[data-theme="dark"] body.personal-reference-page :is(
  .personnel-employee-copy span, .personnel-open-list small,
  .personnel-absence-list b, .employee-cell-secondary,
  .customer-reference-table small
) { color: var(--iq-text-secondary) !important; }
html[data-theme="dark"] body.personal-reference-page .personnel-shift-block.shift-early { border-color: rgba(85,167,255,.32) !important; background: var(--iq-info-soft) !important; color: #8fc5ff !important; }
html[data-theme="dark"] body.personal-reference-page .personnel-shift-block.shift-late { border-color: rgba(66,214,160,.3) !important; background: var(--iq-success-soft) !important; color: #7ce5bc !important; }
html[data-theme="dark"] body.personal-reference-page .personnel-shift-block.shift-night { border-color: rgba(173,131,255,.32) !important; background: var(--iq-violet-soft) !important; color: #c8adff !important; }
html[data-theme="dark"] body.personal-reference-page :is(.personnel-donut::before, .customer-donut::after) { background: var(--iq-surface) !important; }
html[data-theme="dark"] body.personal-reference-page :is(.personnel-skeleton-kpis i, .personnel-skeleton-main i) {
  background: linear-gradient(90deg, #0b1b20 20%, #153139 50%, #0b1b20 80%) !important;
}

/* Wochenbericht overview, legacy report table, missing reports and analytics. */
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) > main,
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(#wbReferenceOverview, #reportTableSection, .wb-admin-reference-view) {
  background: var(--wb-bg) !important;
  color: var(--wb-text) !important;
}
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(
  .wb-kpi-card, .wb-card, .wb-reference-panel, .wb-day-entry-list,
  #reportTableHeader, .weekly-report-scroll, .weekly-report-table,
  .wb-admin-summary > div, .wb-admin-card, .wb-analytics-kpi,
  .wb-admin-reference-view .empty-state, .wb-admin-empty-state,
  #missingReportsList .missing-report-card
) {
  border-color: var(--wb-border) !important;
  background: var(--wb-surface) !important;
  color: var(--wb-text) !important;
  box-shadow: var(--wb-shadow) !important;
}
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(
  .weekly-report-table th, .weekly-report-table td,
  .wb-compact-table, .wb-compact-table th, .wb-compact-table td,
  .wb-admin-table, .wb-admin-table thead, .wb-admin-table thead tr,
  .wb-admin-table th, .wb-admin-table td, .wb-day-expanded-row td
) {
  border-color: var(--wb-border-soft) !important;
  background: var(--wb-surface) !important;
  color: var(--wb-text-secondary) !important;
}
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(
  .weekly-report-table tbody tr:hover td, .wb-admin-table tbody tr:hover td
) { background: var(--iq-surface-hover) !important; }
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(
  .weekly-report-table select, .wb-admin-field select, .wb-admin-button,
  .missing-report-count-badge, #missingReportsList .kw-chip, .wb-status,
  input, select, textarea
) {
  border-color: var(--wb-border) !important;
  background: var(--wb-surface-soft) !important;
  color: var(--wb-text-secondary) !important;
}
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(.wb-donut::before, #wbReferenceOverview .wb-donut::before) { background: var(--wb-surface) !important; box-shadow: inset 0 0 0 1px var(--wb-border) !important; }
html[data-theme="dark"] body.enterprise-wochenbericht-v2:not(.mobile-timer-active) :is(#refreshMissingReportsBtn.wb-admin-button:hover, #refreshCategoryTableBtn.wb-admin-button:hover) {
  border-color: var(--wb-border) !important;
  background: var(--iq-surface-hover) !important;
  color: var(--wb-blue) !important;
}

/* Wochenbericht employee/mobile experience follows the same saved theme. */
html[data-theme="dark"] body.mobile-timer-active :is(
  .mobile-phone-shell:not(.is-running), .mobile-active-timer.idle,
  .mobile-overview-card, .mobile-task-stack, .mobile-day-summary-card,
  .mobile-task-card, .mobile-entry-row, .mobile-bottom-nav,
  .mobile-bottom-nav .mobile-fab, #mobileTimerTarget, #mobileTimerNote,
  .mobile-section-toggle strong
) {
  border-color: var(--dash-border) !important;
  background: var(--dash-surface-strong) !important;
  color: var(--dash-text) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.mobile-timer-active .mobile-phone-shell:not(.is-running) {
  background:
    radial-gradient(circle at 50% 21%, rgba(34, 199, 187, .12), transparent 34%),
    linear-gradient(180deg, #061317 0%, #08191e 58%, #041014 100%) !important;
}
html[data-theme="dark"] body.mobile-timer-active :is(
  .mobile-overview-icon, #mobileYearBalance, .mobile-section-toggle,
  .mobile-task-card strong, .mobile-entry-row strong, .mobile-task-card::after,
  #mobileTimerValue, .mobile-active-timer h3, .mobile-progress-ring-inner
) { color: var(--dash-text) !important; }
html[data-theme="dark"] body.mobile-timer-active :is(.mobile-task-card span, .mobile-task-card small, .mobile-entry-row span) { color: var(--dash-ink-soft) !important; }
html[data-theme="dark"] body.mobile-timer-active .mobile-section-toggle { background: transparent !important; }
html[data-theme="dark"] body.mobile-timer-active .mobile-bottom-nav button { color: var(--dash-text) !important; }

/* Zeiterfassung: every tab, timeline, form and transient surface. */
html[data-theme="dark"] body.time-reference-page :is(
  .time-search, .time-tabs, .time-tab.active, .time-more-views > div,
  .time-date-select, .time-arrow-group, .time-arrow-group button,
  .time-report-button, .time-entry-card, .time-week-metric,
  .time-select-button, .time-card-link, .time-quick-actions button,
  .timeline-item, .team-item, .task-item, .plan-item, .time-badge,
  .team-timeline-scroll, .timeline-axis-row, .team-timeline-row,
  .timeline-employee-head, .timeline-employee, .timeline-axis,
  .timeline-track, .time-dialog, .time-dialog .dialog-head,
  .time-dialog .dialog-body, .time-dialog .dialog-actions, .toast
) {
  border-color: var(--time-border) !important;
  background: var(--time-surface) !important;
  color: var(--time-text) !important;
  box-shadow: var(--time-shadow) !important;
}
html[data-theme="dark"] body.time-reference-page :is(
  .time-search kbd, .time-entry-table th, .time-entry-table td,
  .time-entry-table tfoot th, .time-entry-badge.other,
  .time-week-day.selected, .timeline-date-controls button,
  .timeline-date-controls input, .timeline-date-controls select,
  .time-dialog input, .time-dialog select, .time-dialog textarea
) {
  border-color: var(--time-border) !important;
  background: var(--time-surface) !important;
  color: var(--time-text-soft) !important;
}
html[data-theme="dark"] body.time-reference-page :is(
  .time-tab:hover, .time-more-views button:hover, .time-arrow-group button:hover,
  .time-entry-table tbody tr:hover, .time-card-link:hover
) { background: var(--iq-surface-hover) !important; }

/* Urlaubsplaner calendar, lists, dialogs, drawer and toast. */
html[data-theme="dark"] body.iq-leave-page :is(
  .leave-global-search, .leave-calendar-viewport, .leave-timeline-header,
  .leave-timeline-employee, .leave-data-table th, .leave-data-table td,
  .leave-table-action, .leave-card-link, .leave-outline-link,
  .leave-request-card, .leave-dialog, .leave-dialog-close,
  .leave-dialog-actions, .leave-detail-panel, .leave-detail-header,
  .leave-toast
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.iq-leave-page :is(.leave-data-table tbody tr:hover td, .leave-table-action:hover, .leave-card-link:hover) { background: var(--iq-surface-hover) !important; }
html[data-theme="dark"] body.iq-leave-page :is(
  .leave-timeline, .leave-timeline-employee-head, .leave-month-label,
  .leave-week-label, .leave-calendar-legend, .leave-data-table,
  .leave-next-item, .leave-chart-legend-row, .leave-peak-item,
  .leave-request-card p, .leave-detail-grid dd, .leave-audit-item
) { color: var(--iq-text-secondary) !important; }
html[data-theme="dark"] body.iq-leave-page :is(
  .leave-timeline-employee strong, .leave-next-item strong,
  .leave-chart-legend-row strong, .leave-peak-item strong,
  .leave-request-card h3, .leave-detail-section h3,
  .leave-audit-item strong
) { color: var(--iq-text-primary) !important; }
html[data-theme="dark"] body.iq-leave-page .leave-donut::before { background: var(--iq-surface) !important; }
html[data-theme="dark"] body.iq-leave-page .leave-toast.is-error { background: var(--iq-danger-soft) !important; color: var(--iq-danger) !important; }
html[data-theme="dark"] body.iq-leave-page .leave-skeleton::after { background: linear-gradient(90deg, transparent, rgba(148,202,211,.12), transparent) !important; }
html[data-theme="dark"] body.iq-leave-page :is(.leave-absence-block.pending, .leave-absence-block.question) { border-color: rgba(239,184,79,.34) !important; background: var(--iq-warning-soft) !important; color: #f4c96f !important; }
html[data-theme="dark"] body.iq-leave-page .leave-absence-block.rejected { border-color: rgba(255,113,128,.34) !important; background: var(--iq-danger-soft) !important; color: #ff9ba5 !important; }
html[data-theme="dark"] body.iq-leave-page :is(.leave-absence-block.withdrawn, .leave-status-badge.withdrawn) { border-color: var(--iq-border) !important; background: var(--iq-surface-secondary) !important; color: var(--iq-text-muted) !important; }

/* Rapporte and Kalkulation DL. */
html[data-theme="dark"] body.iq-report-page :is(
  .report-search, .report-search kbd, .report-tabs,
  .report-tabs button.is-active, .report-filter-panel,
  .report-filter-panel select, .report-metric-card, .report-card,
  .report-analysis-card, .report-table-card, .report-aside-card,
  .report-card-link, .report-table-sort select, .report-table-footer button,
  .report-table-footer select, .report-detail-drawer,
  .report-detail-drawer header button, .report-detail-drawer textarea
) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-primary) !important;
  box-shadow: var(--iq-shadow-card) !important;
}
html[data-theme="dark"] body.iq-report-page :is(.report-data-table th, .report-data-table td) {
  border-color: var(--iq-border-subtle) !important;
  background: var(--iq-surface) !important;
  color: var(--iq-text-secondary) !important;
}
html[data-theme="dark"] body.iq-report-page .report-data-table tbody tr:hover { background: var(--iq-surface-hover) !important; }
html[data-theme="dark"] body.iq-report-page .report-donut::after { background: var(--iq-surface) !important; }
html[data-theme="dark"] body.iq-kalkulation-page :is(.kdl-action-card, .finance, .calculation-preview) {
  border-color: var(--iq-border) !important;
  background: var(--iq-surface-secondary) !important;
  color: var(--iq-text-primary) !important;
}
html[data-theme="dark"] body.iq-kalkulation-page .kdl-action-card.danger { background: var(--iq-danger-soft) !important; }
html[data-theme="dark"] body.iq-kalkulation-page .kdl-action-card.info { background: var(--iq-info-soft) !important; }
html[data-theme="dark"] body.iq-kalkulation-page .finance { background: var(--iq-success-soft) !important; }

@media (forced-colors: active) {
  html[data-theme="dark"] :is(.iq-global-sidebar, .iq-card, .modal, dialog) { border: 1px solid CanvasText !important; }
}
