:root {
  --reporting-burgundy: #3a0d16;
  --reporting-burgundy-deep: #170d12;
  --reporting-orange: #f24b22;
  --reporting-orange-dark: #d93b16;
  --reporting-ivory: #fbf8f2;
  --reporting-card: #fffdf9;
  --reporting-border: rgba(91, 69, 55, 0.16);
  --reporting-text: #191513;
  --reporting-muted: #716761;
  --reporting-shadow: 0 12px 34px rgba(45, 27, 20, 0.08), 0 2px 7px rgba(45, 27, 20, 0.05);
}

body[data-active-section="crm-dashboard"] #crmWorkspaceDashboardSection {
  display: none !important;
}

body[data-active-section="crm-dashboard"] #crmHeroPanel,
body[data-active-section="crm-dashboard"] #crmStatsGrid,
body[data-active-section="crm-dashboard"] #aiOpsDeck,
body[data-active-section="crm-dashboard"] #crmLiveAgentBoardPanel,
body[data-active-section="crm-dashboard"] #workspaceShellBar,
body[data-active-section="hrms-dashboard"] #workspaceShellBar,
body[data-active-section="vendor-dashboard"] #workspaceShellBar,
body[data-active-section="operations-dashboard"] #workspaceShellBar,
body[data-active-section="accounts-dashboard"] #workspaceShellBar,
body[data-active-section="admin-dashboard"] #workspaceShellBar {
  display: none !important;
}

#moduleDashboardSection.reporting-dashboard-active {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 16px;
  color: var(--reporting-text);
  background:
    radial-gradient(circle at 94% 2%, rgba(242, 75, 34, 0.055), transparent 25%),
    linear-gradient(145deg, #fffdf9 0%, var(--reporting-ivory) 100%);
  border: 1px solid rgba(133, 93, 67, 0.1);
  border-radius: 24px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9);
  isolation: isolate;
}

#moduleDashboardSection.reporting-dashboard-active > *,
.reporting-dashboard-active .module-dashboard-hero > *,
.reporting-title-row > *,
.reporting-filter-bar > *,
.reporting-dashboard-active .module-dashboard-widget-grid > *,
.reporting-overview-grid > * {
  min-width: 0;
  max-width: 100%;
}

#moduleDashboardSection.reporting-dashboard-active::after {
  position: absolute;
  top: 24px;
  right: 26px;
  z-index: -1;
  width: 160px;
  height: 72px;
  content: "";
  opacity: 0.3;
  border-top: 1px dashed rgba(242, 75, 34, 0.45);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.reporting-dashboard-active .module-dashboard-hero,
.reporting-dashboard-active .module-dashboard-audit-panel,
.reporting-dashboard-active .module-dashboard-detail-panel,
.reporting-dashboard-active .module-dashboard-card {
  margin: 0;
}

.reporting-dashboard-active .module-dashboard-hero {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.reporting-title-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 10%, rgba(255, 143, 76, 0.24), transparent 28%),
    linear-gradient(135deg, #2b1118 0%, #45151d 62%, #68231f 100%);
  border: 1px solid rgba(255, 183, 132, 0.18);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(50, 17, 24, 0.18);
}

.reporting-title-row::after {
  position: absolute;
  right: 22%;
  bottom: -44px;
  width: 240px;
  height: 92px;
  content: "";
  opacity: 0.45;
  border: 1px dashed rgba(255, 137, 80, 0.45);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}

.reporting-title-row .eyebrow,
.reporting-panel-head span,
.reporting-list-toolbar > div > span,
.reporting-drawer header span,
.reporting-builder-preview > span {
  display: block;
  margin: 0 0 3px;
  color: #c15438;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.reporting-title-row .eyebrow {
  color: #ffb17d;
}

.reporting-title-row h2 {
  margin: 0;
  color: #fffaf6;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.05;
}

.reporting-title-row p {
  margin: 5px 0 0;
  color: rgba(255, 241, 231, 0.72);
  font-size: 0.84rem;
}

