/* =========================================================
   RVInsureFlow — Global Design System
   Theme: TGL Purple / Coral
   Version: 1.0
   ========================================================= */

/* ------------------------------
   1. Design Tokens
   ------------------------------ */

:root {
  /* Brand */
  --rv-maroon-950: #1a1850;
  --rv-maroon-900: #1e1c5c;
  --rv-maroon-800: #292677;
  --rv-maroon-700: #343091;
  --rv-maroon-600: #3d3899;
  --rv-maroon-500: #4a409e;
  --rv-maroon-400: #7a74c4;
  --rv-maroon-300: #a29fd6;
  --rv-maroon-200: #d4d2eb;
  --rv-maroon-100: #f2f1fa;
  --rv-maroon-50: #fffdfd;

  /* Neutrals */
  --rv-white: #FFFFFF;
  --rv-background: #f2f1fa;
  --rv-surface: #FFFFFF;
  --rv-surface-muted: #f7f6fc;
  --rv-surface-soft: #fffdfd;
  --rv-border: #dfddea;
  --rv-border-strong: #cfcce0;

  /* Text */
  --rv-text-primary: #29283a;
  --rv-text-secondary: #6b6981;
  --rv-text-muted: #8a879c;
  --rv-text-disabled: #BBB3B7;
  --rv-text-inverse: #FFFFFF;

  /* Semantic */
  --rv-success: #2E9B50;
  --rv-success-dark: #247E41;
  --rv-success-bg: #E8F6EB;

  --rv-warning: #E79422;
  --rv-warning-dark: #B86C0B;
  --rv-warning-bg: #FFF2DC;

  --rv-danger: #ee4050;
  --rv-danger-dark: #c92f3d;
  --rv-danger-bg: #fff4f5;

  --rv-info: #3978DB;
  --rv-info-dark: #2E63B8;
  --rv-info-bg: #E7F0FD;

  --rv-purple: #4a409e;
  --rv-purple-dark: #343091;
  --rv-purple-bg: #f2f1fa;

  --rv-gray-status: #757078;
  --rv-gray-status-bg: #F0EFF1;

  /* Chart */
  --rv-chart-maroon: #3d3899;
  --rv-chart-rose: #a29fd6;
  --rv-chart-orange: #E79422;
  --rv-chart-gold: #E5B548;
  --rv-chart-blue: #3978DB;
  --rv-chart-purple: #4a409e;
  --rv-chart-green: #2E9B50;
  --rv-chart-gray: #A6A2A5;

  /* Typography */
  --rv-font-sans: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --rv-font-size-xs: 0.75rem;
  --rv-font-size-sm: 0.875rem;
  --rv-font-size-md: 1rem;
  --rv-font-size-lg: 1.125rem;
  --rv-font-size-xl: 1.375rem;
  --rv-font-size-2xl: 1.75rem;
  --rv-font-size-3xl: 2.125rem;

  /* Radius */
  --rv-radius-xs: 6px;
  --rv-radius-sm: 8px;
  --rv-radius-md: 12px;
  --rv-radius-lg: 16px;
  --rv-radius-xl: 20px;
  --rv-radius-pill: 999px;

  /* Shadows */
  --rv-shadow-xs: 0 1px 2px rgba(32, 28, 94, 0.03);
  --rv-shadow-sm: 0 4px 14px rgba(32, 28, 94, 0.045);
  --rv-shadow-md: 0 8px 24px rgba(32, 28, 94, 0.065);
  --rv-shadow-lg: 0 18px 45px rgba(32, 28, 94, 0.10);

  /* Spacing */
  --rv-space-1: 4px;
  --rv-space-2: 8px;
  --rv-space-3: 12px;
  --rv-space-4: 16px;
  --rv-space-5: 20px;
  --rv-space-6: 24px;
  --rv-space-7: 28px;
  --rv-space-8: 32px;

  /* Layout */
  --rv-sidebar-width: 250px;
  --rv-topbar-height: 72px;

  /* Motion */
  --rv-transition-fast: 150ms ease;
  --rv-transition: 220ms ease;
}

