@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  --brand-purple: #7c5ad6;
  --brand-purple-dark: #4b2a84;
  --brand-purple-soft: #f4edff;
  --brand-green: #41b883;
  --brand-green-dark: #2f8e68;
  --brand-green-soft: #e9fbf3;
  --surface: #ffffff;
  --text-primary: #2d2441;
  --text-muted: #6c6580;
  --text-light: rgba(255, 255, 255, 0.84);
  --border-soft: rgba(124, 90, 214, 0.12);
  --shadow-soft: 0 20px 45px rgba(75, 42, 132, 0.12);
  --shadow-hero: 0 28px 60px rgba(59, 31, 104, 0.28);
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

body.rm-theme,
body.rm-auth-page {
  font-family: 'Prompt', 'Sarabun', Tahoma, sans-serif;
  color: var(--text-primary);
}

body.rm-theme {
  --rm-sidebar-width: 270px;
  background:
    radial-gradient(circle at top right, rgba(65, 184, 131, 0.15), transparent 28%),
    radial-gradient(circle at top left, rgba(124, 90, 214, 0.18), transparent 32%),
    linear-gradient(180deg, #f7f5fd 0%, #eef8f3 100%);
}

body.rm-theme #main-content,
body.rm-theme .wrapper {
  background: transparent;
}

body.rm-theme .wrapper {
  padding: 28px 28px 44px;
}

body.rm-theme .header.dark-bg {
  background: linear-gradient(135deg, #4b2a84 0%, #7c5ad6 58%, #41b883 100%);
  border-bottom: 0;
  box-shadow: 0 12px 35px rgba(52, 34, 94, 0.28);
}

body.rm-theme .header .logo {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.03em;
}

body.rm-theme .header .logo .lite {
  color: #d8ffeb;
}

body.rm-theme .toggle-nav .icon-reorder,
body.rm-theme .top-nav .username,
body.rm-theme .top-nav .caret {
  color: #ffffff;
}

body.rm-theme .profile-ava img {
  border: 2px solid rgba(255, 255, 255, 0.35);
}

body.rm-theme #sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 238, 255, 0.97) 52%, rgba(235, 249, 242, 0.97) 100%);
  box-shadow: 18px 0 38px rgba(75, 42, 132, 0.08);
}

body.rm-theme #sidebar ul.sidebar-menu {
  padding-top: 16px;
}

body.rm-theme #sidebar ul.sidebar-menu li a {
  color: #3f3652;
  font-weight: 500;
  border-left: 4px solid transparent;
  border-radius: 0 18px 18px 0;
  margin: 4px 12px 0 0;
  transition: all 0.25s ease;
}

body.rm-theme #sidebar ul.sidebar-menu li a:hover,
body.rm-theme #sidebar ul.sidebar-menu li a:focus,
body.rm-theme #sidebar ul.sidebar-menu li.active > a,
body.rm-theme #sidebar ul.sidebar-menu li.active > a:hover {
  background: linear-gradient(90deg, rgba(124, 90, 214, 0.12), rgba(65, 184, 131, 0.08));
  color: var(--brand-purple-dark);
  border-left-color: var(--brand-green);
  box-shadow: inset 0 0 0 1px rgba(124, 90, 214, 0.10);
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub {
  background: transparent;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub li a {
  margin-right: 0;
  padding-left: 46px;
}

body.rm-theme #sidebar .label,
body.rm-theme .dashboard-quick-link-badge,
body.rm-theme .dashboard-panel-pill,
body.rm-theme .dashboard-ranking .badge,
body.rm-theme .report-chip,
body.rm-auth-page .rm-auth-badge,
body.rm-auth-page .rm-auth-note {
  border-radius: 999px;
}

.dashboard-shell {
  max-width: 1480px;
  margin: 0 auto;
}

.dashboard-hero,
.report-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 36px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(75, 42, 132, 0.95) 0%, rgba(124, 90, 214, 0.92) 55%, rgba(65, 184, 131, 0.88) 100%);
  box-shadow: var(--shadow-hero);
  color: #ffffff;
}

.dashboard-hero:before,
.report-hero:before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  top: -88px;
  right: -64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero:after,
.report-hero:after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  left: -26px;
  bottom: -94px;
  border-radius: 42% 58% 54% 46%;
  transform: rotate(18deg);
  background: rgba(255, 255, 255, 0.07);
}

.dashboard-hero .row,
.report-hero .row {
  position: relative;
  z-index: 1;
}