.reporting-title-actions,
.reporting-filter-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.reporting-title-actions {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.reporting-title-actions label {
  min-width: 150px;
}

.reporting-title-actions select,
.reporting-filter-bar select,
.reporting-inline-select select,
.reporting-drawer input,
.reporting-drawer select {
  min-height: 42px;
  padding: 0 34px 0 12px;
  color: #2c2420;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  background-color: rgba(255, 253, 249, 0.94);
  border: 1px solid var(--reporting-border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(45, 27, 20, 0.04);
}

.reporting-title-actions select {
  width: 100%;
  color: #fff9f4;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 222, 201, 0.28);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.reporting-title-actions select option {
  color: #2c2420;
  background: #fffdf9;
}

.reporting-primary,
.reporting-title-actions .reporting-primary {
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--reporting-orange), #ff3a12);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(224, 60, 20, 0.22);
}

.reporting-primary:hover,
.reporting-primary:focus-visible {
  background: linear-gradient(135deg, #ff5d32, var(--reporting-orange-dark));
  box-shadow: 0 10px 24px rgba(224, 60, 20, 0.28);
  transform: translateY(-1px);
}

.reporting-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  width: min(360px, 100%);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--reporting-border);
  border-radius: 11px;
}

.reporting-view-tabs button {
  min-height: 38px;
  padding: 0 14px;
  color: #423731;
  font-size: 0.77rem;
  font-weight: 800;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--reporting-border);
}

.reporting-view-tabs button:last-child {
  border-right: 0;
}

.reporting-view-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--reporting-orange), #ff3c12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25);
}

.reporting-filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(120px, 0.8fr) minmax(150px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--reporting-border);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(45, 27, 20, 0.055);
}