/* ------------------------------
   2. Reset / Base
   ------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--rv-font-sans);
  color: var(--rv-text-primary);
  background:
    radial-gradient(circle at top right, rgba(52, 48, 145, 0.035), transparent 30rem),
    var(--rv-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--rv-maroon-100);
  color: var(--rv-maroon-800);
}

/* ------------------------------
   3. Utility Layout
   ------------------------------ */

.rv-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--rv-sidebar-width) minmax(0, 1fr);
}

.rv-main {
  min-width: 0;
  padding: 24px 28px 40px;
}

.rv-page {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.rv-grid {
  display: grid;
  gap: var(--rv-space-4);
}

.rv-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rv-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rv-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rv-flex {
  display: flex;
}

.rv-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--rv-space-3);
}

.rv-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-gap-1 { gap: var(--rv-space-1); }
.rv-gap-2 { gap: var(--rv-space-2); }
.rv-gap-3 { gap: var(--rv-space-3); }
.rv-gap-4 { gap: var(--rv-space-4); }
.rv-gap-5 { gap: var(--rv-space-5); }
.rv-gap-6 { gap: var(--rv-space-6); }

.rv-mt-1 { margin-top: var(--rv-space-1); }
.rv-mt-2 { margin-top: var(--rv-space-2); }
.rv-mt-3 { margin-top: var(--rv-space-3); }
.rv-mt-4 { margin-top: var(--rv-space-4); }
.rv-mt-5 { margin-top: var(--rv-space-5); }
.rv-mt-6 { margin-top: var(--rv-space-6); }

.rv-mb-1 { margin-bottom: var(--rv-space-1); }
.rv-mb-2 { margin-bottom: var(--rv-space-2); }
.rv-mb-3 { margin-bottom: var(--rv-space-3); }
.rv-mb-4 { margin-bottom: var(--rv-space-4); }
.rv-mb-5 { margin-bottom: var(--rv-space-5); }
.rv-mb-6 { margin-bottom: var(--rv-space-6); }

/* ------------------------------
   4. Sidebar
   ------------------------------ */

.rv-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  color: var(--rv-text-inverse);
  background:
    linear-gradient(
      180deg,
      var(--rv-maroon-800) 0%,
      var(--rv-maroon-900) 48%,
      var(--rv-maroon-950) 100%
    );
  box-shadow: 10px 0 30px rgba(32, 28, 94, 0.08);
  z-index: 40;
}

.rv-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}

.rv-sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 900;
}

.rv-sidebar-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rv-sidebar-brand-name span {
  color: #F0B8C5;
}

.rv-sidebar-section-label {
  margin: 16px 10px 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.40);
}

.rv-sidebar-nav {
  display: grid;
  gap: 5px;
}

.rv-sidebar-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--rv-radius-md);
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  transition:
    background var(--rv-transition-fast),
    color var(--rv-transition-fast),
    transform var(--rv-transition-fast);
}

.rv-sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.rv-sidebar-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.rv-sidebar-link-icon {
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rv-sidebar-footer {
  margin-top: auto;
}

.rv-sidebar-promo {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--rv-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
}

.rv-sidebar-promo-title {
  margin: 12px 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.rv-sidebar-promo-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ------------------------------
   5. Top Bar
   ------------------------------ */

.rv-topbar {
  min-height: var(--rv-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.rv-page-heading {
  min-width: 0;
}

.rv-page-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.rv-page-subtitle {
  margin: 7px 0 0;
  color: var(--rv-text-secondary);
  font-size: var(--rv-font-size-sm);
}

.rv-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rv-topbar-search {
  position: relative;
  width: min(440px, 40vw);
}

.rv-topbar-search input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: var(--rv-white);
  color: var(--rv-text-primary);
  outline: none;
  transition: border-color var(--rv-transition-fast), box-shadow var(--rv-transition-fast);
}

.rv-topbar-search input:focus {
  border-color: var(--rv-maroon-400);
  box-shadow: 0 0 0 4px rgba(52, 48, 145, 0.07);
}

.rv-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: var(--rv-white);
  box-shadow: var(--rv-shadow-sm);
}

.rv-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.rv-profile-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 750;
}

.rv-profile-role {
  display: block;
  margin-top: 2px;
  color: var(--rv-text-muted);
  font-size: 0.72rem;
}

/* ------------------------------
   6. Buttons
   ------------------------------ */

.rv-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--rv-radius-md);
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 750;
  transition:
    background var(--rv-transition-fast),
    border-color var(--rv-transition-fast),
    color var(--rv-transition-fast),
    transform var(--rv-transition-fast),
    box-shadow var(--rv-transition-fast);
}