.dashboard-chip-row,
.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.dashboard-chip,
.report-chip,
.rm-auth-badge,
.rm-auth-note {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.dashboard-chip,
.report-chip,
.rm-auth-badge {
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-chip--accent,
.report-chip--accent,
.rm-auth-badge--accent {
  background: rgba(216, 255, 235, 0.18);
  color: #effff6;
}

.dashboard-chip--soft,
.report-chip--soft,
.rm-auth-note {
  background: rgba(45, 28, 82, 0.18);
}

.dashboard-hero-title,
.report-hero-title,
.rm-auth-title {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-hero-subtitle,
.report-hero-subtitle,
.rm-auth-subtitle {
  margin: 16px 0 0;
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.8;
}

.dashboard-hero-subtitle {
  max-width: 760px;
}

.dashboard-hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 26px;
}

.dashboard-highlight-card {
  flex: 1 1 180px;
  min-width: 180px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.dashboard-highlight-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-highlight-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
}

.dashboard-highlight-note {
  display: block;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.6;
}

.dashboard-focus-panel,
.report-summary-panel {
  padding: 26px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.dashboard-focus-eyebrow,
.report-summary-eyebrow,
.rm-auth-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #d9ffea;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-focus-panel h2,
.report-summary-panel h2,
.rm-auth-card h1 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 600;
}

.dashboard-focus-panel p,
.report-summary-panel p,
.rm-auth-card p {
  margin: 0 0 18px;
  line-height: 1.75;
}

.dashboard-focus-panel p,
.report-summary-panel p {
  color: var(--text-light);
}

.dashboard-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-focus-item,
.report-summary-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(45, 28, 82, 0.18);
}

.dashboard-focus-item span,
.report-summary-item span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.dashboard-focus-item strong,
.report-summary-item strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.dashboard-focus-item small,
.report-summary-item small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-scope-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.dashboard-scope-alert i {
  color: #d8ffeb;
  font-size: 16px;
}

.dashboard-scope-alert--full i {
  color: #fff1be;
}

.dashboard-breadcrumb,
.report-breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
}

.dashboard-breadcrumb > li,
.dashboard-breadcrumb > li + li:before,
.dashboard-breadcrumb > li > i,
.report-breadcrumb > li,
.report-breadcrumb > li + li:before,
.report-breadcrumb > li > i {
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-breadcrumb > li > a,
.report-breadcrumb > li > a {
  color: #ffffff;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-quick-link,
.report-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 112px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(124, 90, 214, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.dashboard-quick-link:hover,
.dashboard-quick-link:focus,
.report-card:hover,
.report-card:focus {
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 24px 44px rgba(75, 42, 132, 0.16);
  border-color: rgba(124, 90, 214, 0.18);
}

.dashboard-quick-link-icon,
.report-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 90, 214, 0.14), rgba(65, 184, 131, 0.12));
  color: var(--brand-purple-dark);
  font-size: 22px;
}

.dashboard-quick-link--green .dashboard-quick-link-icon,
.dashboard-quick-link--dataset .dashboard-quick-link-icon,
.report-card--green .report-card-icon,
.report-card--dataset .report-card-icon {
  color: var(--brand-green-dark);
  background: linear-gradient(135deg, rgba(65, 184, 131, 0.16), rgba(124, 90, 214, 0.10));
}

.dashboard-quick-link-content,
.report-card-content {
  display: block;
  padding-right: 54px;
}

.dashboard-quick-link-content strong,
.report-card-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 600;
}

.dashboard-quick-link-content small,
.report-card-content small {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.dashboard-quick-link-badge,
.report-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: var(--brand-purple-soft);
  color: var(--brand-purple-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-quick-link--green .dashboard-quick-link-badge,
.dashboard-quick-link--dataset .dashboard-quick-link-badge,
.report-card--green .report-card-badge,
.report-card--dataset .report-card-badge {
  background: var(--brand-green-soft);
  color: var(--brand-green-dark);
}

.dashboard-stat-row {
  margin-bottom: 4px;
}

.dashboard-stat-card,
.report-stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 148px;
  padding: 24px 22px;
  margin-bottom: 20px;
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.dashboard-stat-icon,
.report-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand-purple-dark), var(--brand-purple));
  box-shadow: 0 14px 32px rgba(124, 90, 214, 0.28);
  color: #ffffff;
  font-size: 28px;
}

.dashboard-stat-card--green .dashboard-stat-icon,
.report-stat-card--green .report-stat-icon {
  background: linear-gradient(135deg, #2f8e68, #41b883);
  box-shadow: 0 14px 32px rgba(65, 184, 131, 0.28);
}

.dashboard-stat-card--soft .dashboard-stat-icon,
.report-stat-card--soft .report-stat-icon {
  background: linear-gradient(135deg, #5f46af, #90a9ff);
  box-shadow: 0 14px 32px rgba(95, 70, 175, 0.24);
}

.dashboard-stat-label,
.report-stat-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-stat-value,
.report-stat-value {
  display: block;
  color: var(--text-primary);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-stat-foot,
.report-stat-foot {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.dashboard-panel,
.report-panel {
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.dashboard-panel .panel-heading,
.report-panel .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
}

.dashboard-panel .panel-body,
.report-panel .panel-body {
  padding: 18px 22px 24px;
}

.dashboard-panel-heading-text,
.report-panel-heading-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.dashboard-panel-icon,
.report-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 90, 214, 0.15), rgba(65, 184, 131, 0.14));
  color: var(--brand-purple-dark);
  font-size: 20px;
}

.dashboard-panel-heading-text strong,
.report-panel-heading-text strong {
  display: block;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.dashboard-panel-heading-text small,
.report-panel-heading-text small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.dashboard-panel-pill,
.report-panel-pill {
  flex: 0 0 auto;
  align-self: center;
  padding: 7px 14px;
  background: var(--brand-purple-soft);
  color: var(--brand-purple-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-panel--green .dashboard-panel-pill,
.dashboard-panel--green .dashboard-panel-icon,
.report-panel--green .report-panel-pill,
.report-panel--green .report-panel-icon {
  color: var(--brand-green-dark);
}

.dashboard-panel--green .dashboard-panel-pill,
.report-panel--green .report-panel-pill {
  background: var(--brand-green-soft);
}

.dashboard-panel--green .dashboard-panel-icon,
.report-panel--green .report-panel-icon {
  background: linear-gradient(135deg, rgba(65, 184, 131, 0.16), rgba(124, 90, 214, 0.10));
}

.dashboard-chart {
  position: relative;
  min-height: 260px;
  padding: 10px 8px 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(124, 90, 214, 0.04), rgba(65, 184, 131, 0.03));
}

.dashboard-chart-tall {
  min-height: 300px;
}

.dashboard-chart-wide {
  min-height: 320px;
}

.dashboard-summary-card {
  margin-top: 16px;
}

.dashboard-summary-card .well {
  min-height: 92px;
  margin-bottom: 0;
  padding: 16px 14px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #faf8ff 0%, #f0fbf5 100%);
  box-shadow: none;
  color: var(--text-primary);
}

.dashboard-summary-card .well div {
  color: var(--text-muted);
  line-height: 1.6;
}

.dashboard-summary-card .well strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
}

.dashboard-ranking {
  margin-top: 18px;
  margin-bottom: 0;
  border: 0;
}

.dashboard-ranking .list-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(124, 90, 214, 0.08);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 90, 214, 0.04), rgba(65, 184, 131, 0.05));
}

