/*
 * RedRay admin visual layer.
 * CSS-only and intentionally isolated: no business logic, links, roles or
 * JavaScript behavior are changed. Remove the stylesheet include to roll back.
 */

:root {
  --rr-bg: #f4f2ee;
  --rr-surface: #ffffff;
  --rr-ink: #17191e;
  --rr-muted: #727782;
  --rr-line: #e7e4df;
  --rr-sidebar: #17191e;
  --rr-sidebar-soft: #252830;
  --rr-red: #ed2f2f;
  --rr-red-dark: #cf2020;
  --rr-red-soft: #fdeaea;
  --rr-green: #148a65;
  --rr-green-soft: #e6f5ef;
  --rr-amber: #b86a08;
  --rr-amber-soft: #fff0d7;
  --rr-blue: #2767c7;
  --rr-blue-soft: #e8f0fc;
  --rr-radius: 16px;
  --rr-shadow: 0 1px 2px rgba(23, 25, 30, .04), 0 10px 30px rgba(23, 25, 30, .045);
}

.rr-new-dashboard {
  display: block !important;
  max-width: 1540px;
  margin: 0 auto;
  padding: 26px 18px 52px;
}

.rr-legacy-dashboard {
  display: none !important;
}

.rrd-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.rrd-eyebrow {
  display: block;
  color: var(--rr-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  margin-bottom: 5px;
}

.rrd-heading h1 {
  color: var(--rr-ink);
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 800;
  letter-spacing: -1.1px;
  line-height: 1.08;
  margin: 0 0 7px;
}

.rrd-heading p {
  color: var(--rr-muted);
  font-size: 12px;
  margin: 0;
}

.rrd-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 11px;
  background: var(--rr-red);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 9px 22px rgba(237, 47, 47, .22);
}

.rrd-primary-action:hover {
  background: var(--rr-red-dark);
}

.rrd-attention {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  margin-bottom: 16px;
  border: 1px solid #f0d39e;
  border-radius: 13px;
  background: #fff8eb;
}

.rrd-attention-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: var(--rr-amber);
  color: #fff;
}

.rrd-attention-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.rrd-attention-copy strong {
  color: var(--rr-ink);
  font-size: 12px;
}

.rrd-attention-copy span {
  color: #8a6a3a;
  font-size: 10px;
}

.rrd-attention > a {
  color: var(--rr-amber) !important;
  font-size: 11px;
  font-weight: 700;
}

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

.rrd-kpi {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  min-height: 108px;
  padding: 17px;
  border: 1px solid var(--rr-line);
  border-radius: var(--rr-radius);
  background: #fff;
  box-shadow: var(--rr-shadow);
  color: var(--rr-ink) !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

a.rrd-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(23, 25, 30, .08);
}

.rrd-kpi-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  font-size: 17px;
}

.rrd-kpi-icon.blue { color: var(--rr-blue); background: var(--rr-blue-soft); }
.rrd-kpi-icon.green { color: var(--rr-green); background: var(--rr-green-soft); }
.rrd-kpi-icon.amber { color: var(--rr-amber); background: var(--rr-amber-soft); }
.rrd-kpi-icon.red { color: var(--rr-red); background: var(--rr-red-soft); }