.rv-btn:hover {
  transform: translateY(-1px);
}

.rv-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.rv-btn-primary {
  background: var(--rv-maroon-700);
  border-color: var(--rv-maroon-700);
  color: #fff;
  box-shadow: 0 8px 18px rgba(52, 48, 145, 0.14);
}

.rv-btn-primary:hover {
  background: var(--rv-maroon-800);
  border-color: var(--rv-maroon-800);
}

.rv-btn-secondary {
  background: #fff;
  border-color: var(--rv-maroon-500);
  color: var(--rv-maroon-700);
}

.rv-btn-secondary:hover {
  background: var(--rv-maroon-50);
  border-color: var(--rv-maroon-600);
}

.rv-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--rv-maroon-700);
}

.rv-btn-ghost:hover {
  background: var(--rv-maroon-50);
}

.rv-btn-danger {
  background: var(--rv-danger);
  color: #fff;
  border-color: var(--rv-danger);
}

.rv-btn-danger:hover {
  background: var(--rv-danger-dark);
}

/* ------------------------------
   7. Cards / Panels
   ------------------------------ */

.rv-card {
  background: var(--rv-card, #fff);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-lg);
  box-shadow: var(--rv-shadow-sm);
}

.rv-card:hover {
  box-shadow: var(--rv-shadow-md);
}

.rv-panel {
  background: var(--rv-white);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-xl);
  box-shadow: var(--rv-shadow-sm);
  overflow: hidden;
}

.rv-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
}

.rv-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rv-panel-subtitle {
  margin: 5px 0 0;
  color: var(--rv-text-secondary);
  font-size: 0.78rem;
}

.rv-panel-body {
  padding: 18px 20px;
}

/* ------------------------------
   8. KPI / Metric Cards
   ------------------------------ */

.rv-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.rv-metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-lg);
  background: var(--rv-white);
  box-shadow: var(--rv-shadow-sm);
}

.rv-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rv-metric-label {
  color: var(--rv-text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
}

.rv-metric-value {
  margin-top: 12px;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.rv-metric-note {
  margin-top: 8px;
  color: var(--rv-text-muted);
  font-size: 0.72rem;
}

.rv-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--rv-maroon-100);
  color: var(--rv-maroon-700);
}

/* ------------------------------
   9. Status Pills / Badges
   ------------------------------ */

.rv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: var(--rv-radius-pill);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.rv-badge-active,
.rv-badge-success {
  color: var(--rv-success);
  background: var(--rv-success-bg);
}

.rv-badge-lapsed,
.rv-badge-danger,
.rv-badge-overdue {
  color: var(--rv-danger);
  background: var(--rv-danger-bg);
}

.rv-badge-pending,
.rv-badge-warning {
  color: var(--rv-warning-dark);
  background: var(--rv-warning-bg);
}

.rv-badge-progress,
.rv-badge-info {
  color: var(--rv-info);
  background: var(--rv-info-bg);
}

.rv-badge-review,
.rv-badge-purple {
  color: var(--rv-purple);
  background: var(--rv-purple-bg);
}

.rv-badge-neutral {
  color: var(--rv-gray-status);
  background: var(--rv-gray-status-bg);
}

/* ------------------------------
   10. Toolbar / Filters
   ------------------------------ */

.rv-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid #F5F2F3;
  border-bottom: 1px solid var(--rv-border);
}