.dashboard-ranking .list-group-item:last-child {
  margin-bottom: 0;
}

.dashboard-ranking-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 12px;
  background: rgba(124, 90, 214, 0.10);
  color: var(--brand-purple-dark);
  font-weight: 600;
}

.dashboard-ranking-label {
  flex: 1 1 auto;
  color: var(--text-primary);
  line-height: 1.55;
}

.dashboard-ranking .badge {
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-green));
  font-weight: 600;
}

.dashboard-chart-note {
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 16px 0 0;
  padding: 0;
}

.dashboard-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.dashboard-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.dashboard-empty-state,
.report-empty-state {
  padding: 36px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(124, 90, 214, 0.05) 0%, rgba(65, 184, 131, 0.05) 100%);
  color: var(--text-muted);
}

.report-shell {
  max-width: 1480px;
  margin: 0 auto;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.report-card {
  min-height: 156px;
}

.report-card-badge,
.report-chip,
.report-chip--accent,
.report-chip--soft {
  border-radius: 999px;
}

.report-card-meta {
  display: block;
  margin-top: 12px;
  color: var(--brand-purple-dark);
  font-size: 13px;
  font-weight: 500;
}

.report-card-arrow {
  position: absolute;
  right: 22px;
  bottom: 20px;
  color: var(--brand-green-dark);
  font-size: 18px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-summary-item {
  min-height: 112px;
}

body.rm-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(65, 184, 131, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(124, 90, 214, 0.18), transparent 28%),
    linear-gradient(160deg, #f3eefc 0%, #edf8f2 48%, #ffffff 100%);
}

.rm-auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.rm-auth-shell {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 65px rgba(75, 42, 132, 0.18);
}

.rm-auth-aside {
  position: relative;
  padding: 42px 38px;
  background: linear-gradient(150deg, rgba(75, 42, 132, 0.98) 0%, rgba(124, 90, 214, 0.95) 55%, rgba(65, 184, 131, 0.88) 100%);
  color: #ffffff;
}

.rm-auth-aside:before {
  content: '';
  position: absolute;
  top: -110px;
  right: -50px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.rm-auth-aside:after {
  content: '';
  position: absolute;
  bottom: -90px;
  left: -50px;
  width: 220px;
  height: 220px;
  border-radius: 46% 54% 58% 42%;
  background: rgba(255, 255, 255, 0.08);
}

.rm-auth-aside > * {
  position: relative;
  z-index: 1;
}

.rm-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.rm-auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 22px;
}

.rm-auth-brand-text strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
}

.rm-auth-brand-text span {
  display: block;
  color: var(--text-light);
  font-size: 14px;
}

.rm-auth-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.rm-auth-highlight {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rm-auth-highlight strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 600;
}

.rm-auth-highlight span {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.7;
}

.rm-auth-card {
  padding: 40px 38px;
}

.rm-auth-card h1 {
  color: var(--text-primary);
}

.rm-auth-card p {
  color: var(--text-muted);
}

.rm-auth-form {
  margin-top: 28px;
}

.rm-auth-field {
  margin-bottom: 18px;
}

.rm-auth-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.rm-auth-input-group {
  display: flex;
  align-items: center;
  border: 1px solid rgba(124, 90, 214, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(124, 90, 214, 0.03), rgba(65, 184, 131, 0.03));
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rm-auth-input-group:focus-within {
  border-color: rgba(124, 90, 214, 0.28);
  box-shadow: 0 0 0 4px rgba(124, 90, 214, 0.08);
}

.rm-auth-input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  color: var(--brand-purple-dark);
  font-size: 18px;
}

.rm-auth-input-group .form-control {
  height: 56px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
}

.rm-auth-input-group .form-control:focus {
  box-shadow: none;
}

.rm-auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.rm-auth-checkbox {
  color: var(--text-muted);
}

.rm-auth-checkbox input {
  margin-top: 2px;
}

.rm-auth-link {
  color: var(--brand-purple-dark);
  font-weight: 500;
}

.rm-auth-link:hover,
.rm-auth-link:focus {
  color: var(--brand-green-dark);
  text-decoration: none;
}

.rm-auth-note {
  border-color: rgba(124, 90, 214, 0.12);
  color: var(--brand-purple-dark);
}

.rm-auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  margin-top: 20px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-purple-dark), var(--brand-purple) 60%, var(--brand-green));
  box-shadow: 0 18px 32px rgba(75, 42, 132, 0.24);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rm-auth-submit:hover,