.rrd-kpi-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.rrd-kpi-copy small {
  overflow: hidden;
  color: var(--rr-muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .45px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rrd-kpi-copy strong {
  overflow: hidden;
  color: var(--rr-ink);
  font-size: clamp(20px, 1.7vw, 28px);
  font-weight: 800;
  letter-spacing: -.7px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rrd-kpi-copy em {
  color: var(--rr-muted);
  font-size: 9px;
  font-style: normal;
}

.rrd-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.rrd-panel {
  overflow: hidden;
  border: 1px solid var(--rr-line);
  border-radius: var(--rr-radius);
  background: #fff;
  box-shadow: var(--rr-shadow);
}

.rrd-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #efede9;
}

.rrd-panel-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rrd-panel-head span {
  color: var(--rr-ink);
  font-size: 14px;
  font-weight: 800;
}

.rrd-panel-head small {
  color: var(--rr-muted);
  font-size: 9px;
}

.rrd-panel-head > a {
  padding: 7px 11px;
  border-radius: 9px;
  background: #f3f2ef;
  color: var(--rr-ink) !important;
  font-size: 9px;
  font-weight: 700;
}

.rrd-status-list {
  padding: 3px 20px;
}

.rrd-status-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid #f0efec;
  color: var(--rr-ink) !important;
}

.rrd-status-row:last-child { border-bottom: 0; }
.rrd-status-row:hover .rrd-status-name { color: var(--rr-red); }

.rrd-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.rrd-status-dot.amber { background: var(--rr-amber); }
.rrd-status-dot.blue { background: var(--rr-blue); }
.rrd-status-dot.green { background: var(--rr-green); }
.rrd-status-dot.red { background: var(--rr-red); }

.rrd-status-name { font-size: 11px; font-weight: 600; }
.rrd-status-row strong { font-size: 13px; }
.rrd-status-row i { color: #b6b7bb; font-size: 8px; }

.rrd-completion {
  padding: 14px 20px 18px;
  background: #faf9f7;
}

.rrd-completion > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--rr-muted);
  font-size: 9px;
  font-weight: 700;
}

.rrd-completion > div strong { color: var(--rr-red); }

.rrd-completion-track {
  overflow: hidden;
  height: 6px;
  margin-top: 8px;
  border-radius: 99px;
  background: #e9e7e2;
}

.rrd-completion-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rr-red), #ff6d60);
}

.rrd-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.rrd-action-grid a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f5f4f1;
  color: var(--rr-ink) !important;
  font-size: 10px;
  font-weight: 700;
}

.rrd-action-grid a:hover { background: var(--rr-red-soft); color: var(--rr-red) !important; }
.rrd-action-grid i { width: 17px; color: var(--rr-red); font-size: 14px; text-align: center; }

.rrd-finance-panel { margin-bottom: 14px; }

.rrd-finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 20px;
}

.rrd-finance-grid > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 4px 18px;
  border-right: 1px solid var(--rr-line);
}

.rrd-finance-grid > div:first-child { padding-left: 0; }
.rrd-finance-grid > div:last-child { border-right: 0; }
.rrd-finance-grid small { color: var(--rr-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.rrd-finance-grid strong { overflow: hidden; color: var(--rr-ink); font-size: clamp(15px, 1.25vw, 21px); text-overflow: ellipsis; white-space: nowrap; }

.rrd-finance-details {
  border-top: 1px solid var(--rr-line);
  background: #faf9f7;
}

.rrd-finance-details summary {
  padding: 12px 20px;
  color: var(--rr-muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.rrd-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 16px;
}

.rrd-detail-grid span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fff;
  color: var(--rr-muted);
  font-size: 9px;
}

.rrd-detail-grid strong { color: var(--rr-ink); }

.rrd-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 21px 0 10px;
}

.rrd-section-title span { color: var(--rr-ink); font-size: 14px; font-weight: 800; }
.rrd-section-title small { color: var(--rr-muted); font-size: 9px; }

.rrd-platform-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.rrd-platform-grid a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--rr-line);
  border-radius: 13px;
  background: #fff;
  color: var(--rr-ink) !important;
  box-shadow: var(--rr-shadow);
}