.rv-search {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.rv-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: #F9F8F9;
  color: var(--rv-text-primary);
  outline: none;
}

.rv-search input:focus {
  border-color: var(--rv-maroon-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(52, 48, 145, 0.06);
}

.rv-select,
.rv-input,
.rv-textarea {
  width: 100%;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: var(--rv-white);
  color: var(--rv-text-primary);
  outline: none;
  transition: border-color var(--rv-transition-fast), box-shadow var(--rv-transition-fast);
}

.rv-select,
.rv-input {
  height: 42px;
  padding: 0 12px;
}

.rv-textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.rv-select:focus,
.rv-input:focus,
.rv-textarea:focus {
  border-color: var(--rv-maroon-400);
  box-shadow: 0 0 0 4px rgba(52, 48, 145, 0.06);
}

.rv-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--rv-text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
}

/* ------------------------------
   11. Tables
   ------------------------------ */

.rv-table-wrap {
  overflow-x: auto;
}

.rv-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.rv-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rv-border);
  background: #FBFAFB;
  color: var(--rv-text-muted);
  font-size: 0.68rem;
  text-align: left;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.rv-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rv-border);
  font-size: 0.82rem;
  vertical-align: middle;
}

.rv-table tbody tr {
  transition: background var(--rv-transition-fast);
}

.rv-table tbody tr:hover {
  background: #FCF8F9;
}

.rv-table tbody tr.selected,
.rv-table-row-selected {
  background: #FDF3F5;
}

.rv-table tbody tr:last-child td {
  border-bottom: 0;
}

.rv-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--rv-text-muted);
  font-size: 0.75rem;
}

/* ------------------------------
   12. Customer / User Avatars
   ------------------------------ */

.rv-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rv-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--rv-maroon-100), #fff);
  border: 1px solid var(--rv-border);
}

.rv-avatar-sm {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.rv-avatar-lg {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.rv-person-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
}

.rv-person-meta {
  display: block;
  margin-top: 3px;
  color: var(--rv-text-muted);
  font-size: 0.7rem;
}

/* ------------------------------
   13. Tabs
   ------------------------------ */

.rv-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px;
  border-bottom: 1px solid var(--rv-border);
}

.rv-tab {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--rv-radius-sm);
  background: transparent;
  color: var(--rv-text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.rv-tab:hover {
  background: var(--rv-maroon-50);
  color: var(--rv-maroon-700);
}

.rv-tab.active {
  background: var(--rv-maroon-100);
  color: var(--rv-maroon-700);
}

/* ------------------------------
   14. Pipeline / Stages
   ------------------------------ */

.rv-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.rv-stage {
  position: relative;
  padding: 14px 15px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: #fff;
}

.rv-stage-title {
  font-size: 0.76rem;
  font-weight: 800;
}

.rv-stage-value {
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 900;
}

.rv-stage.new { background: var(--rv-purple-bg); }
.rv-stage.contacted { background: #FFF0E8; }
.rv-stage.reached { background: var(--rv-warning-bg); }
.rv-stage.interested { background: #F2ECFA; }
.rv-stage.pending { background: var(--rv-info-bg); }
.rv-stage.completed { background: var(--rv-success-bg); }

/* ------------------------------
   15. Priority / Activity Lists
   ------------------------------ */

.rv-list {
  display: grid;
  gap: 10px;
}

.rv-list-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: #FBFAFB;
}

.rv-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--rv-maroon-100);
  color: var(--rv-maroon-700);
}

.rv-list-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
}

.rv-list-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--rv-text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.rv-list-meta {
  color: var(--rv-text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

/* ------------------------------
   16. Details Side Panel / Drawer
   ------------------------------ */

.rv-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(31, 4, 10, 0.48);
  backdrop-filter: blur(3px);
  z-index: 80;
}

.rv-overlay.open {
  display: block;
}

.rv-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(700px, 96vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -24px 0 70px rgba(32, 28, 94, 0.20);
  transform: translateX(102%);
  transition: transform var(--rv-transition);
  z-index: 90;
}

.rv-drawer.open {
  transform: translateX(0);
}

.rv-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rv-border);
  background:
    linear-gradient(135deg, var(--rv-maroon-50), #fff);
}