.reporting-filter-bar label {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.reporting-filter-bar label > span {
  padding-left: 3px;
  color: var(--reporting-muted);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reporting-filter-bar select {
  width: 100%;
  min-width: 0;
}

.reporting-refresh {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 7px;
  color: var(--reporting-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.reporting-refresh i {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.09);
}

.reporting-filter-actions button,
.reporting-panel-head button,
.reporting-list-toolbar > button,
.reporting-secondary {
  min-height: 42px;
  padding: 0 12px;
  color: #453a34;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fffdfa;
  border: 1px solid var(--reporting-border);
  border-radius: 10px;
}

.reporting-filter-actions button:last-child {
  color: #fff;
  background: var(--reporting-orange);
  border-color: var(--reporting-orange);
}

.reporting-filter-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.reporting-helper,
.reporting-notice {
  margin: -3px 2px 0;
  color: var(--reporting-muted);
  font-size: 0.71rem;
}

.reporting-notice {
  padding: 8px 10px;
  color: #166534;
  font-weight: 700;
  background: #effcf2;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 9px;
}

.reporting-dashboard-active .module-dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
}

.reporting-kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 128px;
  padding: 14px 12px;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(155deg, #fff, var(--reporting-card));
  border: 1px solid var(--reporting-border);
  border-radius: 14px;
  box-shadow: var(--reporting-shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.reporting-kpi-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52px;
  height: 4px;
  content: "";
  background: currentColor;
  opacity: 0.42;
  border-radius: 6px 0 0;
}

.reporting-kpi-card:hover,
.reporting-kpi-card:focus-visible,
.reporting-bar-row:hover,
.reporting-action-list button:hover,
.reporting-table-row:hover,
.reporting-kanban-stack button:hover {
  z-index: 1;
  border-color: rgba(242, 75, 34, 0.38);
  box-shadow: 0 16px 34px rgba(45, 27, 20, 0.13);
  outline: none;
  transform: translateY(-2px);
}

.reporting-kpi-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #e7421d;
  font-size: 1.15rem;
  font-weight: 900;
  background: #fff0ea;
  border-radius: 50%;
}

.tone-healthy .reporting-kpi-icon { color: #16863d; background: #e8f7e9; }
.tone-warning .reporting-kpi-icon { color: #c96d06; background: #fff3dd; }
.tone-critical .reporting-kpi-icon { color: #dc2626; background: #fee8e6; }
.tone-info .reporting-kpi-icon { color: #245bd5; background: #e8efff; }

.reporting-kpi-copy {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding-top: 1px;
}

.reporting-kpi-title {
  min-height: 28px;
  overflow: hidden;
  color: #51453f;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.reporting-kpi-copy strong {
  overflow: hidden;
  color: #171311;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reporting-kpi-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--reporting-muted);
  font-size: 0.61rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reporting-info {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #685a52;
  font-size: 0.62rem;
  font-weight: 800;
  border: 1px solid rgba(91, 69, 55, 0.35);
  border-radius: 50%;
}

.reporting-chevron {
  position: absolute;
  right: 10px;
  bottom: 12px;
  color: #342a26;
  font-size: 1.3rem;
}

.reporting-dashboard-active .module-dashboard-detail-grid,
.reporting-dashboard-active .module-dashboard-detail-grid.module-dashboard-detail-grid-single {
  display: block;
  min-width: 0;
}

.reporting-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}

.reporting-panel {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid var(--reporting-border);
  border-radius: 16px;
  box-shadow: var(--reporting-shadow);
}

.reporting-panel-head,
.reporting-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 11px;
  border-bottom: 1px solid rgba(91, 69, 55, 0.11);
}

.reporting-panel-head h4,
.reporting-list-toolbar h4 {
  margin: 0;
  color: #201a17;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 0.98rem;
}

.reporting-panel-head button {
  min-height: 32px;
  color: #245bd5;
  background: transparent;
  border-color: transparent;
}

.reporting-bar-chart {
  display: grid;
  gap: 4px;
  padding: 11px 14px 15px;
}

.reporting-bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(120px, 1.4fr) auto 12px;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 5px 7px;
  color: #443832;
  font-size: 0.7rem;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: 150ms ease;
}

.reporting-bar-track {
  height: 12px;
  overflow: hidden;
  background: #eee7df;
  border-radius: 999px;
}

.reporting-bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2e6ee7, #6ba5ff);
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35);
}

.reporting-bar-row:nth-child(2n) .reporting-bar-track i { background: linear-gradient(90deg, #17a367, #62c994); }
.reporting-bar-row:nth-child(3n) .reporting-bar-track i { background: linear-gradient(90deg, #f28b18, #ffbd57); }
.reporting-bar-row:nth-child(4n) .reporting-bar-track i { background: linear-gradient(90deg, #7c3aed, #ae7cf5); }

.reporting-action-list {
  display: grid;
  padding: 8px 12px 13px;
}

.reporting-action-list button {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 10px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 5px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: rgba(91, 69, 55, 0.1);
  border-radius: 8px;
}

.reporting-action-list button:last-child { border-bottom-color: transparent; }
.reporting-action-list span { display: grid; gap: 2px; min-width: 0; }
.reporting-action-list strong { overflow: hidden; color: #2c2420; font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.reporting-action-list small { overflow: hidden; color: var(--reporting-muted); font-size: 0.62rem; text-overflow: ellipsis; white-space: nowrap; }
.reporting-action-list em { color: #51453f; font-size: 0.67rem; font-style: normal; font-weight: 800; }

.tone-dot {
  width: 7px;
  height: 7px;
  background: #2563eb;
  border-radius: 50%;
}
.tone-dot.tone-healthy { background: #16a34a; }
.tone-dot.tone-warning { background: #f59e0b; }
.tone-dot.tone-critical { background: #ef2b2b; }

.reporting-record-panel,
.reporting-kanban-panel {
  min-height: 360px;
}

.reporting-list-toolbar {
  flex-wrap: wrap;
}

.reporting-list-toolbar > strong {
  color: var(--reporting-muted);
  font-size: 0.7rem;
}

.reporting-search {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: min(280px, 100%);
  min-height: 42px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--reporting-border);
  border-radius: 10px;
}

.reporting-search input {
  width: 100%;
  min-width: 0;
  color: #211a17;
  font: inherit;
  font-size: 0.76rem;
  background: transparent;
  border: 0;
  outline: none;
}

.reporting-table {
  display: grid;
  padding: 0 12px 12px;
}

.reporting-table-head,
.reporting-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(120px, 1fr) minmax(110px, 0.8fr) minmax(90px, 0.7fr) minmax(110px, 0.8fr) 12px;
  align-items: center;
  gap: 10px;
}

.reporting-table-head {
  min-height: 38px;
  padding: 0 10px;
  color: var(--reporting-muted);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reporting-table-row {
  min-height: 58px;
  padding: 7px 10px;
  color: #4b403a;
  font-size: 0.68rem;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-top-color: rgba(91, 69, 55, 0.1);
  border-radius: 8px;
  transition: 150ms ease;
}

.reporting-table-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reporting-table-row strong,
.reporting-table-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reporting-table-row strong { color: #241d1a; font-size: 0.72rem; }
.reporting-table-row small { color: var(--reporting-muted); font-size: 0.6rem; }

.reporting-status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  color: #245bd5;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
  background: #eaf0ff;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
}
.reporting-status.tone-healthy { color: #16733b; background: #eaf8ed; border-color: rgba(22, 115, 59, 0.15); }
.reporting-status.tone-warning { color: #ae5e04; background: #fff5df; border-color: rgba(174, 94, 4, 0.15); }
.reporting-status.tone-critical { color: #c82020; background: #ffebe9; border-color: rgba(200, 32, 32, 0.15); }

.reporting-kanban-board {
  display: grid;
  grid-auto-columns: minmax(260px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.reporting-kanban-column {
  min-height: 290px;
  padding: 10px;
  background: rgba(239, 246, 255, 0.5);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-top: 3px solid #2563eb;
  border-radius: 13px;
  scroll-snap-align: start;
}
.reporting-kanban-column.tone-healthy { background: rgba(239, 252, 242, 0.65); border-color: rgba(22, 163, 74, 0.16); border-top-color: #16a34a; }
.reporting-kanban-column.tone-warning { background: rgba(255, 249, 235, 0.7); border-color: rgba(245, 158, 11, 0.18); border-top-color: #f59e0b; }
.reporting-kanban-column.tone-critical { background: rgba(255, 239, 237, 0.72); border-color: rgba(239, 43, 43, 0.18); border-top-color: #ef2b2b; }

.reporting-kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 35px;
  color: #342a26;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.reporting-kanban-head span { display: grid; place-items: center; min-width: 23px; height: 23px; color: #fff; background: #342a26; border-radius: 50%; }

.reporting-kanban-stack { display: grid; gap: 8px; }
.reporting-kanban-stack button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 11px;
  color: #302622;
  text-align: left;
  background: #fffefa;
  border: 1px solid var(--reporting-border);
  border-radius: 11px;
  box-shadow: 0 7px 17px rgba(45, 27, 20, 0.07);
  transition: 150ms ease;
}
.reporting-kanban-stack button > strong { font-size: 0.76rem; }
.reporting-kanban-stack button > small { color: var(--reporting-muted); font-size: 0.64rem; line-height: 1.35; }
.reporting-kanban-stack button > span { display: flex; justify-content: space-between; gap: 8px; color: #675950; font-size: 0.61rem; }
.reporting-kanban-stack em { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.reporting-swipe-hint { display: none; margin: 0 0 12px; color: var(--reporting-muted); font-size: 0.67rem; text-align: center; }

.reporting-inline-select {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--reporting-muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.reporting-dashboard-active .module-dashboard-audit-panel {
  padding: 10px 13px;
  background: rgba(255, 253, 249, 0.7);
  border: 1px dashed rgba(91, 69, 55, 0.2);
  border-radius: 12px;
  box-shadow: none;
}

.reporting-dashboard-active .module-dashboard-audit-panel .panel-header {
  display: none;
}

.reporting-dashboard-active .module-dashboard-ownership-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.reporting-dashboard-active .module-dashboard-ownership-list span {
  flex: 0 0 auto;
  color: var(--reporting-muted);
  font-size: 0.59rem;
  white-space: nowrap;
}

.reporting-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(28, 17, 16, 0.3);
  animation: reporting-fade 160ms ease;
}

.reporting-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 211;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(470px, 92vw);
  height: 100dvh;
  overflow: hidden;
  color: var(--reporting-text);
  background: linear-gradient(160deg, #fffefa, #fbf4eb);
  border-left: 1px solid rgba(91, 69, 55, 0.18);
  box-shadow: -20px 0 55px rgba(35, 19, 16, 0.2);
  animation: reporting-slide 220ms ease;
}

.reporting-drawer header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(58, 13, 22, 0.06), rgba(242, 75, 34, 0.035));
  border-bottom: 1px solid var(--reporting-border);
}
.reporting-drawer header h3 { margin: 0; font: 700 1.45rem/1.1 "Poppins", sans-serif; }
.reporting-drawer header p { margin: 6px 0 0; color: var(--reporting-muted); font-size: 0.74rem; line-height: 1.45; }
.reporting-drawer header > button { min-width: 38px; min-height: 38px; color: #40332e; font-size: 1.5rem; background: transparent; border: 1px solid var(--reporting-border); border-radius: 10px; }

.reporting-drawer form,
.reporting-detail-body {
  display: grid;
  align-content: start;
  gap: 17px;
  padding: 22px 24px;
  overflow-y: auto;
}

.reporting-drawer form > label,
.reporting-drawer fieldset,
.reporting-form-grid label {
  display: grid;
  gap: 7px;
  color: #4b3e38;
  font-size: 0.7rem;
  font-weight: 800;
}

.reporting-drawer input,
.reporting-drawer select { width: 100%; min-height: 46px; }
.reporting-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reporting-drawer fieldset { padding: 14px; border: 1px solid var(--reporting-border); border-radius: 12px; }
.reporting-drawer legend { padding: 0 6px; }

.reporting-metric-picker { display: grid; gap: 7px; }
.reporting-metric-picker label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 7px 9px; background: rgba(255,255,255,.72); border: 1px solid rgba(91,69,55,.1); border-radius: 9px; }
.reporting-metric-picker input { width: 17px; min-height: 17px; }
.reporting-metric-picker strong { font-size: 0.7rem; }

.reporting-builder-preview,
.reporting-detail-value {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--reporting-border);
  border-radius: 12px;
}
.reporting-builder-preview strong { font-size: 0.78rem; }
.reporting-builder-preview small { color: var(--reporting-muted); font-size: 0.65rem; line-height: 1.4; }

.reporting-drawer footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: rgba(255, 253, 249, 0.96);
  border-top: 1px solid var(--reporting-border);
}

.reporting-drawer form > footer { margin: 0 -24px -22px; }

.reporting-detail-value > span { color: var(--reporting-muted); font-size: 0.68rem; }
.reporting-detail-value > strong { font: 700 2rem/1 "Poppins", sans-serif; }
.reporting-detail-body dl { display: grid; gap: 0; margin: 0; border: 1px solid var(--reporting-border); border-radius: 12px; }
.reporting-detail-body dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px; border-bottom: 1px solid rgba(91,69,55,.1); }
.reporting-detail-body dl div:last-child { border-bottom: 0; }
.reporting-detail-body dt { color: var(--reporting-muted); font-size: 0.65rem; font-weight: 800; }
.reporting-detail-body dd { margin: 0; color: #382e29; font-size: 0.7rem; line-height: 1.45; }

.reporting-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 28px;
  color: var(--reporting-muted);
  font-size: 0.78rem;
  text-align: center;
}

@keyframes reporting-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes reporting-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1380px) {
  .reporting-dashboard-active .module-dashboard-widget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reporting-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reporting-refresh { grid-column: 1; }
  .reporting-filter-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .reporting-table-head,
  .reporting-table-row { grid-template-columns: minmax(180px, 1.5fr) minmax(110px, 1fr) minmax(110px, .8fr) minmax(100px, .8fr) 12px; }
  .reporting-table-head > span:nth-child(4),
  .reporting-table-row > span:nth-child(4) { display: none; }
}

@media (max-width: 760px) {
  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    top: 8px;
    min-height: 68px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar .topbar-brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow: hidden;
  }

  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar .topbar-brand .eyebrow,
  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar .topbar-profile,
  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar #workspaceBackButton {
    display: none !important;
  }

  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar .topbar-brand h2 {
    overflow: hidden;
    font-size: clamp(1rem, 4.5vw, 1.2rem);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar .topbar-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
  }

  body:is(
    [data-active-section="crm-dashboard"],
    [data-active-section="hrms-dashboard"],
    [data-active-section="vendor-dashboard"],
    [data-active-section="operations-dashboard"],
    [data-active-section="accounts-dashboard"],
    [data-active-section="admin-dashboard"]
  ) .dashboard-main > .topbar .mobile-nav-toggle {
    width: 46px;
    height: 46px;
  }

  #moduleDashboardSection.reporting-dashboard-active {
    gap: 12px;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
  }

  .reporting-title-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 16px; }
  .reporting-title-row h2 { font-size: 1.5rem; }
  .reporting-title-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
  .reporting-title-actions label,
  .reporting-title-actions select,
  .reporting-title-actions button { width: 100%; }

  .reporting-view-tabs { width: 100%; }
  .reporting-view-tabs button { min-height: 46px; }

  .reporting-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .reporting-filter-bar label:first-child { grid-column: 1 / -1; }
  .reporting-filter-bar select { min-height: 46px; }
  .reporting-refresh { grid-column: 1; }
  .reporting-filter-actions { display: grid; grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reporting-filter-actions button { min-height: 46px; padding: 0 8px; font-size: 0.66rem; }
  .reporting-filter-actions button:last-child { display: none; }

  .reporting-dashboard-active .module-dashboard-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .reporting-kpi-card { grid-template-columns: 38px minmax(0, 1fr); min-height: 125px; padding: 13px 10px; }
  .reporting-kpi-copy strong { font-size: 1.35rem; }

  .reporting-overview-grid { grid-template-columns: 1fr; }
  .reporting-panel-head { align-items: flex-start; }
  .reporting-bar-row { grid-template-columns: minmax(92px, .8fr) minmax(80px, 1fr) auto 10px; gap: 7px; }

  .reporting-list-toolbar { align-items: stretch; }
  .reporting-list-toolbar > div { width: 100%; }
  .reporting-search { min-width: 0; flex: 1 1 180px; }
  .reporting-table-head { display: none; }
  .reporting-table { gap: 8px; padding-top: 10px; }
  .reporting-table-row {
    grid-template-columns: minmax(0, 1fr) auto 12px;
    gap: 8px;
    min-height: 88px;
    padding: 11px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--reporting-border);
  }
  .reporting-table-row > span:nth-child(2),
  .reporting-table-row > span:nth-child(4) { display: none; }
  .reporting-table-row > span:nth-child(3) { grid-column: 1; }
  .reporting-table-row > span:nth-child(5) { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .reporting-table-row > b { grid-column: 3; grid-row: 1 / span 2; }

  .reporting-kanban-board { grid-auto-columns: calc(100vw - 64px); }
  .reporting-swipe-hint { display: block; }
  .reporting-kanban-stack button { min-height: 104px; }

  .reporting-dashboard-active .module-dashboard-audit-panel { display: none; }
  .reporting-drawer { width: 100vw; }
  .reporting-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .reporting-filter-bar { grid-template-columns: 1fr; }
  .reporting-filter-bar label:first-child,
  .reporting-refresh,
  .reporting-filter-actions { grid-column: 1; }
  .reporting-filter-actions { grid-template-columns: 1fr 1fr; }
  .reporting-kpi-card { grid-template-columns: 32px minmax(0, 1fr); min-height: 118px; padding: 11px 8px; }
  .reporting-kpi-icon { width: 32px; height: 32px; font-size: .95rem; }
  .reporting-kpi-title { font-size: .62rem; }
  .reporting-kpi-copy strong { font-size: 1.12rem; }
  .reporting-kpi-copy small { font-size: .56rem; }
  .reporting-title-actions { grid-template-columns: 1fr; }
}