.rrd-platform-grid a:hover { border-color: #f4b9b9; }
.rrd-platform-grid i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--rr-red-soft); color: var(--rr-red); }
.rrd-platform-grid span { overflow: hidden; color: var(--rr-muted); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rrd-platform-grid strong { font-size: 14px; }

@media (max-width: 1250px) {
  .rrd-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrd-platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .rr-new-dashboard { padding: 20px 12px 62px; }
  .rrd-main-grid { grid-template-columns: 1fr; }
  .rrd-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .rrd-finance-grid > div:nth-child(2) { border-right: 0; }
}

@media (max-width: 575px) {
  .rrd-heading { align-items: flex-start; flex-direction: column; }
  .rrd-primary-action { width: 100%; justify-content: center; }
  .rrd-attention { align-items: flex-start; flex-wrap: wrap; }
  .rrd-attention > a { width: 100%; padding-left: 47px; }
  .rrd-kpi-grid, .rrd-finance-grid, .rrd-platform-grid { grid-template-columns: 1fr; }
  .rrd-finance-grid > div { padding: 8px 0; border-right: 0; border-bottom: 1px solid var(--rr-line); }
  .rrd-finance-grid > div:last-child { border-bottom: 0; }
  .rrd-detail-grid { grid-template-columns: 1fr; }
}

body {
  background: var(--rr-bg) !important;
  color: var(--rr-ink);
}

.page-wrapper.compact-wrapper .page-body-wrapper .page-body {
  background:
    radial-gradient(circle at 84% 4%, rgba(237, 47, 47, .055), transparent 27rem),
    var(--rr-bg) !important;
}

/* Header */
.page-wrapper.compact-wrapper .page-header,
.page-wrapper.compact-wrapper .page-header .header-wrapper {
  background: rgba(255, 255, 255, .94) !important;
  border-bottom: 1px solid var(--rr-line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px);
}

.page-header .header-wrapper .nav-right > ul > li,
.page-header .header-wrapper .nav-right > ul > li svg {
  color: var(--rr-ink) !important;
}

/* Existing sidebar structure, recolored without changing role visibility. */
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links {
  background: var(--rr-sidebar) !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper {
  border-right: 0 !important;
  box-shadow: 8px 0 28px rgba(23, 25, 30, .09) !important;
}

.sidebar-wrapper .logo-wrapper,
.sidebar-wrapper .logo-icon-wrapper {
  background: var(--rr-sidebar) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link span,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link svg,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link i {
  color: #b9bdc6 !important;
  stroke: #b9bdc6 !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link {
  border-radius: 10px !important;
  margin: 2px 12px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  transition: background-color .18s ease, color .18s ease !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link:hover,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link.active,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list.active > .sidebar-link {
  background: #302327 !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--rr-red) !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link:hover span,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link.active span,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list.active > .sidebar-link span,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link:hover svg,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-link.active svg,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list.active > .sidebar-link svg {
  color: #fff !important;
  stroke: #fff !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu {
  background: #1d2026 !important;
  border-radius: 10px !important;
  margin: 2px 12px 8px !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu a {
  color: #9da2ad !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu a:hover,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu a.active {
  color: #fff !important;
}

/* Dashboard visual system */
.db-dashboard {
  --db-card-bg: var(--rr-surface) !important;
  --db-overview-bg: #f4f3f0 !important;
  --db-text-primary: var(--rr-ink) !important;
  --db-text-secondary: var(--rr-muted) !important;
  padding-top: 22px !important;
  padding-bottom: 42px !important;
}

.db-page-title {
  color: var(--rr-ink) !important;
  font-size: clamp(23px, 2vw, 32px) !important;
  font-weight: 800 !important;
  letter-spacing: -.8px !important;
  margin: 0 0 18px !important;
}

.db-hero {
  position: relative;
  overflow: hidden;
  background: var(--rr-sidebar) !important;
  border: 1px solid rgba(255, 255, 255, .04) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 45px rgba(23, 25, 30, .14) !important;
  padding: 24px 26px !important;
  margin-bottom: 22px !important;
}

.db-hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 47, 47, .38), rgba(237, 47, 47, 0) 68%);
  pointer-events: none;
}

.db-hero-left,
.db-hero-right {
  position: relative;
  z-index: 1;
}

.db-hero-left h2 {
  color: #fff !important;
  font-size: clamp(18px, 1.6vw, 25px) !important;
  font-weight: 800 !important;
  letter-spacing: -.45px !important;
}

.db-hero-left p {
  color: #9fa4ae !important;
  font-size: 12px !important;
}

.db-hero-chip {
  min-width: 78px !important;
  background: rgba(255, 255, 255, .075) !important;
  border: 1px solid rgba(255, 255, 255, .11) !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}

.db-hero-chip-val {
  color: #fff !important;
  font-weight: 800 !important;
}

.db-hero-chip-lbl {
  color: #aeb2bc !important;
  letter-spacing: .45px !important;
}

.db-hero-btn {
  background: var(--rr-red) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 20px rgba(237, 47, 47, .24) !important;
}

.db-hero-btn:hover {
  background: var(--rr-red-dark) !important;
  transform: translateY(-1px);
}

.db-card,
.db-v-card,
.db-ps-box {
  background: var(--rr-surface) !important;
  border: 1px solid var(--rr-line) !important;
  border-radius: var(--rr-radius) !important;
  box-shadow: var(--rr-shadow) !important;
}

.db-card {
  padding: 22px !important;
}

.db-card-title,
.db-po-header,
.db-v-val,
.db-ps-val,
.db-os-val {
  color: var(--rr-ink) !important;
}

.db-card-title i,
.db-po-header i {
  color: var(--rr-red) !important;
}

.db-total-pill {
  background: var(--rr-red-soft) !important;
  color: var(--rr-red) !important;
  border: 0 !important;
}

.db-order-stats-grid {
  gap: 8px !important;
  padding: 12px 0 18px !important;
}

.db-os-item {
  border-right: 1px solid var(--rr-line);
}

.db-os-item:last-child {
  border-right: 0;
}

.db-os-icon {
  box-shadow: none !important;
}

.db-os-icon.orange {
  background: var(--rr-amber-soft) !important;
  color: var(--rr-amber) !important;
}

.db-os-icon.blue {
  background: var(--rr-blue-soft) !important;
  color: var(--rr-blue) !important;
}

.db-os-icon.red,
.db-v-icon.rose {
  background: var(--rr-red-soft) !important;
  color: var(--rr-red) !important;
}

.db-os-icon.green,
.db-v-icon.green,
.db-v-icon.teal {
  background: var(--rr-green-soft) !important;
  color: var(--rr-green) !important;
}

.db-progress-fill {
  background: linear-gradient(90deg, var(--rr-red), #ff6b5f) !important;
}

.db-progress-val {
  color: var(--rr-red) !important;
}

.db-payout-split {
  gap: 12px !important;
}

.db-ps-box {
  background: #f7f6f3 !important;
  box-shadow: none !important;
}

.db-v-card {
  transition: transform .18s ease, box-shadow .18s ease !important;
}

.db-v-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 32px rgba(23, 25, 30, .075) !important;
}

.db-v-icon.blue,
.db-v-icon.indigo,
.db-v-icon.purple,
.db-v-icon.cyan {
  background: var(--rr-red-soft) !important;
  color: var(--rr-red) !important;
}

.db-v-icon.orange {
  background: var(--rr-amber-soft) !important;
  color: var(--rr-amber) !important;
}

.db-po-header {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .1px !important;
  margin-top: 8px !important;
}

.db-po-grid {
  gap: 12px !important;
}

/* Tables and controls follow the same restrained visual language. */
.card,
.modern-report-card {
  border-color: var(--rr-line) !important;
  border-radius: var(--rr-radius) !important;
  box-shadow: var(--rr-shadow) !important;
}

.btn-primary,
.btn-modern-search {
  background: var(--rr-red) !important;
  border-color: var(--rr-red) !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-modern-search:hover {
  background: var(--rr-red-dark) !important;
  border-color: var(--rr-red-dark) !important;
}

.form-control:focus,
.modern-input:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--rr-red) !important;
  box-shadow: 0 0 0 3px rgba(237, 47, 47, .12) !important;
}

table.dataTable thead th,
.modern-data-table th {
  color: #5d626d !important;
  background: #f5f4f1 !important;
  border-bottom-color: var(--rr-line) !important;
}

.modern-data-table tbody tr:hover {
  background: #fff7f7 !important;
  box-shadow: inset 3px 0 0 var(--rr-red) !important;
}

@media (max-width: 1199px) {
  .db-hero {
    align-items: flex-start !important;
    gap: 18px !important;
  }

  .db-hero-right {
    width: 100%;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 767px) {
  .db-dashboard {
    padding: 16px 12px 30px !important;
  }

  .db-hero {
    padding: 20px !important;
  }

  .db-hero-chip {
    min-width: calc(50% - 6px) !important;
  }

  .db-hero-btn {
    width: 100%;
    justify-content: center;
  }

  .db-order-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .db-os-item:nth-child(2) {
    border-right: 0;
  }

  .db-payout-split {
    grid-template-columns: 1fr !important;
  }
}

/* Preserve the application's existing dark-mode behavior. */
body.dark-only .db-dashboard,
body.dark-only .page-wrapper.compact-wrapper .page-body-wrapper .page-body {
  background: #111319 !important;
}

/* Compact desktop pass: match the approved PDF proportions. */
@media (min-width: 901px) {
  .rr-new-dashboard { max-width: 1600px; padding: 14px 16px 38px; }
  .rrd-heading { align-items: center; margin-bottom: 11px; }
  .rrd-eyebrow { font-size: 8px; margin-bottom: 2px; }
  .rrd-heading h1 { font-size: clamp(24px, 1.85vw, 31px); margin-bottom: 3px; }
  .rrd-heading p { font-size: 9px; }
  .rrd-primary-action { padding: 9px 14px; border-radius: 9px; font-size: 10px; }

  .rrd-attention {
    gap: 10px;
    min-height: 43px;
    padding: 7px 12px;
    margin-bottom: 10px;
    border-radius: 11px;
  }
  .rrd-attention-icon { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; font-size: 11px; }
  .rrd-attention-copy strong { font-size: 10px; }
  .rrd-attention-copy span,
  .rrd-attention > a { font-size: 8px; }

  .rrd-kpi-grid { gap: 10px; margin-bottom: 10px; }
  .rrd-kpi { gap: 11px; min-height: 78px; padding: 11px 13px; border-radius: 13px; }
  .rrd-kpi-icon { width: 37px; height: 37px; flex-basis: 37px; border-radius: 10px; font-size: 13px; }
  .rrd-kpi-copy small { font-size: 6.5px; }
  .rrd-kpi-copy strong { font-size: clamp(18px, 1.45vw, 24px); line-height: 1.12; }
  .rrd-kpi-copy em { font-size: 7px; }

  .rrd-main-grid {
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr);
    gap: 10px;
    margin-bottom: 10px;
  }
  .rrd-panel { border-radius: 13px; }
  .rrd-panel-head { padding: 12px 15px 10px; }
  .rrd-panel-head span { font-size: 11px; }
  .rrd-panel-head small,
  .rrd-panel-head > a { font-size: 7px; }
  .rrd-panel-head > a { padding: 6px 9px; border-radius: 7px; }

  .rrd-status-list { padding: 1px 15px; }
  .rrd-status-row { min-height: 38px; gap: 9px; }
  .rrd-status-name { font-size: 9px; }
  .rrd-status-row strong { font-size: 11px; }
  .rrd-completion { padding: 8px 15px 10px; }
  .rrd-completion > div:first-child { font-size: 7px; }
  .rrd-completion-track { height: 4px; margin-top: 6px; }

  .rrd-action-grid { gap: 7px; padding: 11px; }
  .rrd-action-grid a { gap: 8px; min-height: 40px; padding: 7px 9px; border-radius: 9px; font-size: 8px; }
  .rrd-action-grid i { width: 14px; font-size: 11px; }

  .rrd-finance-panel { margin-bottom: 9px; }
  .rrd-finance-grid { padding: 11px 15px; }
  .rrd-finance-grid > div { gap: 1px; padding: 2px 14px; }
  .rrd-finance-grid small { font-size: 6.5px; }
  .rrd-finance-grid strong { font-size: clamp(14px, 1.05vw, 18px); }
  .rrd-finance-details summary { padding: 8px 15px; font-size: 7px; }

  .rrd-section-title { margin: 11px 0 7px; }
  .rrd-section-title span { font-size: 11px; }
  .rrd-section-title small { font-size: 7px; }
  .rrd-platform-grid { gap: 7px; }
  .rrd-platform-grid a {
    grid-template-columns: 25px minmax(0, 1fr) auto;
    gap: 7px;
    min-height: 48px;
    padding: 8px 9px;
    border-radius: 10px;
  }
  .rrd-platform-grid i { width: 25px; height: 25px; border-radius: 7px; font-size: 10px; }
  .rrd-platform-grid span { font-size: 7px; }
  .rrd-platform-grid strong { font-size: 11px; }
}

/* PDF sidebar concept: enabled only with the new admin theme. */
.rr-new-sidebar { display: block !important; }
.rr-new-sidebar + .rr-legacy-sidebar { display: none !important; }

body:has(.rr-new-sidebar) .page-wrapper.compact-wrapper .page-body-wrapper .page-body {
  margin-left: 248px !important;
  width: calc(100% - 248px) !important;
}

body:has(.rr-new-sidebar) .page-wrapper.compact-wrapper .page-header {
  margin-left: 248px !important;
  width: calc(100% - 248px) !important;
}

.rr-new-sidebar .rr-pdf-sidebar {
  width: 248px !important;
  background: #17191f !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
  box-shadow: 12px 0 35px rgba(19,24,34,.08) !important;
}

.rr-sidebar-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px 18px;
  color: #f8f8fa;
  font-family: "Montserrat", sans-serif;
}