.rv-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 90px;
  background: #FCFBFC;
}

.rv-drawer-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--rv-border);
  background: rgba(255, 255, 255, 0.98);
}

/* ------------------------------
   17. Detail Cards
   ------------------------------ */

.rv-detail-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-lg);
  background: #fff;
}

.rv-detail-card-title {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 800;
}

.rv-file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  padding: 18px 14px;
  border: 1.5px dashed var(--rv-border, #d9d5e8);
  border-radius: 14px;
  background: #faf9ff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rv-file-drop:hover,
.rv-file-drop:focus-within,
.rv-file-drop.has-file {
  border-color: var(--rv-accent, #5b4db8);
  background: #f4f1ff;
}

.rv-file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.rv-file-drop-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--rv-text, #2b2740);
}

.rv-file-drop-name {
  font-size: 0.8rem;
  color: var(--rv-text-muted, #6b6885);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rv-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.rv-detail-label {
  display: block;
  color: var(--rv-text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rv-detail-value {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* ------------------------------
   18. Forms
   ------------------------------ */

.rv-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rv-form-group {
  min-width: 0;
}

.rv-form-group.full {
  grid-column: 1 / -1;
}

.rv-help-text {
  margin-top: 5px;
  color: var(--rv-text-muted);
  font-size: 0.7rem;
}

.rv-error-text {
  margin-top: 5px;
  color: var(--rv-danger);
  font-size: 0.7rem;
  font-weight: 700;
}

/* ------------------------------
   19. Modals
   ------------------------------ */

.rv-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(32, 28, 94, 0.58);
  backdrop-filter: blur(4px);
}

.rv-modal.open {
  display: flex;
}

.rv-modal-card {
  display: flex;
  flex-direction: column;
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  border-radius: var(--rv-radius-xl);
  background: #fff;
  box-shadow: 0 30px 80px rgba(32, 28, 94, 0.25);
}

.rv-modal-card--wide {
  width: min(1120px, 98vw);
}

#birthdaysModal .rv-col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

#birthdaysModal .rv-col-actions .rv-btn {
  white-space: nowrap;
}

.rv-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--rv-surface-muted, #f3f2fa);
  color: var(--rv-text, #201c5e);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.rv-modal-close:hover {
  background: #e8e6f4;
}

.rv-modal-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rv-border);
}

.rv-modal-hero h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rv-modal-hero .rv-muted {
  width: 100%;
  margin: 0;
  font-size: 0.78rem;
}

.rv-table tbody tr.rv-row-selectable {
  cursor: pointer;
}

.rv-table tbody tr.rv-row-selectable:hover {
  background: rgba(52, 48, 145, 0.04);
}

.rv-table-compact th,
.rv-table-compact td {
  padding: 8px 10px;
  font-size: 0.78rem;
}

body.rv-policy-modal-open {
  overflow: hidden;
}

.rv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rv-border);
}

.rv-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.rv-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.rv-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  flex-shrink: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--rv-border);
  background: #fff;
}

.rv-modal-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rv-modal-footer-actions--primary {
  margin-left: auto;
}

.rv-modal-footer .rv-btn {
  font-size: 0.8rem;
  padding: 7px 12px;
  gap: 6px;
  white-space: nowrap;
}

.rv-modal-footer form {
  display: inline-flex;
  margin: 0;
}

@media (max-width: 720px) {
  .rv-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .rv-modal-footer-actions,
  .rv-modal-footer-actions--primary {
    margin-left: 0;
    justify-content: flex-start;
  }

  .rv-modal-footer-actions--primary {
    padding-top: 4px;
    border-top: 1px dashed var(--rv-border);
  }
}

/* ------------------------------
   20. Alerts
   ------------------------------ */

.rv-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--rv-radius-md);
  border: 1px solid;
  font-size: 0.8rem;
  line-height: 1.5;
}

