/* ==========================================
   RESCORE DASHBOARD - CSS
   Version: 3.2 (Plugin Build)
   ========================================== */

:root {
  --rsc-color-bg: #f4f7f6;
  --rsc-color-sidebar-bg: #ffffff;
  --rsc-color-primary: #007bff;
  --rsc-color-secondary: #28a745;
  --rsc-color-accent: #ffc107;
  --rsc-color-text: #003d82;
  --rsc-color-text-light: #0052a3;
  --rsc-color-text-muted: #5a7a9a;
  --rsc-color-border: #e0e0e0;
  --rsc-sidebar-width: 280px;
  --rsc-mobile-nav-height: 75px;
  --rsc-glass-green: rgba(132, 250, 176, 0.15);
  --rsc-glass-yellow: rgba(255, 234, 102, 0.25);
  --rsc-glass-blue: rgba(143, 211, 244, 0.15);
  --rsc-glass-border: rgba(255, 255, 255, 0.3);
  --rsc-glass-shadow: rgba(0, 0, 0, 0.1);
  --rsc-icon-green: linear-gradient(135deg, #4CAF50, #66BB6A);
  --rsc-icon-yellow: linear-gradient(135deg, #ffd700, #FFCA28);
  --rsc-icon-blue: linear-gradient(135deg, #2196F3, #42A5F5);
  --rsc-icon-gradient: linear-gradient(135deg, #4CAF50 0%, #ffd700 50%, #2196F3 100%);
  --rsc-gradient-bg: linear-gradient(135deg, #84fab0 0%, #ffeaa7 25%, #8fd3f4 50%, #fdcb6e 75%, #a6c1ee 100%);
  --rsc-sidebar-bg: rgba(255, 255, 255, 0.12);
  --rsc-sidebar-title-bg: rgba(255, 255, 255, 0.1);
  --rsc-summary-bg: rgba(255, 255, 255, 0.08);
  --rsc-summary-hover-bg: rgba(255, 255, 255, 0.15);
  --rsc-summary-open-bg: rgba(255, 234, 102, 0.25);
  --rsc-navlink-bg: rgba(255, 255, 255, 0.05);
  --rsc-navlink-hover-bg: rgba(255, 255, 255, 0.2);
  --rsc-card-bg: rgba(255, 255, 255, 0.7);
  --rsc-card-hover-bg: rgba(255, 255, 255, 0.85);
  --rsc-loader-bg: rgba(255, 255, 255, 0.15);
  --rsc-mobile-nav-bg: rgba(255, 255, 255, 0.15);
  --rsc-drawer-bg: rgba(255, 255, 255, 0.95);
  --rsc-scrollbar-track: rgba(255, 255, 255, 0.1);
  --rsc-scrollbar-thumb: rgba(255, 255, 255, 0.3);
  --rsc-scrollbar-thumb-hover: rgba(255, 255, 255, 0.5);

  /* ── Card Content Theme (used by all dashboard card PHP output) ── */
  --rsc-cc-bg: transparent;
  --rsc-cc-radius: 12px;
  --rsc-cc-padding: 20px;
  --rsc-cc-shadow: none;
  --rsc-cc-border: none;
  --rsc-cc-font: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --rsc-cc-font-size: 14px;
  --rsc-cc-text: #141B23;
  --rsc-cc-text-secondary: #3d4852;
  --rsc-cc-text-muted: #5a6370;
  --rsc-cc-text-light: #7a8694;
  --rsc-cc-heading: 17px;
  --rsc-cc-stat-size: 22px;
  --rsc-cc-stat-big: 32px;
  --rsc-cc-navy: #0C54A0;
  --rsc-cc-gold: #FED34F;
  --rsc-cc-green: #4CAF50;
  --rsc-cc-red: #E74C3C;
  --rsc-cc-orange: #f97316;
  --rsc-cc-dark: #141B23;
  --rsc-cc-section-bg: rgba(255,255,255,.55);
  --rsc-cc-section-border: rgba(0,0,0,.08);
  --rsc-cc-section-radius: 10px;
  --rsc-cc-table-header-bg: rgba(0,0,0,.04);
  --rsc-cc-table-border: #e2e6ea;
  --rsc-cc-table-hover: rgba(12,84,160,.04);
  --rsc-cc-table-stripe: rgba(0,0,0,.02);
  --rsc-cc-accent-red-bg: rgba(231,76,60,.05);
  --rsc-cc-accent-blue-bg: rgba(12,84,160,.05);
  --rsc-cc-accent-gold-bg: rgba(254,211,79,.1);
}

body.rsc-dark-mode {
  --rsc-color-bg: #0a0e27;
  --rsc-color-sidebar-bg: #1a1d2e;
  --rsc-color-primary: #4da3ff;
  --rsc-color-secondary: #4ade80;
  --rsc-color-accent: #fbbf24;
  --rsc-color-text: #e0f2fe;
  --rsc-color-text-light: #bae6fd;
  --rsc-color-text-muted: #94a3b8;
  --rsc-color-border: #2d3548;
  --rsc-glass-green: rgba(74, 222, 128, 0.1);
  --rsc-glass-yellow: rgba(251, 191, 36, 0.15);
  --rsc-glass-blue: rgba(77, 163, 255, 0.1);
  --rsc-glass-border: rgba(255, 255, 255, 0.1);
  --rsc-glass-shadow: rgba(0, 0, 0, 0.5);
  --rsc-gradient-bg: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #1e3c72 75%, #2a5298 100%);
  --rsc-sidebar-bg: rgba(26, 29, 46, 0.6);
  --rsc-sidebar-title-bg: rgba(255, 255, 255, 0.05);
  --rsc-summary-bg: rgba(255, 255, 255, 0.05);
  --rsc-summary-hover-bg: rgba(255, 255, 255, 0.1);
  --rsc-summary-open-bg: rgba(251, 191, 36, 0.15);
  --rsc-navlink-bg: rgba(255, 255, 255, 0.03);
  --rsc-navlink-hover-bg: rgba(255, 255, 255, 0.12);
  --rsc-card-bg: rgba(26, 29, 46, 0.7);
  --rsc-card-hover-bg: rgba(26, 29, 46, 0.85);
  --rsc-loader-bg: rgba(10, 14, 39, 0.7);
  --rsc-mobile-nav-bg: rgba(26, 29, 46, 0.8);
  --rsc-drawer-bg: rgba(26, 29, 46, 0.95);
  --rsc-scrollbar-track: rgba(255, 255, 255, 0.05);
  --rsc-scrollbar-thumb: rgba(255, 255, 255, 0.15);
  --rsc-scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);

  /* ── Card Content Dark Mode ── */
  --rsc-cc-bg: transparent;
  --rsc-cc-text: #e0f2fe;
  --rsc-cc-text-secondary: #bae6fd;
  --rsc-cc-text-muted: #94a3b8;
  --rsc-cc-text-light: #64748b;
  --rsc-cc-dark: #e0f2fe;
  --rsc-cc-section-bg: rgba(255,255,255,.06);
  --rsc-cc-section-border: rgba(255,255,255,.1);
  --rsc-cc-table-header-bg: rgba(255,255,255,.05);
  --rsc-cc-table-border: rgba(255,255,255,.1);
  --rsc-cc-table-hover: rgba(77,163,255,.08);
  --rsc-cc-table-stripe: rgba(255,255,255,.03);
  --rsc-cc-accent-red-bg: rgba(231,76,60,.1);
  --rsc-cc-accent-blue-bg: rgba(77,163,255,.08);
  --rsc-cc-accent-gold-bg: rgba(251,191,36,.1);
}

.e-con:has(.rsc-dashboard-container) { --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; }
.rsc-dashboard-container { font-family: 'Exo 2', sans-serif; display: flex; background: var(--rsc-gradient-bg); background-attachment: fixed; color: var(--rsc-color-text); min-height: 100vh; transition: background 0.3s ease; margin: 0; padding: 0; box-sizing: border-box; }
.rsc-dashboard-container svg { max-width: 100%; height: auto; }
.rsc-dashboard-container *, .rsc-dashboard-container *::before, .rsc-dashboard-container *::after { box-sizing: border-box; }

/* Theme Toggle */
.rsc-theme-toggle { position: fixed; top: 20px; right: 50px; width: 100px; height: 46px; cursor: pointer; z-index: 9999; user-select: none; transition: all 0.3s ease; }
.rsc-theme-toggle:hover { transform: translateY(-2px); }
.rsc-toggle-track { position: relative; width: 100%; height: 100%; background: rgba(255,255,255,0.15); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 23px; border: 2px solid rgba(255,255,255,0.25); box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: space-between; padding: 0 8px; overflow: hidden; }
.rsc-toggle-slider { position: absolute; top: 4px; left: 4px; width: 44px; height: 36px; background: linear-gradient(135deg, #ffd89b 0%, #ff9a56 100%); border-radius: 18px; transition: all 0.4s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 4px 12px rgba(255,154,86,0.4); z-index: 1; }
body.rsc-dark-mode .rsc-toggle-slider { left: 50px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); box-shadow: 0 4px 12px rgba(118,75,162,0.4); }
.rsc-toggle-icon-sun, .rsc-toggle-icon-moon { position: relative; z-index: 2; font-size: 1.3em; transition: all 0.3s ease; filter: grayscale(70%) opacity(0.5); width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
body:not(.rsc-dark-mode) .rsc-toggle-icon-sun { filter: grayscale(0%) opacity(1); transform: scale(1.1); }
body.rsc-dark-mode .rsc-toggle-icon-moon { filter: grayscale(0%) opacity(1); transform: scale(1.1); }

/* Sidebar */
.rsc-sidebar { width: var(--rsc-sidebar-width); position: fixed; top: 0; left: 0; bottom: 0; background: var(--rsc-sidebar-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 2px solid var(--rsc-glass-border); padding: 20px; overflow-y: auto; box-shadow: 4px 0 24px var(--rsc-glass-shadow); z-index: 100; }
.admin-bar .rsc-sidebar { top: 32px; }
.admin-bar .rsc-main-content { padding-top: 40px; }
.rsc-sidebar::-webkit-scrollbar { width: 8px; }
.rsc-sidebar::-webkit-scrollbar-track { background: var(--rsc-scrollbar-track); border-radius: 10px; }
.rsc-sidebar::-webkit-scrollbar-thumb { background: var(--rsc-scrollbar-thumb); border-radius: 10px; }
.rsc-sidebar-title { color: var(--rsc-color-text); margin-top: 0; font-weight: 700; font-size: 1.4em; padding: 12px; background: var(--rsc-sidebar-title-bg); backdrop-filter: blur(10px); border-radius: 12px; border: 1px solid var(--rsc-glass-border); margin-bottom: 20px; text-align: center; }
.rsc-sidebar details { margin-bottom: 8px; }
.rsc-sidebar summary { font-size: 16px; font-weight: 700; color: var(--rsc-color-text); padding: 13px 15px; cursor: pointer; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 10px; border: 1px solid rgba(255,255,255,.18); transition: all 0.3s ease; list-style: none; display: flex; align-items: center; gap: 10px; letter-spacing: 0.2px; }
.rsc-sidebar summary::-webkit-details-marker { display: none; }
.rsc-sidebar summary:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.25); }
.rsc-sidebar details[open] summary { background: rgba(254,211,79,.12); border-color: rgba(254,211,79,.35); }
.rsc-sidebar summary::after { content: ''; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid var(--rsc-color-text-muted); border-bottom: 1.5px solid var(--rsc-color-text-muted); transform: rotate(45deg); margin-left: auto; flex-shrink: 0; transition: transform .25s ease; }
.rsc-sidebar details[open] summary::after { transform: rotate(-135deg); }
.rsc-cat-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; padding: 4px; flex-shrink: 0; }
.rsc-cat-icon svg { width: 16px; height: 16px; stroke: white; }
.rsc-cat-icon.green { background: var(--rsc-icon-green); }
.rsc-cat-icon.yellow { background: var(--rsc-icon-yellow); }
.rsc-cat-icon.blue { background: var(--rsc-icon-blue); }
.rsc-cat-icon.red { background: linear-gradient(135deg, #E74C3C, #e85d4f); }
.rsc-cat-icon.gradient { background: var(--rsc-icon-gradient); }
.rsc-sidebar-exam-icon { width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }
.rsc-sidebar .rsc-nav-link { display: block; padding: 9px 14px 9px 38px; text-decoration: none; color: #0C54A0; border-radius: 8px; transition: all 0.25s ease; margin: 2px 0; background: transparent; border: 1px solid transparent; font-weight: 500; font-size: 14px; line-height: 1.4; }
.rsc-sidebar .rsc-nav-link:hover { background: rgba(12,84,160,.08); color: #083d78; transform: translateX(4px); border-color: rgba(12,84,160,.12); }
.rsc-sidebar .rsc-nav-link.sub { padding-left: 45px; font-size: 0.85em; color: var(--rsc-color-text-muted); }
.rsc-sidebar .rsc-nav-link.exam-history { margin-top: 10px; font-weight: 600; background: var(--rsc-summary-bg); border: 1px solid var(--rsc-glass-border); display: flex; align-items: center; gap: 8px; }
.rsc-sidebar .rsc-nav-link.exam-history svg { width: 18px; height: 18px; flex-shrink: 0; }
.rsc-sidebar-divider { height: 1px; background: var(--rsc-glass-border); margin: 15px 0; }
.rsc-sub-links { margin-left: 10px; }

/* Main Content */
.rsc-main-content { margin-left: var(--rsc-sidebar-width); width: calc(100% - var(--rsc-sidebar-width)); padding: 30px; position: relative; min-height: 100vh; overflow-x: hidden; }
/* Global: prevent horizontal scrollbars on all card containers */
.rsc-main-content > div { max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
.rsc-main-content table { table-layout: auto; max-width: 100%; }
.rsc-main-content img { max-width: 100%; height: auto; }
.rsc-layer { display: none; animation: rscFadeIn 0.4s ease; scrollbar-width: none; -ms-overflow-style: none; }
.rsc-layer::-webkit-scrollbar { display: none; }
.rsc-layer.active { display: block; }
@keyframes rscFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Layer 1 */
.rsc-layer-header { margin-bottom: 30px; text-align: center; }
.rsc-welcome-title { font-size: 2.2em; font-weight: 700; color: var(--rsc-color-text); margin-bottom: 8px; background: var(--rsc-icon-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rsc-welcome-subtitle { color: var(--rsc-color-text-muted); font-size: 15px; }
.rsc-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.rsc-glass-card { background: var(--rsc-card-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.8); border-radius: 24px; padding: 32px; cursor: pointer; transition: all 0.4s cubic-bezier(0.4,0,0.2,1); position: relative; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.rsc-glass-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rsc-icon-gradient); opacity: 0; transition: opacity 0.3s ease; }
.rsc-glass-card:hover { transform: translateY(-6px); background: var(--rsc-card-hover-bg); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.rsc-glass-card:hover::before { opacity: 1; }
.rsc-card-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.rsc-card-icon svg { width: 28px; height: 28px; stroke: white; }
.rsc-card-icon.green { background: var(--rsc-icon-green); }
.rsc-card-icon.yellow { background: var(--rsc-icon-yellow); }
.rsc-card-icon.blue { background: var(--rsc-icon-blue); }
.rsc-card-icon.red { background: linear-gradient(135deg, #E74C3C, #e85d4f); }
.rsc-card-icon.gradient { background: var(--rsc-icon-gradient); }
.rsc-card-title { font-size: 1.3em; font-weight: 600; color: var(--rsc-color-text); margin-bottom: 10px; }
.rsc-card-subtitle { color: var(--rsc-color-text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.rsc-card-footer { display: flex; align-items: center; gap: 8px; color: var(--rsc-color-text-muted); font-size: 0.9em; font-weight: 500; transition: all 0.3s ease; }
.rsc-card-footer svg { width: 18px; height: 18px; flex-shrink: 0; }
.rsc-glass-card:hover .rsc-card-footer { color: var(--rsc-color-text); }
.rsc-arrow-icon { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.3s ease; }
.rsc-glass-card:hover .rsc-arrow-icon { transform: translateX(4px); }
.rsc-exam-history-card > svg, .rsc-exam-history-card > .rsc-arrow-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Exam History Card */
.rsc-exam-history-card { max-width: 900px; margin: 24px auto 0; background: var(--rsc-card-bg); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.8); border-radius: 16px; padding: 20px 24px; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: space-between; }
.rsc-exam-history-card:hover { transform: translateY(-3px); background: var(--rsc-card-hover-bg); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.rsc-exam-history-content { display: flex; align-items: center; gap: 16px; }
.rsc-exam-history-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--rsc-icon-gradient); border-radius: 12px; flex-shrink: 0; }
.rsc-exam-history-icon svg { width: 26px; height: 26px; stroke: white; }
.rsc-exam-history-text { display: flex; flex-direction: column; gap: 2px; }
.rsc-exam-history-title { font-weight: 600; color: var(--rsc-color-text); font-size: 1em; }
.rsc-exam-history-subtitle { color: var(--rsc-color-text-muted); font-size: 15px; }
.rsc-exam-history-card .rsc-arrow-icon { color: var(--rsc-color-text-muted); }
.rsc-exam-history-card:hover .rsc-arrow-icon { transform: translateX(4px); color: var(--rsc-color-text); }

/* Layer 2 */
.rsc-back-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--rsc-color-text); background: var(--rsc-card-bg); backdrop-filter: blur(10px); border: 1px solid var(--rsc-glass-border); padding: 12px 20px; border-radius: 12px; cursor: pointer; font-size: 0.95em; font-weight: 500; font-family: 'Exo 2', sans-serif; margin-bottom: 24px; transition: all 0.3s ease; }
.rsc-back-btn:hover { background: var(--rsc-card-hover-bg); transform: translateX(-3px); }
.rsc-back-btn svg { width: 18px; height: 18px; }
.rsc-layer2-header { background: var(--rsc-card-bg); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.8); border-radius: 20px; padding: 28px; margin-bottom: 24px; display: flex; align-items: center; gap: 20px; }
.rsc-layer2-icon { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rsc-layer2-icon svg { width: 32px; height: 32px; }
.rsc-layer2-icon.green { background: var(--rsc-icon-green); }
.rsc-layer2-icon.yellow { background: var(--rsc-icon-yellow); }
.rsc-layer2-icon.blue { background: var(--rsc-icon-blue); }
.rsc-layer2-icon.gradient { background: var(--rsc-icon-gradient); }
.rsc-layer2-text h2 { font-size: 1.5em; font-weight: 700; color: var(--rsc-color-text); margin-bottom: 6px; }
.rsc-layer2-text p { color: var(--rsc-color-text-muted); font-size: 15px; margin: 0; }
.rsc-items-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rsc-item-card { background: var(--rsc-card-bg); backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.8); border-radius: 18px; padding: 24px; cursor: pointer; transition: all 0.3s ease; }
.rsc-item-card:hover { background: var(--rsc-card-hover-bg); transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.1); }
.rsc-item-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rsc-item-number { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.85em; font-weight: 600; color: white; }
.rsc-item-number.green { background: var(--rsc-icon-green); }
.rsc-item-number.yellow { background: var(--rsc-icon-yellow); }
.rsc-item-number.blue { background: var(--rsc-icon-blue); }
.rsc-item-number.gradient { background: var(--rsc-icon-gradient); }
.rsc-item-title { font-size: 1em; font-weight: 600; color: var(--rsc-color-text); }
.rsc-item-subtitle { color: var(--rsc-color-text-muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* Layer 3 */
.rsc-layer3-content { min-height: 400px; }
.rsc-card-pane { display: none; }
.rsc-card-pane.active { display: block; animation: rscFadeIn 0.4s ease; }
/* Force all cards to fill pane width — overrides individual card max-width constraints
   so no card appears as a narrow strip. Internal elements keep their own widths. */
.rsc-card-pane.active > * {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}
.rsc-selection-screen { display: none; text-align: center; padding: 40px 20px; }
.rsc-selection-screen.active { display: block; }
.rsc-selection-title { font-size: 1.6em; font-weight: 700; color: var(--rsc-color-text); margin-bottom: 10px; }
.rsc-selection-subtitle { color: var(--rsc-color-text-muted); font-size: 15px; margin-bottom: 30px; }
.rsc-selection-cards { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.rsc-selection-card { background: var(--rsc-card-bg); backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.8); border-radius: 20px; padding: 30px 40px; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 140px; }
.rsc-selection-card:hover { background: var(--rsc-card-hover-bg); transform: translateY(-6px); box-shadow: 0 15px 35px rgba(0,0,0,0.12); }
.rsc-selection-icon { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: var(--rsc-icon-gradient); border-radius: 16px; }
.rsc-selection-icon svg { width: 36px; height: 36px; stroke: white; }
.rsc-selection-label { font-weight: 600; color: var(--rsc-color-text); }

/* Loader */
.rsc-loader-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--rsc-loader-bg); backdrop-filter: blur(10px); z-index: 1000; align-items: center; justify-content: center; }
.rsc-spinner { width: 60px; height: 60px; border: 5px solid var(--rsc-glass-border); border-top-color: var(--rsc-color-accent); border-radius: 50%; animation: rscSpin 0.8s linear infinite; }
@keyframes rscSpin { to { transform: rotate(360deg); } }

/* Mobile Nav */
.rsc-mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--rsc-mobile-nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 2px solid var(--rsc-glass-border); box-shadow: 0 -4px 24px var(--rsc-glass-shadow); z-index: 2001; flex-direction: column; padding: 0; }
.rsc-swipe-indicator { display: flex; flex-direction: column; align-items: center; padding: 4px 0 2px; cursor: pointer; }
.rsc-swipe-handle { width: 40px; height: 4px; background: var(--rsc-color-accent); border-radius: 2px; animation: rscPulseHandle 2s ease-in-out infinite; }
@keyframes rscPulseHandle { 0%, 100% { opacity: 0.5; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.15); } }
.rsc-nav-buttons-container { display: flex; padding: 4px 6px 8px; gap: 5px; }
.rsc-mobile-nav-btn { flex: 1; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid var(--rsc-glass-border); border-radius: 12px; font-size: 0.75em; font-weight: 600; font-family: 'Exo 2', sans-serif; color: var(--rsc-color-text); cursor: pointer; transition: all 0.3s ease; padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; position: relative; }
.rsc-swipe-chevron { width: 14px; height: 8px; display: flex; align-items: center; justify-content: center; opacity: 0.4; animation: rscBounceChevron 2s ease-in-out infinite; }
.rsc-swipe-chevron svg { width: 12px; height: 12px; stroke: var(--rsc-color-accent); stroke-width: 2.5; }
@keyframes rscBounceChevron { 0%, 100% { transform: translateY(0); opacity: 0.3; } 50% { transform: translateY(-2px); opacity: 0.8; } }
.rsc-mobile-nav-btn:active { transform: scale(0.95); }
.rsc-mobile-nav-btn.active { background: var(--rsc-glass-yellow); border-color: var(--rsc-color-accent); }
.rsc-mobile-nav-btn.home-btn { background: rgba(255,255,255,0.15); }
.rsc-mobile-nav-btn.home-btn .rsc-swipe-chevron { display: none; }
.rsc-mobile-nav-btn.active .rsc-swipe-chevron { opacity: 0; animation: none; }
.rsc-nav-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.rsc-nav-icon svg { width: 22px; height: 22px; stroke: var(--rsc-color-text); stroke-width: 1.5; }
.rsc-nav-label { font-size: 0.9em; }
.rsc-nav-indicator { position: absolute; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--rsc-color-accent); opacity: 0; transition: opacity 0.3s ease; }
.rsc-mobile-nav-btn.active .rsc-nav-indicator { opacity: 1; }

/* Drawer */
.rsc-drawer-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 2002; opacity: 0; transition: opacity 0.3s ease; }
.rsc-drawer-overlay.active { display: block; opacity: 1; }
.rsc-mobile-drawer { position: fixed; left: 0; right: 0; bottom: 0; height: 70vh; background: var(--rsc-drawer-bg); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-top-left-radius: 24px; border-top-right-radius: 24px; border: 2px solid var(--rsc-glass-border); border-bottom: none; z-index: 2003; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); overflow: hidden; display: flex; flex-direction: column; }
.rsc-mobile-drawer.active { transform: translateY(0); }
.rsc-drawer-handle { width: 40px; height: 5px; background: var(--rsc-glass-border); border-radius: 3px; margin: 12px auto; flex-shrink: 0; }
.rsc-drawer-header { padding: 10px 20px 15px; border-bottom: 1px solid var(--rsc-glass-border); flex-shrink: 0; }
.rsc-drawer-header h3 { font-size: 1.2em; font-weight: 700; color: var(--rsc-color-text); margin: 0; }
.rsc-drawer-content { padding: 15px 20px; overflow-y: auto; flex: 1; }
.rsc-drawer-item { background: var(--rsc-card-bg); border: 1px solid rgba(255,255,255,0.5); border-radius: 14px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.3s ease; }
.rsc-drawer-item:hover, .rsc-drawer-item:active { background: var(--rsc-card-hover-bg); transform: translateX(5px); }
.rsc-drawer-item-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rsc-drawer-item-number { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.8em; font-weight: 600; color: white; }
.rsc-drawer-item-title { font-size: 1em; font-weight: 600; color: var(--rsc-color-text); }
.rsc-drawer-item-subtitle { color: var(--rsc-color-text-muted); font-size: 15px; line-height: 1.5; padding-left: 40px; margin: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .rsc-sidebar { display: none; }
  .rsc-main-content { width: 100%; margin-left: 0; padding: 15px; padding-bottom: calc(var(--rsc-mobile-nav-height) + 20px); }
  .rsc-mobile-nav { display: flex; }
  .rsc-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .rsc-glass-card { padding: 24px; }
  .rsc-card-title { font-size: 1.1em; }
  .rsc-items-list { grid-template-columns: 1fr; }
  .rsc-layer2-header { flex-direction: column; text-align: center; }
  .rsc-welcome-title { font-size: 1.6em; }
  .rsc-theme-toggle { top: 10px; right: 10px; width: 85px; height: 40px; }
  .rsc-toggle-slider { width: 38px; height: 32px; }
  body.rsc-dark-mode .rsc-toggle-slider { left: 43px; }
  .rsc-layer[data-layer="3"] { padding: 0 !important; }
  .rsc-layer3-content { width: 100% !important; padding: 0 !important; }
  .rsc-layer[data-layer="3"] .rsc-back-btn { margin: 10px; }
}
@media (max-width: 768px) {
  .rsc-main-content { padding: 10px; padding-bottom: calc(var(--rsc-mobile-nav-height) + 15px); }
  .rsc-cards-grid { gap: 12px; }
  .rsc-glass-card { padding: 20px; }
  .rsc-card-pane, .rsc-card-pane.active { padding: 0 !important; margin: 0 !important; border: none !important; border-radius: 0 !important; width: 100% !important; max-width: 100% !important; }
  .rsc-ajax-content { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; overflow-x: hidden !important; }
  .rsc-ajax-content canvas { max-width: 100% !important; }
  .rsc-ajax-content svg { max-width: 100% !important; height: auto !important; }
  .rsc-ajax-content table { width: 100% !important; }
  .rsc-ajax-content th, .rsc-ajax-content td { padding: 8px 10px !important; font-size: 14px !important; }
  .rsc-ajax-content img { max-width: 100% !important; height: auto !important; }
  .rsc-layer3-content { width: 100% !important; padding: 0 !important; margin: 0 !important; }
}
@media (max-width: 600px) {
  .rsc-cards-grid { grid-template-columns: 1fr; }
  .rsc-glass-card { padding: 18px; }
  .rsc-selection-cards { flex-direction: column; align-items: center; }
  .rsc-selection-card { width: 100%; max-width: 200px; }
  .rsc-welcome-title { font-size: 1.4em; }
}

/* Modal fixes */
.rsc-card-pane .wea-modal, .rsc-card-pane [class*="modal"], .rsc-card-pane [class*="lightbox"] { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 100001 !important; }

/* Chart.js fixes — container must have position:relative + fixed height for responsive charts */
.rsc-card-pane canvas { max-width: 100%; }
.rsc-ajax-content .chart-container, .rsc-ajax-content .chart-wrapper, .rsc-ajax-content [class*="chartContainer"], .rsc-ajax-content [class*="chartWrapper"] { position: relative !important; width: 100% !important; max-width: 100% !important; }

/* ═══════ PRIMARY KEY REPORTS LIST (Layer 1) ═══════ */
.rsc-primary-reports { max-width: 900px; margin: 0 auto 28px; }
.rsc-section-heading {
  font-size: 1.2em; font-weight: 600;
  color: var(--rsc-color-text, #1a1a2e);
  margin: 0 0 14px 0; padding: 0;
}
.rsc-primary-list {
  display: flex; flex-direction: column; gap: 10px;
}
.rsc-primary-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--rsc-card-bg, rgba(255,255,255,0.6));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--rsc-card-border, rgba(255,255,255,0.8));
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.rsc-primary-item:hover {
  background: var(--rsc-card-hover-bg, rgba(255,255,255,0.85));
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}
.rsc-primary-item:active { transform: translateX(2px); }
.rsc-primary-number {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
}
.rsc-primary-text { flex: 1; min-width: 0; }
.rsc-primary-headline {
  display: block; font-weight: 600; font-size: 15px;
  color: var(--rsc-color-text, #1a1a2e);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rsc-primary-subheadline {
  display: block; font-size: 13px; margin-top: 2px;
  color: var(--rsc-color-text-muted, #5a6370);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rsc-primary-item .rsc-arrow-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--rsc-color-text-muted, #94a3b8);
  transition: transform 0.25s ease;
}
.rsc-primary-item:hover .rsc-arrow-icon { transform: translateX(4px); }

/* ═══════ MORE ANALYSIS COLLAPSIBLE ═══════ */
.rsc-more-analysis {
  max-width: 900px; margin: 0 auto 24px;
}
.rsc-more-summary {
  cursor: pointer; font-size: 1.1em; font-weight: 600;
  color: var(--rsc-color-text-muted, #5a6370);
  padding: 12px 0; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.rsc-more-summary::-webkit-details-marker { display: none; }
.rsc-more-summary::before { content: '\25B8'; font-size: 14px; }
.rsc-more-analysis[open] > .rsc-more-summary::before { content: '\25BE'; }
.rsc-more-count { font-weight: 400; font-size: 14px; color: var(--rsc-color-text-muted, #94a3b8); }

/* ═══════ SIDEBAR KEY REPORTS SECTION ═══════ */
.rsc-sidebar .rsc-primary-section > summary { font-weight: 600; }

/* ═══════ PRIMARY LIST — MOBILE ═══════ */
@media (max-width: 768px) {
  .rsc-primary-item { padding: 12px 14px; gap: 10px; }
  .rsc-primary-number { width: 28px; height: 28px; font-size: 12px; }
  .rsc-primary-headline { font-size: 14px; }
  .rsc-primary-subheadline { font-size: 12px; }
  .rsc-primary-item .rsc-arrow-icon { width: 16px; height: 16px; }
}