.rm-auth-submit:focus {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(75, 42, 132, 0.28);
}

.rm-auth-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(124, 90, 214, 0.10);
  color: var(--text-muted);
  line-height: 1.8;
}

.rm-auth-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(124, 90, 214, 0.06), rgba(65, 184, 131, 0.06));
  color: var(--brand-purple-dark);
}

.rm-auth-status i {
  margin-right: 8px;
}

@media (max-width: 1400px) {
  .dashboard-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  body.rm-theme .wrapper {
    padding: 22px 18px 36px;
  }

  .dashboard-hero,
  .report-hero {
    padding: 30px;
  }

  .dashboard-focus-panel,
  .report-summary-panel {
    margin-top: 24px;
  }

  .rm-auth-shell {
    grid-template-columns: 1fr;
    max-width: 760px;
  }
}

@media (max-width: 991px) {
  .dashboard-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero-title,
  .report-hero-title,
  .rm-auth-title {
    font-size: 34px;
  }

  .dashboard-stat-value,
  .report-stat-value {
    font-size: 30px;
  }

  .report-grid,
  .report-summary-grid,
  .rm-auth-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dashboard-hero,
  .report-hero,
  .rm-auth-card,
  .rm-auth-aside {
    padding: 24px 20px;
  }

  .dashboard-hero,
  .report-hero {
    border-radius: 22px;
  }

  .dashboard-hero-title,
  .report-hero-title,
  .rm-auth-title {
    font-size: 30px;
  }

  .dashboard-focus-grid,
  .dashboard-action-grid,
  .report-grid,
  .report-summary-grid,
  .rm-auth-highlights {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-link-content,
  .report-card-content {
    padding-right: 0;
  }

  .dashboard-quick-link-badge,
  .report-card-badge {
    position: static;
    display: inline-flex;
    margin-top: 12px;
  }

  .dashboard-stat-card,
  .report-stat-card {
    align-items: flex-start;
  }

  .dashboard-panel .panel-heading,
  .report-panel .panel-heading,
  .rm-auth-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-ranking .list-group-item {
    align-items: flex-start;
  }

  .rm-auth-layout {
    padding: 16px;
  }
}

:root {
  --brand-purple: #2f6fad;
  --brand-purple-dark: #214f7f;
  --brand-purple-soft: #eaf3fb;
  --brand-green: #4caf50;
  --brand-green-dark: #2e7d32;
  --brand-green-soft: #e7f6e8;
  --surface: #ffffff;
  --text-primary: #16324a;
  --text-muted: #66778a;
  --text-light: rgba(255, 255, 255, 0.86);
  --border-soft: rgba(47, 111, 173, 0.12);
  --shadow-soft: 0 18px 34px rgba(31, 79, 125, 0.08);
  --shadow-hero: 0 28px 60px rgba(31, 79, 125, 0.14);
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

body.rm-theme {
  background:
    radial-gradient(circle at top right, rgba(47, 111, 173, 0.12), transparent 30%),
    radial-gradient(circle at top left, rgba(76, 175, 80, 0.10), transparent 30%),
    linear-gradient(180deg, #f5f7fa 0%, #eef3f8 100%);
}

body.rm-theme .header.dark-bg {
  min-height: 76px;
  background: linear-gradient(135deg, #2f6fad 0%, #245d92 56%, #4caf50 100%);
  border-bottom: 0;
  box-shadow: 0 10px 30px rgba(31, 79, 125, 0.18);
}

body.rm-theme .header .logo {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.rm-theme .header .logo .lite,
body.rm-theme .toggle-nav .icon-reorder,
body.rm-theme .top-nav .username,
body.rm-theme .top-nav .caret {
  color: #ffffff;
}

body.rm-theme .profile-ava img {
  border: 2px solid rgba(255, 255, 255, 0.35);
}

body.rm-theme #sidebar {
  background: #ffffff;
  border-right: 1px solid #dbe6f1;
  box-shadow: 16px 0 32px rgba(31, 79, 125, 0.06);
}

body.rm-theme #sidebar .sidebar-brand {
  padding: 24px 22px 18px;
  border-bottom: 1px solid #e5edf5;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.rm-theme #sidebar .sidebar-brand__logo {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(31, 79, 125, 0.12);
}

body.rm-theme #sidebar .sidebar-brand__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-purple-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.rm-theme #sidebar .sidebar-brand strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

body.rm-theme #sidebar .sidebar-brand .sidebar-brand__title-th {
  display: block;
  margin-top: 4px;
  color: var(--brand-purple-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

body.rm-theme #sidebar .sidebar-brand small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

body.rm-theme #sidebar ul.sidebar-menu {
  padding-top: 12px;
}

body.rm-theme #sidebar ul.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 12px 0;
  padding: 12px 14px;
  border-left: 0;
  border-radius: 14px;
  color: var(--text-primary);
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

body.rm-theme #sidebar ul.sidebar-menu li a i {
  width: 22px;
  text-align: center;
  color: var(--brand-purple-dark);
  font-size: 16px;
}

body.rm-theme #sidebar ul.sidebar-menu li a:hover,
body.rm-theme #sidebar ul.sidebar-menu li a:focus,
body.rm-theme #sidebar ul.sidebar-menu li.active > a,
body.rm-theme #sidebar ul.sidebar-menu li.active > a:hover {
  background: linear-gradient(90deg, rgba(47, 111, 173, 0.12), rgba(76, 175, 80, 0.08));
  color: var(--brand-purple-dark);
  transform: translateX(2px);
  box-shadow: inset 0 0 0 1px rgba(47, 111, 173, 0.08);
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub {
  background: transparent;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub li a {
  margin-right: 12px;
  padding-left: 46px;
  font-size: 14px;
}

body.rm-theme #sidebar .label,
body.rm-theme .badge,
body.rm-theme .dashboard-panel-pill,
body.rm-theme .report-panel-pill,
body.rm-theme .dashboard-quick-link-badge,
body.rm-theme .report-card-badge,
body.rm-theme .status-badge,
body.rm-theme .risk-badge {
  border-radius: 999px;
}

body.rm-theme .label-danger {
  background-color: #e53935;
}

body.rm-theme .label-success {
  background-color: #4caf50;
}

body.rm-theme .label-warning {
  background-color: #ffc107;
  color: #1f2937;
}

body.rm-theme .dashboard-shell,
body.rm-theme .report-shell {
  max-width: 1480px;
  margin: 0 auto;
}

body.rm-theme .dashboard-hero,
body.rm-theme .report-hero {
  overflow: hidden;
  padding: 34px 36px;
  border: 1px solid rgba(47, 111, 173, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

body.rm-theme .dashboard-hero:before,
body.rm-theme .report-hero:before {
  background: rgba(47, 111, 173, 0.08);
}

body.rm-theme .dashboard-hero:after,
body.rm-theme .report-hero:after {
  background: rgba(76, 175, 80, 0.08);
}

body.rm-theme .dashboard-chip,
body.rm-theme .report-chip,
body.rm-theme .rm-auth-badge {
  border: 1px solid rgba(47, 111, 173, 0.12);
  background: rgba(47, 111, 173, 0.08);
  color: var(--text-primary);
}

body.rm-theme .dashboard-chip--accent,
body.rm-theme .report-chip--accent,
body.rm-theme .rm-auth-badge--accent {
  background: rgba(76, 175, 80, 0.12);
  color: var(--brand-green-dark);
}

body.rm-theme .dashboard-chip--soft,
body.rm-theme .report-chip--soft,
body.rm-theme .rm-auth-note {
  background: rgba(47, 111, 173, 0.06);
  color: var(--text-primary);
}

body.rm-theme .dashboard-hero-title,
body.rm-theme .report-hero-title {
  color: var(--text-primary);
}

body.rm-theme .dashboard-hero-subtitle,
body.rm-theme .report-hero-subtitle {
  color: var(--text-muted);
}

body.rm-theme .dashboard-focus-panel,
body.rm-theme .report-summary-panel {
  background: #ffffff;
  border: 1px solid #dce8f3;
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
}

body.rm-theme .dashboard-focus-panel p,
body.rm-theme .report-summary-panel p,
body.rm-theme .dashboard-focus-item span,
body.rm-theme .report-summary-item span,
body.rm-theme .dashboard-focus-item small,
body.rm-theme .report-summary-item small {
  color: var(--text-muted);
}

body.rm-theme .dashboard-focus-item,
body.rm-theme .report-summary-item {
  background: #f7fbff;
  border: 1px solid #dce8f3;
}

body.rm-theme .dashboard-scope-alert {
  background: #eff6ff;
  color: var(--text-primary);
}

body.rm-theme .dashboard-action-grid {
  gap: 16px;
}

body.rm-theme .dashboard-quick-link,
body.rm-theme .report-card,
body.rm-theme .dashboard-stat-card,
body.rm-theme .report-stat-card,
body.rm-theme .dashboard-panel,
body.rm-theme .report-panel,
body.rm-theme .panel,
body.rm-theme .well,
body.rm-theme .table-responsive {
  background: #ffffff;
  border-color: #dce8f3;
  box-shadow: var(--shadow-soft);
}

body.rm-theme .dashboard-quick-link,
body.rm-theme .report-card {
  --quick-link-accent: #2f5fa7;
  --quick-link-soft: #e8effb;
  --quick-link-background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  --quick-link-border: #dce8f3;
  --quick-link-border-hover: rgba(47, 95, 167, 0.28);
  --quick-link-icon-background: linear-gradient(135deg, rgba(47, 95, 167, 0.16), rgba(96, 141, 209, 0.1));
  background: var(--quick-link-background);
  border: 1px solid var(--quick-link-border);
}

body.rm-theme .dashboard-quick-link:hover,
body.rm-theme .dashboard-quick-link:focus,
body.rm-theme .report-card:hover,
body.rm-theme .report-card:focus {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(31, 79, 125, 0.12);
  border-color: var(--quick-link-border-hover);
}

body.rm-theme .dashboard-quick-link-icon,
body.rm-theme .report-card-icon,
body.rm-theme .dashboard-panel-icon,
body.rm-theme .report-panel-icon,
body.rm-theme .dashboard-stat-icon,
body.rm-theme .report-stat-icon {
  background: linear-gradient(135deg, rgba(47, 111, 173, 0.14), rgba(76, 175, 80, 0.10));
  color: var(--brand-purple-dark);
}

body.rm-theme .dashboard-quick-link-icon,
body.rm-theme .report-card-icon {
  background: var(--quick-link-icon-background);
  color: var(--quick-link-accent);
}

body.rm-theme .dashboard-stat-card--soft .dashboard-stat-icon,
body.rm-theme .report-stat-card--soft .report-stat-icon {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(47, 111, 173, 0.10));
  color: #9a6a00;
}

body.rm-theme .dashboard-stat-label,
body.rm-theme .report-stat-label,
body.rm-theme .dashboard-panel-heading-text small,
body.rm-theme .report-panel-heading-text small,
body.rm-theme .dashboard-quick-link-content small,
body.rm-theme .report-card-content small,
body.rm-theme .dashboard-stat-foot,
body.rm-theme .report-stat-foot,
body.rm-theme .dashboard-chart-note,
body.rm-theme .report-chart-note {
  color: var(--text-muted);
}

body.rm-theme .dashboard-stat-value,
body.rm-theme .report-stat-value,
body.rm-theme .dashboard-panel-heading-text strong,
body.rm-theme .report-panel-heading-text strong,
body.rm-theme .dashboard-quick-link-content strong,
body.rm-theme .report-card-content strong {
  color: var(--text-primary);
}

body.rm-theme .dashboard-panel .panel-heading,
body.rm-theme .report-panel .panel-heading,
body.rm-theme .panel-heading {
  border-bottom: 1px solid #e6eef6;
}

body.rm-theme .dashboard-panel-pill,
body.rm-theme .report-panel-pill,
body.rm-theme .dashboard-quick-link-badge,
body.rm-theme .report-card-badge,
body.rm-theme .badge,
body.rm-theme .dashboard-ranking .badge {
  background: #eaf3fb;
  color: var(--brand-purple-dark);
}

body.rm-theme .dashboard-quick-link-badge,
body.rm-theme .report-card-badge {
  background: var(--quick-link-soft);
  color: var(--quick-link-accent);
}

body.rm-theme .dashboard-quick-link--indigo,
body.rm-theme .report-card--indigo {
  --quick-link-accent: #3157a6;
  --quick-link-soft: #e8eefc;
  --quick-link-background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
  --quick-link-border: #d8e3f8;
  --quick-link-border-hover: rgba(49, 87, 166, 0.3);
  --quick-link-icon-background: linear-gradient(135deg, rgba(49, 87, 166, 0.17), rgba(124, 147, 220, 0.11));
}

body.rm-theme .dashboard-quick-link--green,
body.rm-theme .dashboard-quick-link--emerald,
body.rm-theme .report-card--green,
body.rm-theme .report-card--emerald,
body.rm-theme .dashboard-stat-card--green,
body.rm-theme .report-stat-card--green {
  --quick-link-accent: #1d8a52;
  --quick-link-soft: #e3f7ea;
  --quick-link-background: linear-gradient(180deg, #f4fcf6 0%, #ffffff 100%);
  --quick-link-border: #d6eedf;
  --quick-link-border-hover: rgba(29, 138, 82, 0.28);
  --quick-link-icon-background: linear-gradient(135deg, rgba(29, 138, 82, 0.18), rgba(112, 196, 146, 0.1));
}

body.rm-theme .dashboard-stat-card--green .dashboard-stat-icon,
body.rm-theme .report-stat-card--green .report-stat-icon {
  background: linear-gradient(135deg, rgba(29, 138, 82, 0.18), rgba(112, 196, 146, 0.1));
  color: #1d8a52;
}

body.rm-theme .dashboard-panel--green .dashboard-panel-pill,
body.rm-theme .report-panel--green .report-panel-pill {
  background: #e7f6e8;
  color: var(--brand-green-dark);
}

body.rm-theme .dashboard-quick-link--blue,
body.rm-theme .report-card--blue {
  --quick-link-accent: #156da9;
  --quick-link-soft: #e1f1fb;
  --quick-link-background: linear-gradient(180deg, #f4fbff 0%, #ffffff 100%);
  --quick-link-border: #d4e8f7;
  --quick-link-border-hover: rgba(21, 109, 169, 0.28);
  --quick-link-icon-background: linear-gradient(135deg, rgba(21, 109, 169, 0.17), rgba(100, 179, 227, 0.11));
}

body.rm-theme .dashboard-quick-link--amber,
body.rm-theme .report-card--amber {
  --quick-link-accent: #b76a08;
  --quick-link-soft: #fff1da;
  --quick-link-background: linear-gradient(180deg, #fffaf2 0%, #ffffff 100%);
  --quick-link-border: #f3e1bc;
  --quick-link-border-hover: rgba(183, 106, 8, 0.28);
  --quick-link-icon-background: linear-gradient(135deg, rgba(183, 106, 8, 0.16), rgba(245, 180, 79, 0.11));
}

body.rm-theme .dashboard-quick-link--dataset,
body.rm-theme .report-card--dataset {
  --quick-link-accent: #11756e;
  --quick-link-soft: #ddf5f1;
  --quick-link-background: linear-gradient(180deg, #f2fcfa 0%, #ffffff 100%);
  --quick-link-border: #d2ebe7;
  --quick-link-border-hover: rgba(17, 117, 110, 0.28);
  --quick-link-icon-background: linear-gradient(135deg, rgba(17, 117, 110, 0.17), rgba(98, 194, 182, 0.11));
}

body.rm-theme .dashboard-chart {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}

body.rm-theme .dashboard-summary-card .well {
  background: #f8fbff;
  border: 1px solid #dce8f3;
}

body.rm-theme .dashboard-ranking .list-group-item {
  border: 1px solid #dce8f3;
  background: #ffffff;
}

body.rm-theme .dashboard-ranking-order {
  background: rgba(47, 111, 173, 0.10);
  color: var(--brand-purple-dark);
}

body.rm-theme .dashboard-empty-state,
body.rm-theme .report-empty-state {
  border: 1px dashed #cfdde8;
  background: #f8fbff;
  color: var(--text-muted);
}

body.rm-theme .table-responsive {
  border: 1px solid #dce8f3;
  border-radius: 18px;
  overflow: hidden;
}

body.rm-theme .table > thead > tr > th {
  background: #f7fbff;
  border-bottom: 1px solid #dce8f3;
  color: var(--text-primary);
  font-weight: 600;
}

body.rm-theme .table > tbody > tr:hover {
  background: #f7fbff;
}

body.rm-theme .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fbfdff;
}

body.rm-theme .btn {
  border-radius: 12px;
  font-weight: 600;
}

body.rm-theme .btn-primary,
body.rm-theme .rm-action-button {
  background: #2f6fad;
  border-color: #2f6fad;
  color: #ffffff;
}

body.rm-theme .btn-success {
  background: #4caf50;
  border-color: #4caf50;
}

body.rm-theme .btn-warning {
  background: #ffc107;
  border-color: #ffc107;
  color: #1f2937;
}

body.rm-theme .btn-danger {
  background: #e53935;
  border-color: #e53935;
}

body.rm-theme .form-control,
body.rm-theme select.form-control,
body.rm-theme textarea.form-control {
  border: 1px solid #d7e3ee;
  border-radius: 12px;
  box-shadow: none;
}

body.rm-theme .form-control:focus,
body.rm-theme select.form-control:focus,
body.rm-theme textarea.form-control:focus {
  border-color: #2f6fad;
  box-shadow: 0 0 0 4px rgba(47, 111, 173, 0.08);
}

body.rm-theme .dropdown-menu {
  border: 1px solid #dce8f3;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.14);
}

body.rm-theme .top-nav ul.top-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.rm-theme .top-nav ul.top-menu > li {
  list-style: none;
}

body.rm-theme .top-nav li.dropdown > .dropdown-menu.extended.logout {
  display: none;
}

body.rm-theme .top-nav li.dropdown.open > .dropdown-menu.extended.logout {
  display: block;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout {
  background: #ffffff;
  border: 1px solid #dce8f3;
  border-radius: 14px;
  overflow: hidden;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout .log-arrow-up {
  display: none;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout > li {
  background: #ffffff;
  border: 0;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout > li > a {
  color: #223446;
  background: #ffffff;
  border-bottom: 1px solid #e6eef6 !important;
  font-weight: 500;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout > li > a i {
  color: #2f6fad;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout > li > a:hover {
  background: #eef5fc !important;
  color: #1a2d40;
  border-bottom: 1px solid #d7e6f5 !important;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout > li:last-child,
body.rm-theme .top-nav .dropdown-menu.extended.logout > li:last-child > a,
body.rm-theme .top-nav .dropdown-menu.extended.logout > li:last-child > a:hover {
  background: #2f6fad !important;
  color: #ffffff;
}

body.rm-theme .top-nav .dropdown-menu.extended.logout > li:last-child > a i,
body.rm-theme .top-nav .dropdown-menu.extended.logout > li:last-child > a:hover i {
  color: #ffffff;
}

body.rm-theme .breadcrumb {
  background: transparent;
}

body.rm-theme .status-badge,
body.rm-theme .risk-badge,
body.rm-theme .dashboard-panel-pill,
body.rm-theme .report-panel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

body.rm-theme .status-badge--open,
body.rm-theme .risk-badge--high {
  background: rgba(229, 57, 53, 0.12);
  color: #b3261e;
}

body.rm-theme .status-badge--progress,
body.rm-theme .risk-badge--medium {
  background: rgba(255, 193, 7, 0.18);
  color: #8a6300;
}

body.rm-theme .status-badge--closed,
body.rm-theme .risk-badge--low {
  background: rgba(76, 175, 80, 0.14);
  color: #1f6a23;
}

body.rm-theme .filter-panel,
body.rm-theme .rm-section-card,
body.rm-theme .rm-page-header,
body.rm-theme .rm-page-toolbar {
  background: #ffffff;
  border: 1px solid #dce8f3;
  box-shadow: var(--shadow-soft);
  border-radius: 18px;
}

body.rm-theme .rm-page-header,
body.rm-theme .rm-page-toolbar {
  padding: 20px 22px;
  margin-bottom: 18px;
}

body.rm-theme .rm-page-header h1,
body.rm-theme .rm-page-toolbar h1,
body.rm-theme .rm-page-toolbar h2 {
  margin-top: 0;
  color: var(--text-primary);
}

body.rm-theme .rm-page-header p,
body.rm-theme .rm-page-toolbar p {
  color: var(--text-muted);
}

body.rm-theme.rm-dark,
body.rm-theme.dark-mode {
  background: #0f1720;
}

body.rm-theme.rm-dark .dashboard-hero,
body.rm-theme.rm-dark .report-hero,
body.rm-theme.dark-mode .dashboard-hero,
body.rm-theme.dark-mode .report-hero {
  background: #162130;
  color: #ecf3fb;
}

body.rm-theme.rm-dark .dashboard-panel,
body.rm-theme.rm-dark .report-panel,
body.rm-theme.dark-mode .dashboard-panel,
body.rm-theme.dark-mode .report-panel {
  background: #162130;
  border-color: rgba(255, 255, 255, 0.08);
  color: #ecf3fb;
}

body.rm-theme .header .logo {
  color: transparent;
}

body.rm-theme .header .logo::before {
  box-shadow: 0 12px 24px rgba(26, 18, 56, 0.26);
}

body.rm-theme .header .logo::after {
  color: #ffffff;
}

body.rm-theme .header .logo .lite {
  display: none;
}

body.rm-theme .dashboard-hero-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.rm-theme .dashboard-highlight-card {
  min-width: 0;
  border: 1px solid #dce8f3;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

body.rm-theme .dashboard-highlight-label {
  color: var(--brand-purple-dark);
}

body.rm-theme .dashboard-highlight-note {
  color: var(--text-muted);
}

body.rm-theme .dashboard-hero-cta {
  margin-top: 18px;
}

body.rm-theme .dashboard-table strong {
  color: var(--text-primary);
}

body.rm-theme .dashboard-table .text-muted {
  color: var(--text-muted);
}

body.rm-theme .dashboard-table .risk-badge,
body.rm-theme .dashboard-table .status-badge {
  min-width: 102px;
  justify-content: center;
}

body.rm-theme #sidebar ul.sidebar-menu li a,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub li a {
  flex-wrap: nowrap;
  white-space: nowrap;
  width: calc(100% - 12px);
  min-width: 0;
}

body.rm-theme #sidebar ul.sidebar-menu li a .menu-arrow {
  margin-left: auto;
  flex: 0 0 auto;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub li a {
  min-height: 44px;
  height: auto;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub li a .label {
  margin-left: 10px;
  flex: 0 0 auto;
}

body.rm-theme #sidebar {
  width: var(--rm-sidebar-width);
  top: 60px;
  height: calc(100vh - 60px);
  padding-top: 28px;
  box-sizing: border-box;
  overflow-y: auto;
}

body.rm-theme #main-content {
  margin-left: var(--rm-sidebar-width);
}

body.rm-theme #container.sidebar-closed #main-content {
  margin-left: 0;
}

body.rm-theme #container.sidebar-closed #sidebar {
  margin-left: calc(var(--rm-sidebar-width) * -1);
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list {
  padding: 6px 12px 10px;
}

body.rm-theme #sidebar ul.sidebar-menu {
  margin-top: 0;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #dbe7f1;
  border-radius: 16px;
  box-sizing: border-box;
  box-shadow: 0 10px 22px rgba(34, 71, 110, 0.08);
  column-gap: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 8px 0 0;
  min-height: 52px;
  overflow: visible;
  padding: 12px 14px 12px 18px;
  text-align: left;
  text-overflow: clip;
  transform: none;
  white-space: normal;
  width: 100%;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a:hover,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a:focus,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.active {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  border-color: rgba(47, 111, 173, 0.26);
  box-shadow: 0 14px 28px rgba(34, 71, 110, 0.12);
  transform: translateX(0);
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a .sidebar-submenu-text {
  color: #324964;
  display: block;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  padding-right: 4px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.active .sidebar-submenu-text,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a:hover .sidebar-submenu-text,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a:focus .sidebar-submenu-text {
  color: #233955;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a .sidebar-submenu-badge {
  justify-self: end;
  margin-left: 0;
  min-width: 34px;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--low {
  background: #9fdea6;
  border-color: #5daf6e;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--medium {
  background: #ffd54d;
  border-color: #e0b631;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--high {
  background: #ffac4d;
  border-color: #ef8b1f;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--critical {
  background: #ff8585;
  border-color: #e35555;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--low:hover,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--low:focus,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--low.active {
  background: #86d28f;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--medium:hover,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--medium:focus,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--medium.active {
  background: #f4cb34;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--high:hover,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--high:focus,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--high.active {
  background: #f89a2b;
}

body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--critical:hover,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--critical:focus,
body.rm-theme #sidebar ul.sidebar-menu li ul.sub.sidebar-submenu-list li a.sidebar-risk-link--critical.active {
  background: #f56c6c;
}

@media (max-width: 1400px) {
  body.rm-theme .dashboard-hero-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  body.rm-theme .dashboard-hero-highlights {
    grid-template-columns: 1fr;
  }
}