.rv-alert-info {
  color: var(--rv-info-dark);
  border-color: #C9DBF7;
  background: var(--rv-info-bg);
}

.rv-alert-success {
  color: var(--rv-success-dark);
  border-color: #C9E6D1;
  background: var(--rv-success-bg);
}

.rv-alert-warning {
  color: var(--rv-warning-dark);
  border-color: #F0D5A6;
  background: var(--rv-warning-bg);
}

.rv-alert-danger {
  color: var(--rv-danger-dark);
  border-color: #F2C6CB;
  background: var(--rv-danger-bg);
}

/* ------------------------------
   21. Pagination
   ------------------------------ */

.rv-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rv-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rv-border);
  border-radius: 9px;
  background: #fff;
  color: var(--rv-text-secondary);
  font-size: 0.75rem;
  font-weight: 800;
}

.rv-page-btn:hover {
  background: var(--rv-maroon-50);
  color: var(--rv-maroon-700);
}

.rv-page-btn.active {
  border-color: var(--rv-maroon-700);
  background: var(--rv-maroon-700);
  color: #fff;
}

/* ------------------------------
   22. Dropdown Menu
   ------------------------------ */

.rv-dropdown {
  position: relative;
}

.rv-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  display: none;
  padding: 7px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: #fff;
  box-shadow: var(--rv-shadow-lg);
  z-index: 60;
}

.rv-dropdown.open .rv-dropdown-menu {
  display: block;
}

.rv-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rv-text-secondary);
  font-size: 0.78rem;
  text-align: left;
}

.rv-dropdown-item:hover {
  background: var(--rv-maroon-50);
  color: var(--rv-maroon-700);
}

/* ------------------------------
   23. Toggle / Switch
   ------------------------------ */

.rv-switch {
  position: relative;
  width: 42px;
  height: 24px;
  display: inline-block;
}

.rv-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.rv-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--rv-radius-pill);
  background: #CEC8CB;
  transition: var(--rv-transition-fast);
}

.rv-switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
  transition: var(--rv-transition-fast);
}

.rv-switch input:checked + .rv-switch-slider {
  background: var(--rv-maroon-700);
}

.rv-switch input:checked + .rv-switch-slider::before {
  transform: translateX(18px);
}

/* ------------------------------
   24. Progress / Charts
   ------------------------------ */

.rv-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: var(--rv-radius-pill);
  background: #F0ECEE;
}

.rv-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rv-maroon-600), var(--rv-maroon-300));
}

.rv-donut-placeholder {
  aspect-ratio: 1;
  width: 180px;
  border-radius: 50%;
  background:
    conic-gradient(
      var(--rv-chart-maroon) 0 24%,
      var(--rv-chart-rose) 24% 43%,
      var(--rv-chart-orange) 43% 56%,
      var(--rv-chart-blue) 56% 70%,
      var(--rv-chart-green) 70% 82%,
      #EFECEF 82% 100%
    );
  position: relative;
}

.rv-donut-placeholder::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
}

/* ------------------------------
   25. Empty State
   ------------------------------ */

.rv-empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--rv-text-muted);
}

.rv-empty-state-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rv-maroon-100);
  color: var(--rv-maroon-700);
}

.rv-empty-state-title {
  margin: 0;
  color: var(--rv-text-primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.rv-empty-state-copy {
  max-width: 420px;
  margin: 7px auto 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ------------------------------
   26. Toast
   ------------------------------ */

.rv-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--rv-radius-md);
  background: var(--rv-maroon-950);
  color: #fff;
  box-shadow: var(--rv-shadow-lg);
  font-size: 0.8rem;
  z-index: 120;
}

.rv-toast.show {
  display: block;
}

/* ------------------------------
   27. Settings Page
   ------------------------------ */

.rv-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.rv-settings-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.rv-settings-card {
  padding: 18px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-lg);
  background: #fff;
  box-shadow: var(--rv-shadow-sm);
  margin: 0;
}

.rv-settings-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 800;
}

