:root {
  --rgs-navy: #071b60;
  --rgs-blue: #0b46c5;
  --rgs-purple: #5b1782;
  --rgs-gold: #f3b51b;
  --rgs-ink: #19263f;
  --rgs-muted: #5b6a82;
  --rgs-line: #dce5f2;
  --rgs-soft: #f4f7fc;
}

body.rgs-dashboard-enhanced { background: var(--rgs-soft) !important; color: var(--rgs-ink); }
.rgs-dashboard-header, .rgs-dashboard-header *, .rgs-dashboard-welcome, .rgs-dashboard-welcome *, .rgs-dashboard-info-strip, .rgs-dashboard-info-strip *, .rgs-dashboard-footer, .rgs-dashboard-footer * { box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }

.rgs-dashboard-header {
  align-items: center; background: #fff; border-bottom: 1px solid var(--rgs-line);
  box-shadow: 0 5px 24px rgba(7,27,96,.10); display: flex; gap: 20px; justify-content: space-between;
  min-height: 78px; padding: 8px clamp(18px, 3.5vw, 64px); position: sticky; top: 0; z-index: 10050;
}
.rgs-dashboard-brand { align-items: center; color: var(--rgs-navy) !important; display: flex; flex: 0 0 auto; gap: 11px; min-width: 245px; text-decoration: none !important; }
.rgs-dashboard-brand img { height: 59px; object-fit: contain; width: 59px; }
.rgs-dashboard-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.rgs-dashboard-brand b { color: var(--rgs-navy); font-size: 14px; font-weight: 900; }
.rgs-dashboard-brand small { color: #66758c; font-size: 10px; font-weight: 900; letter-spacing: .10em; margin-top: 5px; text-transform: uppercase; }
.rgs-dashboard-nav { align-items: center; display: flex; gap: 1px; justify-content: center; }
.rgs-dashboard-nav-link { border-radius: 8px; color: #38465d !important; font-size: 13px; font-weight: 800; padding: 11px 9px; text-decoration: none !important; white-space: nowrap; }
.rgs-dashboard-nav-link:hover, .rgs-dashboard-nav-link:focus { background: #edf3ff; color: var(--rgs-blue) !important; }
.rgs-dashboard-nav-link.is-active { background: var(--rgs-navy); color: #fff !important; }
.rgs-dashboard-user { flex: 0 0 auto; position: relative; }
.rgs-dashboard-user-button { align-items: center; background: #eef3fb; border: 1px solid var(--rgs-line); border-radius: 12px; color: var(--rgs-navy); cursor: pointer; display: flex; gap: 8px; max-width: 250px; padding: 6px 9px; }
.rgs-dashboard-avatar { border: 2px solid #fff; border-radius: 50%; flex: 0 0 38px; height: 38px; object-fit: cover; width: 38px; }
.rgs-dashboard-avatar-fallback { align-items: center; background: linear-gradient(135deg,var(--rgs-blue),var(--rgs-purple)); color: #fff; display: flex; font-size: 11px; font-weight: 900; justify-content: center; }
.rgs-dashboard-user-button>span:not(.rgs-dashboard-avatar) { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.rgs-dashboard-user-button span b { color: var(--rgs-navy); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgs-dashboard-user-button span small { color: var(--rgs-purple); font-size: 8px; font-weight: 900; letter-spacing: .06em; margin-top: 3px; text-transform: uppercase; }
.rgs-dashboard-user-button i { font-size: 14px; font-style: normal; }
.rgs-dashboard-user-menu { background: #fff; border: 1px solid var(--rgs-line); border-radius: 12px; box-shadow: 0 18px 45px rgba(7,27,96,.18); min-width: 220px; padding: 8px; position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; }
.rgs-dashboard-user-menu a { border-radius: 7px; color: #34425a !important; display: block; font-size: 13px; font-weight: 800; padding: 10px 11px; text-decoration: none !important; }
.rgs-dashboard-user-menu a:hover { background: #eef4ff; color: var(--rgs-blue) !important; }
.rgs-dashboard-user-menu .rgs-dashboard-signout { border-top: 1px solid var(--rgs-line); color: #a0192d !important; margin-top: 4px; }
.rgs-dashboard-menu-button { background: var(--rgs-navy); border: 0; border-radius: 8px; color: #fff; display: none; font-size: 13px; font-weight: 900; padding: 10px 14px; }

body.rgs-dashboard-enhanced #root > header,
body.rgs-dashboard-enhanced .rgs-native-dashboard-header { display: none !important; }

.rgs-dashboard-welcome {
  background: linear-gradient(130deg, var(--rgs-navy) 0%, #0a3dab 58%, var(--rgs-purple) 100%);
  color: #fff; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(400px, 620px) 115px;
  margin: 0 auto; max-width: 1900px; min-height: 265px; overflow: hidden; padding: clamp(30px, 4vw, 58px) clamp(22px, 4vw, 76px); position: relative;
}
.rgs-dashboard-welcome::after { background: radial-gradient(circle at 90% 10%, rgba(243,181,27,.38), transparent 28%); content: ""; inset: 0; pointer-events: none; position: absolute; }
.rgs-dashboard-welcome > * { position: relative; z-index: 1; }
.rgs-dashboard-eyebrow { background: var(--rgs-gold); border-radius: 999px; color: var(--rgs-navy); display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .13em; padding: 8px 12px; }
.rgs-dashboard-welcome h1 { color: #fff !important; font-size: clamp(32px, 4vw, 53px); font-weight: 900; letter-spacing: -.04em; line-height: 1.03; margin: 18px 0 11px; }
.rgs-dashboard-welcome-copy > p { color: #e8f0ff !important; font-size: 16px; line-height: 1.6; margin: 0; max-width: 680px; }
.rgs-dashboard-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.rgs-dashboard-chips span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #fff; font-size: 10px; font-weight: 800; padding: 7px 9px; }
.rgs-dashboard-quick-actions { align-self: center; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rgs-dashboard-quick-actions a { background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.55); border-radius: 13px; box-shadow: 0 10px 26px rgba(0,0,0,.10); color: var(--rgs-navy) !important; display: flex; flex-direction: column; min-height: 87px; padding: 17px; text-decoration: none !important; }
.rgs-dashboard-quick-actions a:hover, .rgs-dashboard-quick-actions a:focus { box-shadow: 0 14px 34px rgba(0,0,0,.18); transform: translateY(-2px); }
.rgs-dashboard-quick-actions a.is-primary { background: var(--rgs-gold); border-color: var(--rgs-gold); }
.rgs-dashboard-quick-actions b { font-size: 15px; font-weight: 900; }
.rgs-dashboard-quick-actions small { color: #607089; font-size: 11px; font-weight: 700; margin-top: 5px; }
.rgs-dashboard-quick-actions .is-primary small { color: #4c421b; }
.rgs-dashboard-stat { align-items: center; align-self: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 16px; display: flex; flex-direction: column; justify-content: center; min-height: 120px; padding: 14px; text-align: center; }
.rgs-dashboard-stat strong { color: #fff; font-size: 42px; line-height: 1; }
.rgs-dashboard-stat span { color: #e6edff; font-size: 10px; font-weight: 900; letter-spacing: .08em; margin-top: 8px; text-transform: uppercase; }

.rgs-dashboard-learning-intro { background:linear-gradient(125deg,var(--rgs-navy),var(--rgs-blue) 62%,var(--rgs-purple)); color:#fff; padding:38px clamp(22px,4vw,76px) 42px; }
.rgs-dashboard-learning-intro h1 { color:#fff!important; font-size:clamp(31px,4vw,48px); font-weight:900; letter-spacing:-.035em; margin:16px 0 8px; }
.rgs-dashboard-learning-intro p { color:#e8f0ff!important; font-size:14px; margin:0; }
body.rgs-learning-mode .rgs-dashboard-course-heading::before { content:"YOUR ENROLLED COURSES"; }

.rgs-dashboard-info-strip { align-items: center; background: #fff; border-bottom: 1px solid var(--rgs-line); box-shadow: 0 6px 20px rgba(7,27,96,.06); display: flex; gap: 24px; justify-content: space-between; margin: 0 auto; max-width: 1900px; padding: 16px clamp(22px, 4vw, 76px); }
.rgs-dashboard-info-strip > div:first-child { align-items: center; display: flex; gap: 12px; }
.rgs-dashboard-info-icon { align-items: center; background: var(--rgs-navy); border-radius: 50%; color: #fff; display: flex; flex: 0 0 38px; font-size: 18px; font-weight: 900; height: 38px; justify-content: center; }
.rgs-dashboard-info-strip p { color: #4c5a70 !important; font-size: 12px; line-height: 1.5; margin: 0; }
.rgs-dashboard-info-strip p b { color: var(--rgs-navy); }
.rgs-dashboard-info-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.rgs-dashboard-info-actions a { background: #eef4ff; border-radius: 8px; color: var(--rgs-blue) !important; font-size: 11px; font-weight: 900; padding: 9px 11px; text-decoration: none !important; white-space: nowrap; }
.rgs-dashboard-analytics { align-items: center; background: #fff; border-bottom: 1px solid var(--rgs-line); display: grid; gap: 28px; grid-template-columns: minmax(280px, .7fr) 1.3fr; margin: 0 auto; max-width: 1900px; padding: 24px clamp(22px,4vw,76px); }
.rgs-dashboard-analytics h2 { color: var(--rgs-navy)!important; font-size: 25px; font-weight: 900; margin: 10px 0 5px; }
.rgs-dashboard-analytics p { color: var(--rgs-muted)!important; font-size: 11px; line-height: 1.5; margin: 0; }
.rgs-dashboard-metrics { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); }
.rgs-dashboard-metrics article { background: linear-gradient(145deg,#f8faff,#edf3ff); border: 1px solid var(--rgs-line); border-radius: 12px; display: flex; flex-direction: column; min-height: 84px; padding: 14px; }
.rgs-dashboard-metrics strong { color: var(--rgs-navy); font-size: 25px; font-weight: 900; }
.rgs-dashboard-metrics span { color: #5a6a82; font-size: 9px; font-weight: 900; letter-spacing: .05em; margin-top: 5px; text-transform: uppercase; }
.rgs-dashboard-activity-list { border-top:1px solid var(--rgs-line); grid-column:1/-1; padding-top:20px; }
.rgs-dashboard-activity-head b { color:var(--rgs-navy); display:block; font-size:14px; }
.rgs-dashboard-activity-head span { color:var(--rgs-muted); display:block; font-size:10px; margin-top:4px; }
.rgs-dashboard-activity-table { border:1px solid var(--rgs-line); border-radius:11px; margin-top:12px; overflow:hidden; }
.rgs-dashboard-activity-table>div { align-items:center; background:#fff; border-bottom:1px solid var(--rgs-line); display:grid; gap:12px; grid-template-columns:minmax(180px,1.2fr) .45fr .75fr auto; padding:10px 12px; }
.rgs-dashboard-activity-table>div:last-child { border-bottom:0; }
.rgs-dashboard-activity-table .is-heading { background:#edf3ff; color:var(--rgs-navy); font-size:9px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.rgs-dashboard-activity-table span { color:#44536a; font-size:10px; }
.rgs-dashboard-activity-table span:first-child { display:flex; flex-direction:column; }
.rgs-dashboard-activity-table b { color:var(--rgs-navy); font-size:11px; }
.rgs-dashboard-activity-table small { color:#718097; font-size:9px; margin-top:2px; }
.rgs-dashboard-activity-table button { background:var(--rgs-navy); border:0; border-radius:7px; color:#fff; cursor:pointer; font-size:9px; font-weight:900; padding:8px 10px; }
.rgs-dashboard-no-activity { color:var(--rgs-muted)!important; font-size:11px; }
.rgs-activity-detail-modal,.rgs-activity-detail-modal * { box-sizing:border-box; font-family:Arial,Helvetica,sans-serif; }
.rgs-activity-detail-modal { align-items:center; display:flex; inset:0; justify-content:center; padding:22px; position:fixed; z-index:31000; }
.rgs-activity-detail-backdrop { background:rgba(4,15,55,.84); inset:0; position:absolute; }
.rgs-activity-detail-panel { background:#fff; border-radius:18px; box-shadow:0 30px 90px rgba(0,0,0,.4); max-height:calc(100vh - 44px); max-width:1120px; overflow:hidden; position:relative; width:100%; }
.rgs-activity-detail-head { align-items:flex-start; background:linear-gradient(135deg,var(--rgs-navy),var(--rgs-purple)); border-bottom:6px solid var(--rgs-gold); display:flex; justify-content:space-between; padding:20px 24px; }
.rgs-activity-detail-head span { color:var(--rgs-gold); font-size:9px; font-weight:900; letter-spacing:.12em; }
.rgs-activity-detail-head h2 { color:#fff!important; font-size:23px; font-weight:900; margin:7px 0 0; }
.rgs-activity-detail-head button { background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.35); border-radius:50%; color:#fff; cursor:pointer; font-size:25px; height:38px; width:38px; }
.rgs-activity-detail-body { max-height:calc(100vh - 170px); overflow:auto; padding:20px; }
.rgs-activity-detail-table { border:1px solid var(--rgs-line); border-radius:10px; overflow:hidden; }
.rgs-activity-detail-table>div { align-items:start; border-bottom:1px solid var(--rgs-line); display:grid; gap:12px; grid-template-columns:.6fr 1.5fr .4fr .7fr; padding:10px; }
.rgs-activity-detail-table>div:last-child { border-bottom:0; }
.rgs-activity-detail-table .is-heading { background:#edf3ff; color:var(--rgs-navy); font-size:9px; font-weight:900; text-transform:uppercase; }
.rgs-activity-detail-table span { color:#44536a; font-size:10px; line-height:1.4; }
.rgs-activity-detail-table span:first-child { display:flex; flex-direction:column; }
.rgs-activity-detail-table b { color:var(--rgs-navy); }
.rgs-activity-detail-table small { color:#7a8798; font-size:8px; margin-top:3px; word-break:break-all; }

body.rgs-dashboard-enhanced #root { background: var(--rgs-soft) !important; }
body.rgs-dashboard-enhanced #root main { margin: 0 auto; max-width: 1900px; padding: clamp(28px, 4vw, 58px) clamp(18px, 3.5vw, 66px) 70px !important; }
.rgs-dashboard-course-heading { color: var(--rgs-navy) !important; font-size: clamp(28px, 3.5vw, 42px) !important; font-weight: 900 !important; letter-spacing: -.03em; }
.rgs-dashboard-course-heading::before { color: var(--rgs-purple); content: "ENROLLED LEARNING"; display: block; font-size: 10px; font-weight: 900; letter-spacing: .14em; margin-bottom: 7px; }
.rgs-dashboard-course-heading-wrap { align-items: flex-end; margin-bottom: 18px !important; }

.rgs-course-card-enhanced { background: #fff !important; border: 1px solid var(--rgs-line) !important; border-left: 6px solid var(--rgs-gold) !important; border-radius: 16px !important; box-shadow: 0 12px 34px rgba(7,27,96,.10) !important; margin-bottom: 18px !important; overflow: hidden !important; transition: box-shadow .2s ease, transform .2s ease; }
.rgs-course-card-enhanced:hover { box-shadow: 0 18px 44px rgba(7,27,96,.16) !important; transform: translateY(-2px); }
.rgs-course-card-enhanced img { object-fit: cover; }
.rgs-course-card-enhanced h2, .rgs-course-card-enhanced h3, .rgs-course-card-enhanced h4 { color: var(--rgs-navy) !important; font-weight: 900 !important; }
.rgs-dashboard-course-action { background: linear-gradient(135deg, var(--rgs-navy), var(--rgs-blue)) !important; border: 0 !important; border-radius: 9px !important; box-shadow: 0 7px 18px rgba(7,27,96,.20) !important; color: #fff !important; font-weight: 900 !important; min-width: 150px; padding: 10px 18px !important; }
.rgs-dashboard-course-action:hover, .rgs-dashboard-course-action:focus { background: linear-gradient(135deg, var(--rgs-purple), var(--rgs-blue)) !important; color: #fff !important; }
.rgs-dashboard-discovery-card { background: linear-gradient(145deg, #fff, #eef4ff) !important; border: 1px solid var(--rgs-line) !important; border-radius: 16px !important; box-shadow: 0 12px 34px rgba(7,27,96,.10) !important; overflow: hidden !important; }
.rgs-dashboard-discovery-card a { color: var(--rgs-purple) !important; font-weight: 900 !important; }
.rgs-dashboard-view-as { background: #fff !important; border: 1px solid var(--rgs-line) !important; border-radius: 12px !important; box-shadow: 0 8px 24px rgba(7,27,96,.08) !important; margin: 22px auto 0 !important; max-width: calc(1900px - 80px); padding: 14px 18px !important; }
.rgs-dashboard-view-as button { background: var(--rgs-purple) !important; border-color: var(--rgs-purple) !important; color: #fff !important; }
.rgs-dashboard-footer { align-items:center; background:var(--rgs-navy); border-top:6px solid var(--rgs-gold); color:#fff; display:grid; gap:22px; grid-template-columns:1fr auto; padding:25px clamp(20px,4vw,70px); }
.rgs-dashboard-footer>div { align-items:center; display:flex; gap:12px; }
.rgs-dashboard-footer img { background:#fff; border-radius:8px; height:52px; object-fit:contain; padding:3px; width:52px; }
.rgs-dashboard-footer span { display:flex; flex-direction:column; }
.rgs-dashboard-footer b { font-size:13px; }
.rgs-dashboard-footer small { color:#dce8ff; font-size:10px; margin-top:4px; }
.rgs-dashboard-footer nav { display:flex; flex-wrap:wrap; gap:16px; }
.rgs-dashboard-footer a { color:#fff!important; font-size:11px; font-weight:800; text-decoration-color:var(--rgs-gold)!important; }
.rgs-dashboard-footer>p { color:#cbd8ef!important; font-size:9px; grid-column:1/-1; margin:0; }

@media (max-width: 1380px) {
  .rgs-dashboard-brand { min-width: 60px; }
  .rgs-dashboard-brand span { display: none; }
  .rgs-dashboard-nav-link { padding-left: 7px; padding-right: 7px; }
  .rgs-dashboard-welcome { grid-template-columns: minmax(0, 1fr) minmax(380px, 560px); }
  .rgs-dashboard-stat { display: none; }
}
@media (max-width: 1080px) {
  .rgs-dashboard-menu-button { display: block; margin-left: auto; }
  .rgs-dashboard-nav { align-items: stretch; background: #fff; border: 1px solid var(--rgs-line); border-radius: 12px; box-shadow: 0 18px 45px rgba(7,27,96,.17); display: none; flex-direction: column; padding: 10px; position: absolute; right: 190px; top: 70px; width: 220px; }
  .rgs-dashboard-nav.is-open { display: flex; }
  .rgs-dashboard-welcome { grid-template-columns: 1fr; }
  .rgs-dashboard-quick-actions { max-width: 720px; }
  .rgs-dashboard-info-strip { align-items: flex-start; flex-direction: column; }
  .rgs-dashboard-analytics { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .rgs-dashboard-header { gap: 9px; min-height: 68px; padding: 5px 13px; }
  .rgs-dashboard-brand img { height: 52px; width: 52px; }
  .rgs-dashboard-user-button { max-width: 130px; padding: 9px; }
  .rgs-dashboard-nav { right: 13px; top: 62px; }
  .rgs-dashboard-welcome { padding: 30px 18px; }
  .rgs-dashboard-quick-actions { grid-template-columns: 1fr; }
  .rgs-dashboard-quick-actions a { min-height: 72px; }
  .rgs-dashboard-info-actions { flex-wrap: wrap; }
  body.rgs-dashboard-enhanced #root main { padding-left: 12px !important; padding-right: 12px !important; }
  .rgs-course-card-enhanced { border-left-width: 4px !important; }
  .rgs-dashboard-footer { grid-template-columns:1fr; }
  .rgs-dashboard-footer>p { grid-column:1; }
  .rgs-dashboard-activity-table .is-heading,.rgs-activity-detail-table .is-heading { display:none; }
  .rgs-dashboard-activity-table>div,.rgs-activity-detail-table>div { align-items:start; grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}