.rr-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 8px 24px;
  color: #fff !important;
  text-decoration: none !important;
}

.rr-sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: #ef302f;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(239,48,47,.28);
}

.rr-sidebar-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.rr-sidebar-brand-name { font-size: 20px; font-weight: 900; letter-spacing: -.6px; }
.rr-sidebar-brand-role { margin-top: 5px; color: #767b86; font-size: 9px; font-weight: 800; letter-spacing: 2px; }

.rr-sidebar-search { position: relative; margin: 0 2px 23px; }
.rr-sidebar-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  color: #727783;
  font-size: 14px;
  transform: translateY(-50%);
}
.rr-sidebar-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 39px;
  border: 1px solid #2c2f37;
  border-radius: 10px;
  outline: none;
  background: #202229;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease;
}
.rr-sidebar-search input:focus { border-color: #ef302f; background: #24272f; }
.rr-sidebar-search input::placeholder { color: #747985; }

.rr-sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: #343740 transparent;
}
.rr-sidebar-group { margin-bottom: 19px; }
.rr-sidebar-group[hidden] { display: none !important; }
.rr-sidebar-label {
  display: block;
  margin: 0 12px 7px;
  color: #686d78;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.8px;
}

.rr-menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 39px;
  margin-bottom: 3px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #aaafb9 !important;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none !important;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.rr-menu-link i { width: 18px; color: #757b87; font-size: 15px; text-align: center; transition: color 150ms ease; }
.rr-menu-link:hover { background: #22252c; color: #fff !important; transform: translateX(2px); }
.rr-menu-link:hover i { color: #ef302f; }
.rr-menu-link.active {
  background: linear-gradient(90deg,rgba(239,48,47,.18),rgba(239,48,47,.04));
  color: #fff !important;
}
.rr-menu-link.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -2px;
  width: 3px;
  border-radius: 4px;
  background: #ef302f;
  content: "";
}
.rr-menu-link.active i { color: #ef302f; }

.rr-sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 13px;
  border: 1px solid #2b2e36;
  border-radius: 12px;
  background: #202229;
}
.rr-sidebar-user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #ef302f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.rr-sidebar-user-copy { display: flex; min-width: 0; flex-direction: column; }
.rr-sidebar-user-copy strong { overflow: hidden; color: #fff; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.rr-sidebar-user-copy span { margin-top: 3px; color: #737884; font-size: 9px; font-weight: 600; }

@media (max-width: 991px) {
  body:has(.rr-new-sidebar) .page-wrapper.compact-wrapper .page-body-wrapper .page-body,
  body:has(.rr-new-sidebar) .page-wrapper.compact-wrapper .page-header {
    width: 100% !important;
    margin-left: 0 !important;
  }
  .rr-new-sidebar .rr-pdf-sidebar { width: 248px !important; }
}