.rv-setting-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #F0ECEE;
}

.rv-setting-row:last-child {
  border-bottom: 0;
}

.rv-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: var(--rv-surface-soft);
  font-size: 0.86rem;
}

.rv-agents-filters-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
}

.rv-agents-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  gap: 12px 14px;
  align-items: end;
}

.rv-agents-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rv-agents-filter-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--rv-text-muted);
}

.rv-agents-filter-field .rv-select,
.rv-agents-filter-field .rv-input {
  width: 100%;
}

.rv-agents-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rv-agents-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rv-border);
}

.rv-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--rv-border);
  border-radius: 999px;
  background: #fff;
  color: var(--rv-text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--rv-transition-fast), background var(--rv-transition-fast), color var(--rv-transition-fast);
}

.rv-chip:hover {
  border-color: var(--rv-maroon-400, #8A3A5A);
  color: var(--rv-maroon-600, #5A1A36);
}

.rv-chip.active {
  background: var(--rv-maroon-500, #6B2142);
  border-color: var(--rv-maroon-500, #6B2142);
  color: #fff;
}

.rv-list-agent-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.rv-list-agent-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rv-text-muted);
  white-space: nowrap;
}

.rv-list-agent-filter-select {
  min-width: 180px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: #fff;
}

@media (max-width: 1100px) {
  .rv-agents-filters {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .rv-agents-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .rv-agents-filters {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------
   28. Reports Page
   ------------------------------ */

.rv-report-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px;
}

.rv-report-category {
  padding: 13px 14px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  background: var(--rv-surface-soft);
}

.rv-report-category-title {
  font-size: 0.76rem;
  font-weight: 800;
}

.rv-report-category-count {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 900;
}

/* ------------------------------
   29. Privacy Masking
   ------------------------------ */

.rv-pii-masked {
  display: inline-block;
  color: var(--rv-text-muted);
  letter-spacing: 0.02em;
}

.rv-sensitive-blur {
  filter: blur(5px);
  user-select: none;
}

/* ------------------------------
   30. Accessibility / Focus
   ------------------------------ */

:focus-visible {
  outline: 3px solid rgba(52, 48, 145, 0.28);
  outline-offset: 2px;
}

.rv-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------
   31. Responsive
   ------------------------------ */

@media (max-width: 1200px) {
  .rv-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .rv-app-shell {
    grid-template-columns: 1fr;
  }

  .rv-sidebar {
    position: fixed;
    left: 0;
    width: var(--rv-sidebar-width);
    transform: translateX(-102%);
    transition: transform var(--rv-transition);
  }

  .rv-sidebar.open {
    transform: translateX(0);
  }

  .rv-main {
    padding: 18px;
  }

  .rv-topbar {
    align-items: flex-start;
  }

  .rv-topbar-search {
    width: min(360px, 46vw);
  }

  .rv-grid-3,
  .rv-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rv-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .rv-main {
    padding: 14px;
  }

  .rv-topbar {
    flex-wrap: wrap;
  }

  .rv-topbar-search {
    order: 3;
    width: 100%;
  }

  .rv-profile-name,
  .rv-profile-role {
    display: none;
  }

  .rv-metric-grid,
  .rv-grid-2,
  .rv-grid-3,
  .rv-grid-4,
  .rv-settings-grid,
  .rv-form-grid,
  .rv-detail-grid {
    grid-template-columns: 1fr;
  }

  .rv-form-group.full {
    grid-column: auto;
  }

  .rv-toolbar {
    align-items: stretch;
  }

  .rv-search {
    flex-basis: 100%;
  }

  .rv-btn,
  .rv-toolbar .rv-select {
    flex: 1;
  }

  .rv-table-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .rv-drawer {
    width: 100vw;
  }
}

/* ------------------------------
   32. Learning library (courses tiles)
   ------------------------------ */

.rv-library-preview {
  margin: 0.75rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.rv-library-preview video,
.rv-library-preview img {
  display: block;
  width: 100%;
  max-height: 480px;
  background: #111827;
}

.rv-library-preview-wide video,
.rv-library-preview-wide img {
  max-height: min(62vh, 560px);
}

.rv-library-preview-img {
  background: var(--rv-surface-muted);
}

.rv-library-preview-img img {
  object-fit: contain;
  max-height: min(62vh, 560px);
  background: var(--rv-surface-muted);
}

.rv-library-preview-doc iframe {
  display: block;
  width: 100%;
  height: min(70vh, 560px);
  border: 0;
  background: #fff;
}

.rv-library-preview-hint {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.rv-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.rv-library-actions .rv-btn {
  justify-content: center;
  text-align: center;
}

.rv-library-spotlight {
  margin: 0 0 1.15rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 16px;
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  box-shadow: 0 10px 28px rgba(41, 38, 119, 0.07);
}

.rv-library-spotlight-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
}

.rv-library-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rv-maroon-600);
  font-weight: 700;
}

.rv-library-spotlight-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--rv-text-primary);
}

.rv-library-spotlight-desc {
  margin: 0.75rem 0 0;
  color: var(--rv-text-secondary);
  line-height: 1.5;
  max-width: 72ch;
}

.rv-library-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.rv-library-course-tile {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  box-shadow: 0 8px 22px rgba(41, 38, 119, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 100%;
}

.rv-library-course-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(41, 38, 119, 0.1);
}

.rv-library-course-tile.is-selected {
  border-color: var(--rv-maroon-400);
  box-shadow: 0 12px 28px rgba(61, 56, 153, 0.14);
}

.rv-library-course-media {
  position: relative;
  display: block;
  height: 148px;
  text-decoration: none;
  background:
    radial-gradient(120% 90% at 10% 10%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(145deg, var(--rv-maroon-800), var(--rv-maroon-500));
  color: var(--rv-text-inverse);
}

.rv-library-course-tile.is-video .rv-library-course-media {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(145deg, #1e1c5c, #3d3899 55%, #292677);
}

.rv-library-course-tile.is-pdf .rv-library-course-media {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, 0.16), transparent 50%),
    linear-gradient(145deg, #5b1d2a, #8b2940 55%, #a33a52);
}

.rv-library-course-tile.is-image .rv-library-course-media {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(145deg, #1f4d3a, #2e9b50 55%, #247e41);
}

.rv-library-course-tile.is-link .rv-library-course-media {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(145deg, #0b57d0, #4285f4 55%, #34a853);
}

.rv-library-course-tile.is-file .rv-library-course-media {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, 0.16), transparent 50%),
    linear-gradient(145deg, var(--rv-maroon-900), var(--rv-maroon-600));
}

.rv-library-course-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
}

.rv-library-course-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  opacity: 0.92;
}

