/* RDM Sales Manager overlay — Dashboard tab only. Isolated RDM Hub. */
html[data-rdm-sales-dash="1"] .shell-workbench,
html[data-rdm-sales-dash="1"] .shell-inspector {
  display: none !important;
}
html[data-rdm-sales-dash="1"] .shell-body {
  grid-template-columns: var(--rail-width) minmax(0, 1fr) !important;
}
html[data-rdm-sales-dash="1"] #shell-ops {
  grid-column: 2 / -1;
}

.rdm-sales-dash {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 28px;
  background:
    radial-gradient(1200px 480px at 0% 0%, rgba(14, 165, 233, 0.08), transparent 55%),
    #0b1017;
  color: #e8eef6;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.rdm-sales-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.rdm-sales-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 720;
  letter-spacing: 0.01em;
}
.rdm-sales-head p {
  margin: 4px 0 0;
  color: #93a4bb;
  font-size: 12px;
}
.rdm-sales-asof {
  color: #7d8ea3;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rdm-sales-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.rdm-kpi {
  background: #141c27;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 14px 16px 12px;
  min-height: 92px;
}
.rdm-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fb0c5;
  line-height: 1.35;
  min-height: 2.6em;
}
.rdm-kpi-value {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 750;
  color: #7dd3fc;
  letter-spacing: -0.02em;
}
.rdm-kpi--warn .rdm-kpi-value { color: #fbbf24; }
.rdm-kpi--alert .rdm-kpi-value { color: #fb7185; }

.rdm-sales-people {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.rdm-sp {
  background: #141c27;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.rdm-sp h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.rdm-sp table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.rdm-sp td {
  padding: 3px 0;
  color: #c5d0dc;
}
.rdm-sp td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #f1f5f9;
  font-weight: 650;
}

.rdm-sales-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rdm-chart {
  background: #141c27;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 12px 14px 14px;
  min-height: 220px;
}
.rdm-chart h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
}
.rdm-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
}
.rdm-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}
.rdm-bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  height: 132px;
  justify-content: flex-start;
}
.rdm-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: #38bdf8;
  min-height: 0;
}
.rdm-bar-label {
  margin-top: 4px;
  font-size: 10px;
  color: #8b9cb0;
}
.rdm-hbar {
  display: grid;
  grid-template-columns: minmax(88px, 34%) 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  font-size: 12px;
}
.rdm-hbar-name {
  color: #dbe7f3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rdm-hbar-track {
  height: 10px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.rdm-hbar-fill {
  height: 100%;
  background: #22d3ee;
  border-radius: 99px;
}
.rdm-hbar-val {
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
  font-weight: 650;
}
.rdm-sales-note {
  margin: 12px 0 0;
  font-size: 11px;
  color: #7d8ea3;
  line-height: 1.45;
}
.rdm-sales-error {
  padding: 18px;
  color: #fecaca;
}
.rdm-sales-loading {
  padding: 28px 8px;
  color: #93a4bb;
}

@media (max-width: 1100px) {
  .rdm-sales-kpis,
  .rdm-sales-people,
  .rdm-sales-charts {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .rdm-sales-kpis,
  .rdm-sales-people,
  .rdm-sales-charts {
    grid-template-columns: 1fr;
  }
}

html[data-rdm-sales-dash="1"] .shell-tab-rail,
html[data-rdm-sales-dash="1"] .hub-next-rail-mounted {
  z-index: 30;
  position: relative;
  pointer-events: auto;
}