.rv-library-course-play {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: var(--rv-maroon-800);
  font-size: 1.15rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.rv-library-course-body {
  padding: 0.95rem 1rem 0.35rem;
  flex: 1 1 auto;
}

.rv-library-course-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.rv-library-course-body h3 a {
  color: var(--rv-text-primary);
  text-decoration: none;
}

.rv-library-course-body h3 a:hover {
  color: var(--rv-maroon-700);
}

.rv-library-course-body p {
  margin: 0;
  color: var(--rv-text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.rv-library-course-meta {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  color: var(--rv-text-muted);
  font-size: 0.78rem;
}

.rv-library-course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1rem 1rem;
  align-items: center;
}

.rv-library-course-actions .rv-btn {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
}

.rv-library-course-actions form {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .rv-library-spotlight-head {
    flex-direction: column;
  }

  .rv-library-course-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------
   33. Print
   ------------------------------ */

@media print {
  body {
    background: #fff;
  }

  .rv-sidebar,
  .rv-topbar,
  .rv-toolbar,
  .rv-btn,
  .rv-overlay,
  .rv-toast {
    display: none !important;
  }

  .rv-app-shell {
    display: block;
  }

  .rv-main {
    padding: 0;
  }

  .rv-card,
  .rv-panel,
  .rv-detail-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
