/* ==========================================================================
   ClassBridge | نظام متابعة الطالب التربوية
   Luxury Executive Visual Architecture & Design System
   Font Family: Cairo (Google Fonts)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Color Palette - Figma Institutional Light Architecture (1:1 with PNG) */
  --bg-deep: #f4f6f9;
  --bg-ambient: #f8fafc;
  --bg-surface: #ffffff;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: #ffffff;
  --bg-glass-hover: #f8fafc;
  --surface-soft: #f8fafc;
  --surface-strong: #ffffff;
  --surface-muted: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  /* Institutional Accents & Emerald Primary */
  --emerald-primary: #00a86b;
  --emerald-hover: #008f5a;
  --emerald-light: #d1fae5;
  --emerald-soft: #a7f3d0;
  --primary-emerald: #00a86b;

  --sidebar-bg: #0b1329;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-active-bg: #00a86b;

  --navy-deep: #0f172a;
  --navy-card: #0e162e;

  --gold-primary: #f59e0b;
  --gold-light: #fef3c7;
  --gold-soft: #fde68a;
  --gold-deep: #b45309;

  --cyan-primary: #0284c7;
  --cyan-soft: #e0f2fe;

  --blue-primary: #3b82f6;
  --blue-soft: #eff6ff;

  --purple-primary: #7c3aed;
  --purple-soft: #ede9fe;

  --white: #0f172a;
  --muted: #64748b;
  --muted-dark: #94a3b8;
  --line: #e2e8f0;
  --line-glass: #e2e8f0;

  /* Status Colors */
  --success: #00a86b;
  --success-bg: #d1fae5;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;

  /* Layout Tokens */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --focus-ring: 0 0 0 3px rgba(0, 168, 107, 0.2);

  /* Shadows */
  --shadow-royal: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-subtle: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 4px 14px rgba(0, 168, 107, 0.25);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme Overrides */
[data-theme="dark"] {
  --bg-deep: #090d16;
  --bg-ambient: #0f172a;
  --bg-surface: #1e293b;
  --bg-panel: #1e293b;
  --bg-card: #1e293b;
  --bg-glass: #1e293b;
  --bg-glass-hover: #334155;
  --surface-soft: #0f172a;
  --surface-strong: #1e293b;
  --surface-muted: rgba(148, 163, 184, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --white: #f8fafc;
  --line: #334155;
  --line-glass: rgba(255, 255, 255, 0.1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] html,
[data-theme="dark"] body {
  background: #090d16 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .topbar {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .figma-kpi-card,
[data-theme="dark"] .figma-class-card,
[data-theme="dark"] .figma-side-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   Global Reset & Unified Executive Typography Architecture
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid rgba(0, 168, 107, 0.45);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

button,
input,
select,
textarea,
summary,
a {
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Keep scrolling available without reserving a visible scrollbar column. */
html {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  max-height: 100vh;
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f4f6f9;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

html,
body,
.app-shell,
.app-main,
.output-page,
.page-header,
.card,
.metric-panel,
.summary-card,
.table-wrapper,
.data-table,
.gradebook-page,
.risk-monitor-page,
.analytics-page,
.reports-page,
.yearbook-page,
.progress-page {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"],
html[dir="ltr"] body,
html[dir="ltr"] .app-shell,
html[dir="ltr"] .app-main,
html[dir="ltr"] .output-page,
html[dir="ltr"] .page-header,
html[dir="ltr"] .card,
html[dir="ltr"] .metric-panel,
html[dir="ltr"] .summary-card,
html[dir="ltr"] .table-wrapper,
html[dir="ltr"] .data-table,
html[dir="ltr"] .gradebook-page,
html[dir="ltr"] .risk-monitor-page,
html[dir="ltr"] .analytics-page,
html[dir="ltr"] .reports-page,
html[dir="ltr"] .yearbook-page,
html[dir="ltr"] .progress-page {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] body,
html[dir="rtl"] body .app-shell,
html[dir="rtl"] body .app-main,
html[dir="rtl"] body main,
html[dir="rtl"] body .container,
html[dir="rtl"] body .output-page,
html[dir="rtl"] body .auth-container,
html[dir="rtl"] body .auth-card,
html[dir="rtl"] body form,
html[dir="rtl"] body fieldset,
html[dir="rtl"] body table,
html[dir="rtl"] body .modal,
html[dir="rtl"] body .nav-group,
html[dir="rtl"] body .dropdown-menu {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body input,
html[dir="rtl"] body select,
html[dir="rtl"] body textarea,
html[dir="rtl"] body button,
html[dir="rtl"] body th,
html[dir="rtl"] body td {
  direction: rtl;
  text-align: right;
}

body :is(.chart-container, canvas, .score-input, input[type="number"], .student-cell small) {
  direction: ltr;
  unicode-bidi: plaintext;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.18;
  z-index: 0;
}

body::before {
  background: rgba(245, 158, 11, 0.8);
  top: -160px;
  right: -90px;
}

body::after {
  background: rgba(56, 189, 248, 0.75);
  bottom: -180px;
  left: -120px;
}

/* Unified International Heading Hierarchy Scale (Material 3 & Apple Guidelines) */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  color: var(--white);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 1.45rem;
  font-weight: 800;
}

h2 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--white);
}

h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--gold-light);
}

h4 {
  font-size: 0.9rem;
  font-weight: 700;
}

h5 {
  font-size: 0.82rem;
  font-weight: 700;
}

h6 {
  font-size: 0.75rem;
  font-weight: 700;
}

/* Card & Component Header Typography Uniformity */
.card h2,
.card-header-row h2,
.sidebar-panel h2,
.metric-panel h2,
.stat-card h2,
.recommendation-item h2,
.reference-item h2 {
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-heading h1,
.page-header h1 {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  line-height: 1.25;
  margin: 0;
}

/* Ambient Animated Lighting Background */
body {
  background:
    radial-gradient(circle at 12% 15%, rgba(245, 158, 11, 0.09), transparent 35%),
    radial-gradient(circle at 88% 20%, rgba(56, 189, 248, 0.08), transparent 35%),
    radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.06), transparent 45%),
    linear-gradient(180deg, #030712 0%, #080e1a 40%, #030712 100%);
  background-attachment: fixed;
}

/* ==========================================================================
   Educational Welcome Splash Screen (الشاشة الانتقالية الفاتحة الفاخرة)
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.splash-fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: splashEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes splashEntrance {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.splash-logo {
  position: relative;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.splash-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, #00a86b 0%, #10b981 100%) !important;
  color: #ffffff !important;
  font-size: 2.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 168, 107, 0.35), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  z-index: 2;
  letter-spacing: -1px;
}

.splash-ring {
  position: absolute;
  inset: -10px;
  border-radius: 30px;
  border: 2px solid #00a86b;
  opacity: 0.3;
  animation: splashPulse 2s infinite ease-in-out;
}

@keyframes splashPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.25;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

.splash-title {
  font-size: 1.9rem;
  font-weight: 900;
  margin: 0;
  color: #0f172a !important;
  letter-spacing: -0.02em;
  -webkit-text-fill-color: initial !important;
}

.splash-subtitle {
  color: #00a86b !important;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
}

.splash-quote {
  color: #64748b !important;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 2px;
}

.splash-loader {
  width: 140px;
  height: 4px;
  background: #e2e8f0 !important;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.splash-progress {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #00a86b 0%, #10b981 100%) !important;
  border-radius: 999px;
  animation: splashLoad 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes splashLoad {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(0);
  }
}

/* Dark mode override */
[data-theme="dark"] .splash-screen {
  background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] .splash-title {
  color: #ffffff !important;
}

[data-theme="dark"] .splash-loader {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Subtle Grid Texture Overlay */
.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 0),
    radial-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 0);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  pointer-events: none;
  z-index: 0;
}

/* Modern Layout Architecture: Persistent Sidebar + Main Content */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  flex-direction: row;
}

html[dir="rtl"] .app-shell {
  flex-direction: row-reverse;
}

html[dir="rtl"] .app-sidebar {
  order: 2;
}

html[dir="rtl"] .app-main {
  order: 1;
}

html[dir="ltr"] .app-shell {
  flex-direction: row;
}

html[dir="ltr"] .app-shell,
html[dir="ltr"] .app-shell :is(.app-main, .topbar, .topbar-start, .topbar-actions, .sidebar-nav, .sidebar-footer, .sidebar-section, .sidebar-link, .sidebar-user-btn, .sidebar-user-info, main, .container) {
  direction: ltr;
}

html[dir="ltr"] .app-shell :is(.sidebar-link, .sidebar-label, .sidebar-user-info, .topbar, .topbar-actions, .user-chip-meta) {
  text-align: left;
}

html[dir="rtl"] .app-shell,
html[dir="rtl"] .app-shell :is(.app-main, .topbar, .topbar-start, .topbar-actions, .sidebar-nav, .sidebar-footer, .sidebar-section, .sidebar-link, .sidebar-user-btn, .sidebar-user-info, main, .container) {
  direction: rtl;
}

html[dir="ltr"] .figma-dashboard-wrapper,
html[dir="ltr"] .figma-dashboard-wrapper :is(.figma-hero-banner, .hero-main-flex, .hero-text-side, .hero-actions-group, .figma-kpi-row, .figma-kpi-card, .figma-dual-grid, .figma-right-column, .figma-left-column, .figma-section-block, .figma-side-card, .figma-class-item-card, .task-row-card, .schedule-slot-item, .quick-act-btn) {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .figma-dashboard-wrapper :is(.kpi-card-head, .kpi-card-body, .block-top-header, .side-card-head, .class-title-group, .class-item-stats, .stat-line, .task-main-details, .slot-details) {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .figma-dashboard-wrapper,
html[dir="rtl"] .figma-dashboard-wrapper :is(.figma-hero-banner, .hero-main-flex, .hero-text-side, .hero-actions-group, .figma-kpi-row, .figma-kpi-card, .figma-dual-grid, .figma-right-column, .figma-left-column, .figma-section-block, .figma-side-card, .figma-class-item-card, .task-row-card, .schedule-slot-item, .quick-act-btn) {
  direction: rtl;
  text-align: right;
}

/* ==========================================================================
   Persistent Executive Sidebar Architecture (Linear/Vercel/Notion Style)
   ========================================================================== */
.app-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #0b1329;
  border-inline-start: none;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  top: 0;
  height: 100vh;
  z-index: 200;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
}

html[dir="ltr"] .app-sidebar {
  border-inline-start: none;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

html[dir="rtl"] .app-sidebar {
  border-inline-start: none;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

.app-sidebar.collapsed {
  width: 68px;
}

.sidebar-brand {
  padding: 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

html[dir="rtl"] .sidebar-brand,
html[dir="rtl"] .sidebar-brand-link,
html[dir="rtl"] .sidebar-user-btn,
html[dir="rtl"] .topbar-brand-badge,
html[dir="rtl"] .lang-switch,
html[dir="rtl"] .edunext-global-search {
  direction: rtl;
  text-align: right;
}

/* In standard flexbox, direction: rtl naturally flows Right-to-Left.
   row-reverse was inverting the RTL flow and causing overlap/swapping. */
html[dir="rtl"] .sidebar-brand-link,
html[dir="rtl"] .sidebar-user-btn {
  flex-direction: row;
}

html[dir="rtl"] .topbar-brand-badge {
  flex-direction: row-reverse;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-brand-mark,
.figma-logo-mark,
.eduflow-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  background: #00a86b !important;
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.35) !important;
  object-fit: contain;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  transition: opacity 0.2s ease;
}

.sidebar-brand-text strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.sidebar-brand-text span,
.brand-sub-emerald {
  font-size: 0.72rem;
  color: #10b981 !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

/* RTL-aware collapse chevron direction */
html[dir="rtl"] .sidebar-collapse-btn svg {
  transform: rotate(0deg);
  transition: transform 0.25s ease;
}

html[dir="rtl"] .app-sidebar.collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

html[dir="ltr"] .sidebar-collapse-btn svg {
  transform: rotate(180deg);
  transition: transform 0.25s ease;
}

html[dir="ltr"] .app-sidebar.collapsed .sidebar-collapse-btn svg {
  transform: rotate(0deg);
}

/* Collapsed Header: cleanly stack logo and collapse button vertically without overlap */
.app-sidebar.collapsed .sidebar-brand {
  padding: 14px 6px;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-brand-link {
  justify-content: center;
  width: 100%;
}

.app-sidebar.collapsed .sidebar-brand-text {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.app-sidebar.collapsed .sidebar-collapse-btn {
  margin: 0;
}

/* Sidebar Nav Body */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 12px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-section-label {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  direction: rtl;
  text-align: right;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  transform: translateX(-2px);
}

html[dir="rtl"] .sidebar-link:hover,
html[dir="rtl"] .sidebar-link:focus-visible {
  transform: translateX(2px);
}

.sidebar-link.active,
.app-sidebar .sidebar-link.active {
  color: #ffffff !important;
  background: #00a86b !important;
  border-color: transparent !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.35) !important;
  border-radius: 10px !important;
}

.sidebar-icon {
  font-size: 1.1rem;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.sidebar-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: inherit;
}

.sidebar-icon-svg svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: inherit;
}

.sidebar-label {
  flex: 1;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-label {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.sidebar-badge,
.badge-rose-circle {
  background: #e11d48 !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  direction: ltr;
  unicode-bidi: plaintext;
  line-height: 1.2;
}

/* Sidebar Footer User Info */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-user-btn {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition-fast);
  min-width: 0;
}

.sidebar-user-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00a86b;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  justify-content: center;
}

.sidebar-user-info strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sidebar-user-info span,
.sidebar-user-info .role-subtext {
  font-size: 0.70rem;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sidebar-logout-form {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.sidebar-logout-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  background: transparent;
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-logout-action:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.7);
}

/* Collapsed Sidebar Footer: compact vertical stack with centered avatar and icon-only logout */
.app-sidebar.collapsed .sidebar-footer {
  padding: 10px 6px;
}

.app-sidebar.collapsed .sidebar-user-btn {
  padding: 6px 0;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-color: transparent;
}

.app-sidebar.collapsed .sidebar-user-info {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-logout-form {
  margin-inline-start: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-logout-action {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}

.app-sidebar.collapsed .sidebar-logout-action span {
  display: none !important;
}

/* Main Area Layout - Independent Viewport Scroll Pane */
.app-main {
  flex: 1;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.app-main::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.app-main::-webkit-scrollbar-track {
  background: transparent;
}

.app-main::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 6px;
}

.app-main::-webkit-scrollbar-thumb:hover {
  background: #00a86b;
}

/* Slim Topbar Header */
.topbar,
.edunext-topbar {
  position: sticky;
  top: 0;
  z-index: 250;
  /* Above sidebar (200) so dropdowns render over it */
  width: 100%;
  height: 68px;
  background: #ffffff !important;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 0 24px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .edunext-topbar {
  background: #0b1329 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[dir="rtl"] .topbar {
  direction: rtl;
}

html[dir="ltr"] .topbar {
  direction: ltr;
}

.topbar-actions,
.edunext-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.topbar-start {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

html[dir="rtl"] .topbar-start {
  flex-direction: row-reverse;
}

.topbar-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.cb-square-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  flex-shrink: 0;
}

.cb-brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.cb-brand-titles strong {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

html[data-theme="dark"] .cb-brand-titles strong {
  color: #ffffff;
}

.cb-brand-titles span {
  color: #64748b;
  font-size: 0.68rem;
  white-space: nowrap;
}

.version-tag-pill {
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: none;
  flex-shrink: 0;
}

.edunext-global-search {
  flex: 1;
  max-width: 480px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: none;
}

html[data-theme="dark"] .edunext-global-search {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.edunext-global-search:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-svg-icon {
  color: #94a3b8;
  flex-shrink: 0;
  opacity: 1;
  transition: color 0.15s ease;
}

.edunext-global-search:hover .search-svg-icon {
  color: #00a86b;
}

.edunext-search-input {
  border: none !important;
  background: transparent !important;
  width: 100% !important;
  outline: none !important;
  color: #0f172a !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .edunext-search-input {
  color: #ffffff !important;
}

.edunext-search-input::placeholder {
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
  opacity: 1 !important;
}

.search-kbd-shortcut {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  padding: 2px 7px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  direction: ltr;
}

html[data-theme="dark"] .search-kbd-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}

/* Topbar Icon Buttons */
.topbar-icon-btn,
.edunext-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: 0;
  list-style: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
}

html[data-theme="dark"] .topbar-icon-btn,
html[data-theme="dark"] .edunext-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.topbar-icon-btn:hover,
.topbar-icon-btn:focus-visible,
.edunext-action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.topbar-badge-count-dot {
  position: absolute;
  top: 7px;
  inset-inline-end: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e11d48;
  border: 1.5px solid #ffffff;
}

.topbar-hamburger {
  font-size: 1.1rem;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.topbar-hamburger:hover {
  background: #f1f5f9;
}

/* Language Switcher */
.topbar-lang {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  box-shadow: none;
}

html[data-theme="dark"] .topbar-lang {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.topbar-lang .lang-pill {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.topbar-lang .lang-pill:hover {
  color: #0f172a;
}

.topbar-lang .lang-pill.active {
  background: #00a86b !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 168, 107, 0.25);
}

/* Topbar User Profile Chip */
.topbar-profile-dropdown {
  position: relative;
  list-style: none;
}

.topbar-profile-dropdown summary {
  list-style: none;
}

.topbar-profile-dropdown summary::-webkit-details-marker {
  display: none;
}

.edunext-user-profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-fast);
}

html[data-theme="dark"] .edunext-user-profile-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.edunext-user-profile-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.user-chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00a86b;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.2;
}

.user-chip-meta strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

html[data-theme="dark"] .user-chip-meta strong {
  color: #ffffff;
}

.user-chip-meta span {
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
}

.chip-caret {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-inline-start: 4px;
}

/* Profile Dropdown Menu */
.profile-dropdown-menu,
.sidebar-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 8px;
  min-width: 200px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html[data-theme="dark"] .profile-dropdown-menu,
html[data-theme="dark"] .sidebar-user-dropdown {
  background: #0b1329;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.profile-dropdown-menu .dropdown-item,
.sidebar-user-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}

html[data-theme="dark"] .profile-dropdown-menu .dropdown-item,
html[data-theme="dark"] .sidebar-user-dropdown .nav-link {
  color: #e2e8f0;
}

.profile-dropdown-menu .dropdown-item:hover,
.sidebar-user-dropdown .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="dark"] .profile-dropdown-menu .dropdown-item:hover,
html[data-theme="dark"] .sidebar-user-dropdown .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.profile-dropdown-menu .logout-item,
.sidebar-user-dropdown .logout-link {
  color: #e11d48 !important;
}

.dropdown-divider {
  border-top: 1px solid #e2e8f0;
  margin: 4px 8px;
}

html[data-theme="dark"] .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 4px 8px;
}

/* ==========================================================================
   Navigation Drawer (Slide-In Panel)
   ========================================================================== */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(3, 7, 18, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.nav-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: -320px;
  width: 300px;
  height: 100dvh;
  z-index: 300;
  background: rgba(8, 14, 26, 0.98);
  backdrop-filter: blur(24px);
  border-inline-start: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  flex-direction: column;
  transition: inset-inline-end 280ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
}

.nav-drawer.open {
  inset-inline-end: 0;
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-drawer-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}

.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--cyan-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px 4px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(241, 245, 249, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.drawer-link:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--white);
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateX(-2px);
}

.drawer-link.active {
  background: rgba(245, 158, 11, 0.18) !important;
  color: var(--gold-light) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  font-weight: 800;
}

.drawer-icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* ==========================================================================
   Nav Group (User Dropdown only — kept for user icon)
   ========================================================================== */
.nav-group {
  position: relative;
}

.nav-group summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 210px;
  padding: 8px;
  display: grid;
  gap: 4px;
  background: rgba(8, 15, 30, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.1);
  z-index: 500;
  animation: nav-dropdown-in 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nav-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nav-group:not([open]) .nav-dropdown {
  display: none;
}

.nav-dropdown .nav-link {
  width: 100%;
  border-radius: 10px;
  justify-content: flex-start;
  padding: 8px 12px;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.nav-link {
  color: rgba(241, 245, 249, 0.92);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  letter-spacing: -0.01em;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.logout-link {
  color: #f43f5e !important;
}

.logout-link:hover {
  background: rgba(244, 63, 94, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}


.global-search-input {
  width: 180px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.82rem;
  font-family: inherit;
  transition: all var(--transition-smooth);
}

.global-search-input:focus {
  width: 240px;
  border-color: #00a86b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 280px;
  background: rgba(8, 15, 30, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  z-index: 600;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.84rem;
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold-light);
}

.search-result-type {
  margin-inline-start: auto;
  font-size: 0.72rem;
  color: var(--cyan-primary);
  font-weight: 700;
}

.search-no-result {
  padding: 12px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  padding: 2px;
  gap: 1px;
}

.lang-pill {
  color: #475569;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  background: transparent;
}

.lang-pill:hover,
.lang-pill:focus-visible {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.08);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

.lang-pill.active {
  background: linear-gradient(135deg, #fef3c7, #fcd34d);
  color: #7c2d12;
  border-color: rgba(245, 158, 11, 0.24);
  box-shadow: 0 4px 10px rgba(251, 191, 36, 0.24);
}

.user-avatar-btn {
  list-style: none;
  cursor: pointer;
}

.user-avatar-btn::-webkit-details-marker {
  display: none;
}

.user-nav-dropdown {
  inset-inline-end: 0 !important;
  inset-inline-start: auto !important;
  min-width: 170px !important;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.logout-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
}

/* ==========================================================================
   Layout Containers & Cards
   ========================================================================== */
.container {
  max-width: 1460px;
  width: 100%;
  margin: 32px auto 48px;
  padding: 0 22px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.dashboard-heading,
.page-header,
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card,
.summary-card,
.metric-panel,
.sidebar-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

/* Luxury Base Card System */
.card,
.stat-card,
.summary-card,
.metric-panel,
.sidebar-panel,
.reference-item,
.recommendation-item,
.hero-panel,
.auth-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

/* Selective Top Glow Highlight (Hero & Key KPI Cards Only) */
.hero-panel::before,
.lux-card::before,
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), var(--cyan-primary), transparent);
  opacity: 0.85;
}

.card:hover,
.stat-card:hover,
.metric-panel:hover,
.sidebar-panel:hover {
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.card {
  padding: 22px 24px;
  margin-bottom: 24px;
  border-radius: 18px;
}

/* Clean Minimalist Activity Tab Switcher */
.tab-buttons {
  display: inline-flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--white);
}

.tab-btn.active {
  background: var(--gold-metallic);
  color: #030712;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.narrow {
  max-width: 480px;
  margin: 36px auto;
}

/* Alerts & Notifications */
.alert {
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  margin-bottom: 16px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

/* ==========================================================================
   Executive Login & Register Gateway (شاشات الدخول الفاخرة)
   ========================================================================== */
/* ==========================================================================
   Executive Login & Register Gateway (شاشات الدخول الفاخرة)
   ========================================================================== */
.auth-container {
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  z-index: 2;
}

.auth-container::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 168, 107, 0.06) 0%, rgba(2, 132, 199, 0.04) 45%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  padding: 36px 32px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00a86b, #0284c7);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #00a86b;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.25);
  margin-bottom: 14px;
}

.auth-header h1 {
  font-size: 1.55rem;
  font-weight: 900;
  margin: 6px 0;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.auth-header p {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form .form-group label {
  color: #1e293b;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
  display: block;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.88rem;
  color: #64748b;
}

.auth-footer a {
  color: #00a86b;
  text-decoration: none;
  font-weight: 800;
  transition: color 0.15s ease;
}

.auth-footer a:hover {
  color: #008f5a;
  text-decoration: underline;
}

/* ==========================================================================
   Buttons & Interactive Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 10px 18px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
  transition: all var(--transition-fast);
  white-space: nowrap;
  direction: inherit;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
  padding: 12px 20px !important;
  font-size: 0.95rem !important;
}

.btn.secondary,
.btn-secondary {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.btn.secondary:hover,
.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.25) !important;
}

.btn-danger:hover {
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.4) !important;
}

.btn-small {
  padding: 6px 12px !important;
  font-size: 0.82rem !important;
  border-radius: 9px !important;
}

/* ==========================================================================
   Form Inputs & Controls
   ========================================================================== */
input,
select,
textarea {
  font-family: inherit;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b !important;
  margin-bottom: 8px;
}

/* WebKit AutoFill Override Fix (Institutional Light) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #0f172a !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* Remove default number input spinners across all browsers */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* All Form Controls - Institutional Pure White Architecture */
.form-control,
.field-row input,
.field-row select,
.field-row textarea,
form:not(.calm-search-form):not(.edunext-search-form) input[type="text"],
form:not(.calm-search-form):not(.edunext-search-form) input[type="number"],
form:not(.calm-search-form):not(.edunext-search-form) input[type="password"],
form:not(.calm-search-form):not(.edunext-search-form) input[type="email"],
form:not(.calm-search-form):not(.edunext-search-form) input[type="tel"],
form:not(.calm-search-form):not(.edunext-search-form) select,
form:not(.calm-search-form):not(.edunext-search-form) textarea {
  width: 100%;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  font-size: 0.92rem !important;
  outline: none !important;
  transition: all var(--transition-fast) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  direction: inherit;
}

.form-control:focus,
.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus,
form:not(.calm-search-form):not(.edunext-search-form) input[type="text"]:focus,
form:not(.calm-search-form):not(.edunext-search-form) input[type="number"]:focus,
form:not(.calm-search-form):not(.edunext-search-form) input[type="password"]:focus,
form:not(.calm-search-form):not(.edunext-search-form) input[type="email"]:focus,
form:not(.calm-search-form):not(.edunext-search-form) input[type="tel"]:focus,
form:not(.calm-search-form):not(.edunext-search-form) select:focus,
form:not(.calm-search-form):not(.edunext-search-form) textarea:focus {
  border-color: #00a86b !important;
  box-shadow: 0 0 0 3.5px rgba(0, 168, 107, 0.15) !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

.form-control::placeholder,
form input::placeholder,
form textarea::placeholder {
  color: #94a3b8 !important;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Django form markup overrides */
form p {
  margin-bottom: 14px;
}

form p label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--gold-light);
  font-size: 0.85rem;
}

form p input {
  width: 100%;
  background: rgba(10, 16, 30, 0.85);
  color: var(--white);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 0.9rem;
}

/* ==========================================================================
   Dashboard & Analytics Grids
   ========================================================================== */
.dashboard-heading,
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.heading-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel,
.page-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.dashboard-main,
.dashboard-sidebar {
  display: grid;
  gap: 18px;
}

/* Stats Cards Section */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.summary-card {
  padding: 15px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.stat-card span,
.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.stat-card strong,
.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.school-overview-page .school-overview-summary {
  padding: 18px 18px 8px;
}

.school-overview-metric {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px;
}

.school-overview-metric small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.school-overview-panel {
  padding: 18px 18px 14px;
}

.school-overview-item {
  align-items: center;
  padding: 14px 16px;
}

.school-overview-base {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.school-overview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0f2fe 0%, #eff6ff 100%);
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] .school-overview-avatar {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(147, 197, 253, 0.18));
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

.school-overview-avatar.accent {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(251, 191, 36, 0.12));
  border-color: rgba(245, 158, 11, 0.28);
  color: #fcd34d;
}

.school-overview-base strong {
  display: block;
  color: var(--white);
  font-size: 0.96rem;
  line-height: 1.4;
}

.school-overview-base .muted-text {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

/* Analytics & Metric Panels */
.analytics-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-panel {
  padding: 15px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.metric-panel span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
}

.metric-panel small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.78rem;
}

/* Recommendation & Reference Grids */
.recommendation-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.recommendation-item,
.reference-item {
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.recommendation-item strong,
.reference-item strong {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
}

.recommendation-item span,
.reference-item span {
  color: #64748b;
  font-size: 0.88rem;
}

.dashboard-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ==========================================================================
   Royal Data Tables
   ========================================================================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.table-wrapper::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #00a86b;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}

.table-wrapper th {
  padding: 11px 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.table-wrapper td {
  padding: 11px 14px;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.table-wrapper tbody tr {
  transition: background 0.15s ease;
}

.table-wrapper tbody tr:hover td {
  background: #f8fafc;
}

.data-table a {
  color: var(--cyan-primary);
  text-decoration: none;
  font-weight: 700;
  transition: color var(--transition-fast);
}

.data-table a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ==========================================================================
   Badges, Chips & Progress Bars
   ========================================================================== */
.page-badge,
.status-badge,
.mini-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-badge.highlight,
.status-badge.highlight {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

.status-badge.success {
  background: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
}

.status-badge.warning {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.status-badge.danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

html[data-theme="dark"] .page-badge,
html[data-theme="dark"] .status-badge,
html[data-theme="dark"] .mini-chip {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

html[data-theme="dark"] .page-badge.highlight,
html[data-theme="dark"] .status-badge.highlight {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

html[data-theme="dark"] .status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

html[data-theme="dark"] .status-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde047;
}

html[data-theme="dark"] .status-badge.danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fca5a5;
}

/* ── Unified Institutional Role Badges (Visual Harmony Across Entire Platform) ── */
.institutional-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.3;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* 1. القيادة المدرسية - الهوية الزمردية الفاخرة المعتمدة */
.institutional-role-badge.role-manager {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.institutional-role-badge.role-deputy {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

/* 2. الإدارة المدرسية والعمليات - النيلي الأنيق */
.institutional-role-badge.role-school_admin {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

/* 3. الكادر الأكاديمي والإشراف - الأزرق الياقوتي والأخضر الهادئ */
.institutional-role-badge.role-coordinator {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.institutional-role-badge.role-teacher {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* 4. الرعاية الصحية والدعم الطلابي - الوردي والبنفسجي الراقي */
.institutional-role-badge.role-nurse {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.institutional-role-badge.role-social_worker {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

/* 5. الإشراف العام وإدارة المنصة - الكهرماني والداكن المؤسسي */
.institutional-role-badge.role-supervisor {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.institutional-role-badge.role-platform_admin {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
}

/* Dark Theme Support */
html[data-theme="dark"] .institutional-role-badge.role-manager {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-deputy {
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-school_admin {
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-coordinator {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  border-color: rgba(14, 165, 233, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-teacher {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

html[data-theme="dark"] .institutional-role-badge.role-nurse {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-social_worker {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-supervisor {
  background: rgba(245, 158, 11, 0.16);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.35);
}

html[data-theme="dark"] .institutional-role-badge.role-platform_admin {
  background: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}


/* Refined Summary Page Polish */
.output-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.output-page>.page-header {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  padding: 22px 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.output-page>.page-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 1.2;
  font-weight: 900;
  color: #0f172a;
}

.output-page>.page-header .hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.output-page .analytics-grid {
  margin-bottom: 0;
}

.output-page .metric-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 18px 16px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.output-page .metric-panel strong {
  color: #0f172a;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.output-page .card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  color: #0f172a;
}

.output-page .card-header-row h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
}

.output-page .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.output-page .page-header .hero-actions {
  margin-inline-start: auto;
  justify-content: flex-end;
}

html[dir="ltr"] .output-page .page-header .hero-actions {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

html[dir="rtl"] .output-page .page-header .hero-actions {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

.student-detail-page .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.student-detail-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-inline-start: auto;
}

html[dir="ltr"] .student-detail-page .hero-actions {
  justify-content: flex-end;
}

html[dir="rtl"] .student-detail-page .hero-actions {
  justify-content: flex-start;
}

.student-detail-page .analytics-grid {
  gap: 16px;
}

.student-detail-badges-card {
  padding: 18px 20px;
}

.student-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.student-badge-pill {
  padding: 6px 12px;
  font-size: 0.72rem;
}

.student-detail-action-card {
  padding: 18px 20px 16px;
}

.student-detail-action-card .action-cluster-title {
  margin-bottom: 14px;
}

.student-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.student-detail-actions .btn,
.student-detail-actions .muted-text,
.student-detail-actions form {
  margin: 0;
}

.student-detail-actions form.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.student-detail-actions .field-row .form-control {
  min-width: 180px;
  max-width: 250px;
}

.student-detail-actions .btn {
  min-width: 150px;
}

.output-page .table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.output-page .table-wrapper th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
}

.output-page .table-wrapper td {
  color: #0f172a;
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
}

.output-page .table-wrapper tbody tr:hover td {
  background: #f8fafc;
}

.output-page .status-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
}

.output-page .empty-state {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.school-admin-dashboard-page .school-admin-metrics-card {
  padding: 18px 18px 8px;
}

.school-admin-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 132px;
  gap: 4px;
}

.school-admin-metric small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.school-admin-panel {
  padding: 18px 18px 10px;
}

.member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(245, 158, 11, 0.14));
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #dbeafe;
  font-weight: 900;
  font-size: 0.76rem;
}

.school-admin-form {
  margin: 0;
  gap: 8px;
  align-items: center;
}

.school-admin-table .form-control {
  min-width: 120px;
  font-size: 0.76rem;
  padding-top: 7px;
  padding-bottom: 7px;
}

.empty-row {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

.class-summary-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 32px;
  gap: 14px;
  min-height: 280px;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.empty-state-illustration {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.08);
  font-size: 2.2rem;
}

.class-summary-empty-state h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.class-summary-empty-state .muted-text {
  max-width: 620px;
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.7;
}

.empty-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

html[dir="rtl"] .empty-state-actions {
  justify-content: center;
  direction: rtl;
}

html[dir="ltr"] .empty-state-actions {
  direction: ltr;
}

.empty-state-actions .btn {
  min-width: 150px;
  justify-content: center;
}

/* Neon Progress Bars */
.progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-primary), var(--success));
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.warning {
  background: linear-gradient(90deg, var(--warning), #fde047);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.progress-fill.danger {
  background: linear-gradient(90deg, var(--danger), #fb7185);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}

/* ==========================================================================
   Activity Lists & Sidebar Panels
   ========================================================================== */
.sidebar-panel {
  padding: 22px;
}

.sidebar-panel h3 {
  margin: 0 0 16px;
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-summary strong {
  font-size: 1.2rem;
  color: var(--white);
  font-weight: 800;
}

.profile-summary span {
  color: var(--muted);
  font-size: 0.92rem;
}

.mini-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-metric:last-child {
  border-bottom: none;
}

.mini-metric strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
}

.mini-metric small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-metric span {
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1.1rem;
}

.quick-links {
  display: grid;
  gap: 10px;
}

.quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.quick-links a:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #00a86b;
  transform: translateX(-4px);
}

.activity-list {
  display: grid;
  gap: 8px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
  transition: all var(--transition-fast);
}

.activity-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.activity-item span {
  color: #64748b;
  font-size: 0.88rem;
}

.inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 18px;
  align-items: center;
  justify-content: flex-start;
  direction: rtl;
  text-align: start;
}

html[dir="ltr"] .action-cluster,
html[dir="ltr"] .hero-actions,
html[dir="ltr"] .inline-actions,
html[dir="ltr"] .field-row {
  direction: ltr;
  text-align: left;
  justify-content: flex-start;
}

html[dir="rtl"] .action-cluster,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .inline-actions,
html[dir="rtl"] .field-row {
  direction: rtl;
  text-align: right;
  justify-content: flex-start;
}

.action-cluster-title {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* Output Pages & Leaderboards */
.leaderboard {
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.leaderboard li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #0f172a;
}

/* Footer */
.main-footer {
  padding: 30px 0;
  color: var(--muted-dark);
  text-align: center;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 40px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
  }

  .nav-menu {
    max-width: 100%;
  }

  .nav-links-main {
    overflow: visible;
    flex-wrap: wrap;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-stats,
  .analytics-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-reference-grid,
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 16px;
  }

  .nav-group,
  .nav-group summary {
    width: 100%;
  }

  .nav-dropdown {
    position: static;
    margin-top: 4px;
    min-width: 0;
    grid-column: 1 / -1;
  }

  .dashboard-stats,
  .analytics-grid,
  .summary-grid,
  .recommendation-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-heading,
  .page-header,
  .card-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   Modern Institutional AI Assistant Widget (مساعد ClassBridge الذكي)
   ========================================================================== */
.ai-fab-btn {
  position: fixed;
  bottom: 24px;
  right: 24px !important;
  left: auto !important;
  z-index: 999;
  height: 48px;
  min-width: 48px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.35), 0 2px 6px rgba(15, 23, 42, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

html[dir="rtl"] .ai-fab-btn {
  right: auto !important;
  left: 24px !important;
}

.ai-fab-label {
  display: inline;
  opacity: 1;
  color: #ffffff !important;
  font-weight: 700;
}

.ai-fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.45), 0 4px 10px rgba(15, 23, 42, 0.12) !important;
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
}

.ai-fab-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(2, 132, 199, 0.5);
  opacity: 0.6;
  animation: aiFabPulse 2.4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes aiFabPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.8;
  }
}

/* AI Copilot Modern Institutional Drawer Modal */
.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .ai-modal {
  justify-content: flex-start;
}

.ai-modal.ai-modal-open {
  opacity: 1;
  visibility: visible;
}

.ai-modal-content {
  pointer-events: auto;
  width: 100%;
  max-width: 450px;
  height: 560px;
  max-height: 85vh;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimized Drawer State */
.ai-modal.ai-modal-minimized .ai-modal-content {
  height: 60px;
  max-height: 60px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12) !important;
  cursor: pointer;
}

.ai-modal.ai-modal-minimized .ai-modal-body,
.ai-modal.ai-modal-minimized .ai-modal-footer {
  display: none !important;
}

.ai-modal-header {
  padding: 14px 18px !important;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important;
  border-bottom: 1px solid #edf2f7 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
  border: 1px solid #bae6fd !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
  flex-shrink: 0;
}

.ai-modal-title-wrap h3 {
  margin: 0;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em;
}

.ai-modal-title-wrap p {
  margin: 2px 0 0 0;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  color: #0284c7 !important;
}

.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-control-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: 0.95rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 700;
}

.ai-control-btn:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

.ai-close-btn:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

.ai-modal-body {
  flex: 1;
  padding: 16px;
  background: #f8fafc !important;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #edf2f7;
}

.ai-chip-title {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #334155 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-chip {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  padding: 6px 11px !important;
  border-radius: 8px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-chip:hover {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.ai-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ai-msg-user {
  justify-content: flex-end;
}

.ai-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

.ai-msg-bubble {
  padding: 12px 15px !important;
  border-radius: 16px !important;
  font-size: 0.85rem !important;
  line-height: 1.6 !important;
  max-width: 88%;
}

.ai-msg-system .ai-msg-bubble {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

.ai-msg-system .ai-msg-bubble strong {
  color: #0369a1 !important;
  font-weight: 800;
}

.ai-msg-system .ai-msg-bubble code {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  border: 1px solid #e2e8f0 !important;
}

.ai-msg-system .ai-msg-bubble a.ai-link {
  color: #0284c7 !important;
  font-weight: 700;
  text-decoration: underline;
}

.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.22) !important;
}

.ai-modal-footer {
  padding: 12px 16px !important;
  background: #ffffff !important;
  border-top: 1px solid #edf2f7 !important;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ai-modal-footer input {
  flex: 1;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  color: #0f172a !important;
  font-size: 0.86rem !important;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.ai-modal-footer input::placeholder {
  color: #94a3b8 !important;
}

.ai-modal-footer input:focus {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

.ai-modal-footer button,
.ai-modal-footer .btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 0 18px !important;
  height: 42px !important;
  font-weight: 700 !important;
  font-size: 0.86rem !important;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28) !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-modal-footer button:hover,
.ai-modal-footer .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.38) !important;
}

/* ==========================================================================
   PRIORITY 1A: Smart Risk Alert Badge
   ========================================================================== */
.nav-link-risk {
  position: relative;
}

.risk-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.7);
  animation: badgePulse 1.8s ease-in-out infinite;
  line-height: 1;
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.9);
    transform: scale(1.12);
  }
}

/* ==========================================================================
   PRIORITY 1B: Quick Start Modal
   ========================================================================== */
.qs-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.qs-modal.qs-modal-open {
  opacity: 1;
  visibility: visible;
}

.qs-modal-content {
  width: 100%;
  max-width: 500px;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(245, 158, 11, 0.15);
  overflow: hidden;
  animation: aiSlideUp 0.35s ease-out;
}

.qs-modal-header {
  padding: 18px 20px;
  background: rgba(30, 41, 59, 0.85);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qs-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qs-modal-title-wrap span {
  font-size: 1.8rem;
}

.qs-modal-title-wrap h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light);
}

.qs-modal-title-wrap p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.qs-steps {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qs-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 14px;
  transition: border-color var(--transition-fast);
}

.qs-step:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.qs-step-num {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #050b14;
  font-weight: 900;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.qs-step-body {
  flex: 1;
}

.qs-step-body strong {
  color: var(--white);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 4px;
}

.qs-step-body p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 8px;
  line-height: 1.5;
}

.qs-action-btn {
  display: inline-block;
  padding: 5px 12px;
  background: var(--gold-gradient);
  color: #050b14;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.qs-action-btn:hover {
  filter: brightness(1.1);
}

.qs-action-btn.secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--gold-light);
}

.qs-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qs-no-show {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}

/* ==========================================================================
   PRIORITY 2A: Global Search Bar
   ========================================================================== */
.global-search-wrap {
  position: relative;
  flex-shrink: 1;
}

.global-search-input {
  width: 130px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 5px 10px;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.78rem;
  outline: none;
  transition: all var(--transition-fast);
}

.global-search-input:focus {
  border-color: #00a86b;
  box-shadow: 0 0 0 2px rgba(0, 168, 107, 0.15);
  width: 190px;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  width: 280px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65);
  display: none;
  z-index: 9999;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:hover {
  background: rgba(56, 189, 248, 0.1);
}

.search-result-icon {
  font-size: 1.1rem;
}

.search-result-type {
  margin-inline-start: auto;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 999px;
}

.search-no-result {
  padding: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================================================
   PRIORITY 2B: AI Direct Links
   ========================================================================== */
.ai-link {
  color: var(--cyan-primary);
  text-decoration: underline;
  font-weight: 700;
  transition: color var(--transition-fast);
}

.ai-link:hover {
  color: var(--gold-light);
}

/* ==========================================================================
   PRIORITY 3: Weekly Progress Calendar (Score Entry)
   ========================================================================== */
.weeks-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.week-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.5);
  color: var(--muted);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.week-cell:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.1);
}

.week-cell.recorded {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.week-cell.current {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.week-num {
  font-size: 1rem;
  font-weight: 900;
}

.week-label {
  font-size: 0.65rem;
  opacity: 0.7;
}

/* ==========================================================================
   Auto-Save Toast Notification
   ========================================================================== */
.autosave-toast {
  position: fixed;
  bottom: 28px;
  inset-inline-end: 28px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--emerald-primary, #10b981);
  color: #6ee7b7;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.autosave-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   ClassBridge AI Executive Lux 2.0 — Extended Visual System
   ========================================================================== */

/* Pearl Royal Light Theme Variant (المرمر واللؤلؤ الملكي) */
[data-theme="pearl"] {
  --bg-deep: #f8fafc;
  --bg-ambient: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.88);
  --bg-card: rgba(241, 245, 249, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-hover: rgba(255, 255, 255, 0.95);

  --white: #0f172a;
  --muted: #475569;
  --muted-dark: #64748b;
  --line: rgba(217, 119, 6, 0.3);
  --line-glass: rgba(15, 23, 42, 0.12);

  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-royal: 0 20px 45px rgba(217, 119, 6, 0.15), 0 0 25px rgba(217, 119, 6, 0.1);
}

[data-theme="pearl"] body {
  background:
    radial-gradient(circle at 12% 15%, rgba(245, 158, 11, 0.12), transparent 40%),
    radial-gradient(circle at 88% 20%, rgba(56, 189, 248, 0.1), transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #0f172a;
}

[data-theme="pearl"] .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="pearl"] .nav-link {
  color: #334155;
}

[data-theme="pearl"] .nav-link:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

[data-theme="pearl"] .nav-links-main {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="pearl"] .card,
[data-theme="pearl"] .stat-card,
[data-theme="pearl"] .metric-panel,
[data-theme="pearl"] .sidebar-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Adaptive Gradebook Heatmap Styling */
.heatmap-excellent {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

.heatmap-good {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.heatmap-warning {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.heatmap-danger {
  background: rgba(244, 63, 94, 0.14) !important;
  color: #f43f5e !important;
  border: 1px solid rgba(244, 63, 94, 0.35) !important;
}

/* Gradebook workspace — unified dark glass theme. */
.gradebook-page {
  direction: rtl;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #0f172a;
}

.gradebook-page-header,
.gradebook-class-picker,
.gradebook-table-card {
  direction: rtl;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02);
}

.gradebook-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  text-align: right;
}

.gradebook-page-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 900;
}

.gradebook-page-header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.gradebook-header-actions {
  display: flex;
  align-items: center;
  direction: rtl;
  gap: 10px;
  flex-shrink: 0;
}

.gradebook-save-btn,
.gradebook-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.gradebook-save-btn {
  background: #00a86b;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.25);
}

.gradebook-save-btn:hover,
.gradebook-save-btn:focus-visible {
  background: #008f5a;
  transform: translateY(-1px);
}

.gradebook-export-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gradebook-export-btn:hover,
.gradebook-export-btn:focus-visible {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.gradebook-class-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 220px;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-align: right;
}

.gradebook-picker-title {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.gradebook-class-chips {
  display: flex;
  direction: rtl;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.gradebook-class-chip,
.gradebook-empty-chip {
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.gradebook-class-chip:hover,
.gradebook-class-chip:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.gradebook-class-chip.active {
  background: #0b1329;
  border-color: #0b1329;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(11, 19, 41, 0.2);
}

.gradebook-search {
  display: flex;
  align-items: center;
  direction: rtl;
  overflow: hidden;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background: #ffffff;
  padding: 0 10px;
  transition: all 0.15s ease;
}

.gradebook-search:focus-within {
  border-color: #00a86b;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15);
}

.gradebook-search input {
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
}

.gradebook-search input::placeholder {
  color: #94a3b8;
}

.gradebook-search button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
}

.gradebook-search button:hover {
  color: #00a86b;
}

.gradebook-table-card {
  overflow: hidden;
}

.gradebook-table-scroll {
  overflow-x: auto;
}

.gradebook-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  direction: rtl;
  text-align: right;
  color: #0f172a;
  font-size: 0.82rem;
}

.gradebook-table th,
.gradebook-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  white-space: nowrap;
}

.gradebook-table thead th:first-child,
.gradebook-table tbody td:first-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #ffffff;
  border-left: 1px solid #f1f5f9;
}

.gradebook-table thead th:first-child {
  z-index: 2;
  background: #f8fafc;
}

.gradebook-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
}

.gradebook-table th small {
  display: inline-block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
}

.gradebook-table tbody tr:hover {
  background: #f8fafc;
}

.gradebook-table .student-column,
.gradebook-table .student-cell {
  text-align: right;
}

.student-cell a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  text-decoration: none;
}

.student-cell strong,
.student-cell small {
  display: block;
}

.student-cell strong {
  font-size: 0.85rem;
  font-weight: 700;
}

.student-cell small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.7rem;
  direction: ltr;
  text-align: right;
}

.student-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d1fae5;
  color: #065f46;
  font-weight: 800;
  font-size: 0.85rem;
}

.score-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.total-score-cell {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

.total-score-percent {
  display: block;
  margin-top: 2px;
  color: #00a86b;
  font-size: 0.72rem;
  font-weight: 700;
}

.grade-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.grade-excellent {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.grade-good {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.grade-average {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.grade-needs-work {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.student-action-link {
  color: #00a86b;
  font-weight: 700;
  text-decoration: none;
}

.student-action-link:hover {
  text-decoration: underline;
}

.gradebook-no-results,
.gradebook-no-classes {
  padding: 36px !important;
  color: #64748b;
  text-align: center !important;
}

.gradebook-no-classes {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

/* Analytics & Progress Pages — Clean Institutional White Architecture */
.analytics-page {
  direction: rtl;
  gap: 26px;
  color: #0f172a;
}

.progress-page {
  direction: rtl;
  gap: 26px;
  color: #0f172a;
}

.progress-top-banner {
  min-height: 84px;
  margin-bottom: 0;
  padding: 18px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.progress-top-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-align: center;
}

.progress-top-banner h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
}

.progress-top-banner p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.progress-table-wrapper {
  overflow-x: auto;
}

.progress-table th,
.progress-table td {
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.progress-score-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}

.progress-score-inline strong {
  width: 52px;
  color: #00a86b;
  font-size: 0.78rem;
}

.progress-empty-panel {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  text-align: center;
}

.progress-empty-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 900;
}

.progress-empty-panel p {
  max-width: 540px;
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.8;
}

.yearbook-page {
  direction: rtl;
  gap: 26px;
  color: #0f172a;
}

.analytics-page-header {
  min-height: 84px;
  margin-bottom: 0;
  padding: 18px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.analytics-page-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 900;
}

.analytics-page-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.76rem;
}

.analytics-empty-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  text-align: center;
}

.analytics-empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #00a86b;
  border: 1px solid #a7f3d0;
}

.analytics-empty-icon svg {
  width: 32px;
  height: 32px;
}

.analytics-empty-state h3 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
}

.analytics-empty-state p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.6;
}

.analytics-empty-action {
  margin-top: 16px;
  padding: 8px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.analytics-empty-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.32);
}

/* Risk monitoring */
.risk-monitor-page {
  direction: rtl;
  gap: 26px;
  color: #0f172a;
}

.risk-monitor-header {
  min-height: 84px;
  margin-bottom: 0;
  padding: 18px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.risk-monitor-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.42rem;
  font-weight: 900;
}

.risk-monitor-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.76rem;
}

.risk-alert-banner {
  padding: 15px 20px;
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  font-size: 0.76rem;
  font-weight: 700;
}

.risk-record-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02);
}

.risk-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.risk-record-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 900;
}

.risk-record-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.risk-record-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.risk-record-actions a {
  padding: 7px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  background: #ffffff;
}

.risk-record-actions a:last-child {
  border: none;
  background: #00a86b;
  color: #ffffff;
}

.risk-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 24px 0;
}

.risk-primary-action,
.risk-secondary-action,
.risk-filter {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.risk-primary-action {
  padding: 8px 16px;
  border-radius: 10px;
  background: #00a86b;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.25);
}

.risk-secondary-action {
  padding: 8px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
}

.risk-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px 0;
}

.risk-filter {
  padding: 6px 14px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.risk-filter:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.risk-filter.active {
  background: #0b1329;
  color: #ffffff;
  border-color: #0b1329;
}

.risk-data-table {
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.risk-record-table th,
.risk-record-table td {
  text-align: center;
  vertical-align: middle;
}

.risk-record-table th:first-child,
.risk-record-table td:first-child {
  text-align: right;
}

.risk-student-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
}

.risk-student-link:hover {
  color: #00a86b;
}

.risk-student-link strong,
.risk-student-link small {
  display: block;
}

.risk-student-link small {
  color: var(--muted);
  font-size: 0.58rem;
  direction: ltr;
  text-align: right;
}

.risk-student-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  font-weight: 900;
  border: 1px solid #fde68a;
}

.risk-score-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
}

.risk-score-cell strong {
  color: #e11d48;
  width: 48px;
  font-size: 0.78rem;
}

.risk-score-cell .progress-track {
  flex: 1;
  min-width: 100px;
  margin: 0;
}

@media (max-width: 700px) {

  .risk-monitor-header,
  .risk-record-header {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-monitor-header h1 {
    font-size: 1.15rem;
  }

  .risk-record-header h2 {
    font-size: 1.05rem;
  }

  .risk-record-actions {
    justify-content: flex-start;
  }
}

/* Reports workspace — clean institutional white architecture */
.reports-page {
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 26px;
  color: #0f172a;
}

.reports-page-header,
.academic-report-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.reports-page-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
}

.reports-page-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.42rem;
  font-weight: 900;
}

.reports-page-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.75rem;
}

.reports-header-actions,
.report-type-card,
.academic-report-header,
.report-metrics-grid {
  display: flex;
  align-items: center;
}

.reports-header-actions {
  gap: 8px;
  flex-shrink: 0;
}

.reports-print-btn,
.reports-pdf-btn {
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.reports-print-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  background: rgba(30, 41, 59, 0.7);
}

.reports-pdf-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.report-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.report-type-card {
  min-height: 112px;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.report-type-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.report-type-card.active {
  border: 2px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.08);
}

.report-type-card>span:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.report-type-card strong {
  font-size: 0.88rem;
  font-weight: 900;
}

.report-type-card small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.report-type-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 7px;
  font-size: 1.5rem;
  font-weight: 900;
}

.report-icon-chart {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 7px;
}

.report-icon-progress {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 7px;
}

.report-icon-risk {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.15);
  border-radius: 7px;
}

.academic-report-card {
  overflow: hidden;
}

.academic-report-header {
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.academic-report-header h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 900;
}

.academic-report-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.official-report-badge {
  padding: 4px 10px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  font-size: 0.65rem;
  font-weight: 800;
}

.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 26px;
}

.report-metric {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.report-metric span {
  color: var(--muted);
  font-size: 0.66rem;
}

.report-metric strong {
  color: var(--gold-light);
  font-size: 1.05rem;
  font-weight: 900;
}

.report-metric:first-child strong {
  color: var(--white);
}

.report-metric.warning strong {
  color: #fde047;
}

.report-chart-placeholder {
  min-height: 86px;
  display: grid;
  place-items: center;
  margin: 0 26px 24px;
  border: 2px dashed rgba(245, 158, 11, 0.2);
  border-radius: 15px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

@media (max-width: 900px) {
  .report-type-grid {
    grid-template-columns: 1fr;
  }

  .report-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .reports-page-header,
  .academic-report-header {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-page-header h1 {
    font-size: 1.15rem;
  }

  .reports-header-actions {
    justify-content: flex-start;
  }

  .report-metrics-grid {
    grid-template-columns: 1fr;
  }

  .report-chart-placeholder {
    margin-inline: 16px;
  }
}

@media (max-width: 820px) {

  .gradebook-page-header,
  .gradebook-class-picker {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .gradebook-header-actions {
    justify-content: flex-start;
  }

  .gradebook-class-chips {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }

  .gradebook-search {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .analytics-page-header {
    min-height: 78px;
    padding: 16px 18px;
  }

  .analytics-page-header h1 {
    font-size: 1.15rem;
  }

  .analytics-empty-state {
    min-height: 250px;
  }
}

/* Dynamic Focus Highlight Ring for Score Entry & Keyboard Navigation */
input[type="number"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28), 0 0 20px rgba(245, 158, 11, 0.2) !important;
  transform: scale(1.02);
  transition: all var(--transition-fast);
}

/* Luxury Card Metallic Accent Strip */
.lux-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.24);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.lux-card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-gradient);
}

.lux-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-royal);
  border-color: rgba(245, 158, 11, 0.45);
}

/* Shimmer Loading Skeleton */
.lux-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: luxShimmer 1.8s infinite linear;
}

@keyframes luxShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Institutional Architecture for Default Light Theme */
html:not([data-theme]) body {
  background: #f4f6f9;
  color: #0f172a;
}

html:not([data-theme]) .app-shell::before {
  display: none;
}

html:not([data-theme]) .app-sidebar {
  background: #0b1329;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
}

html:not([data-theme]) .sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
}

html:not([data-theme]) .sidebar-brand-mark {
  background: #00a86b !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.35) !important;
}

html:not([data-theme]) .sidebar-brand-text strong,
html:not([data-theme]) .sidebar-user-info strong {
  color: #ffffff;
}

html:not([data-theme]) .sidebar-link {
  color: #94a3b8;
  border-radius: 10px;
  padding: 10px 14px;
}

html:not([data-theme]) .sidebar-brand-text span,
html:not([data-theme]) .sidebar-section-label {
  color: #64748b;
}

html:not([data-theme]) .sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
}

html:not([data-theme]) .sidebar-link.active,
html:not([data-theme]) .app-sidebar .sidebar-link.active {
  color: #ffffff !important;
  background: #00a86b !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.35) !important;
}

html:not([data-theme]) .topbar,
html:not([data-theme]) .edunext-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

html:not([data-theme]) .topbar-start {
  display: flex;
  align-items: center;
}

html:not([data-theme]) .topbar-search-hint,
html:not([data-theme]) .topbar-icon-btn,
html:not([data-theme]) .topbar-lang {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
}

html:not([data-theme]) .container {
  max-width: 1520px;
  margin-top: 26px;
}

html:not([data-theme]) .hero-panel,
html:not([data-theme]) .page-header {
  background: linear-gradient(135deg, #17345a 0%, #215b91 68%, #287cae 100%);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(28, 75, 121, 0.18);
  color: #fff;
  padding: 24px 28px;
}

html:not([data-theme]) .hero-panel h1,
html:not([data-theme]) .hero-panel .muted-text,
html:not([data-theme]) .page-header h1,
html:not([data-theme]) .page-header .muted-text {
  color: #fff;
}

html:not([data-theme]) .hero-panel .eyebrow,
html:not([data-theme]) .page-header .eyebrow {
  color: #bce9ff;
}

html:not([data-theme]) .card,
html:not([data-theme]) .stat-card,
html:not([data-theme]) .summary-card,
html:not([data-theme]) .metric-panel,
html:not([data-theme]) .sidebar-panel,
html:not([data-theme]) .reference-item,
html:not([data-theme]) .recommendation-item {
  background: rgba(255, 255, 255, 0.94);
  border-color: #e2e9f2;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26, 55, 90, 0.06);
}

html:not([data-theme]) .card:hover,
html:not([data-theme]) .stat-card:hover,
html:not([data-theme]) .sidebar-panel:hover {
  border-color: #c5d9eb;
  box-shadow: 0 14px 28px rgba(26, 72, 111, 0.1);
}

html:not([data-theme]) .stat-card,
html:not([data-theme]) .summary-card {
  position: relative;
  padding: 18px;
  border-top: 3px solid #39a7d9;
  display: flex;
  align-items: center;
  gap: 13px;
}

html:not([data-theme]) .stat-card:nth-child(2) {
  border-top-color: #2d72c7;
}

html:not([data-theme]) .stat-card:nth-child(3) {
  border-top-color: #1ca77a;
}

html:not([data-theme]) .stat-card:nth-child(4) {
  border-top-color: #e5a336;
}

html:not([data-theme]) .stat-card span,
html:not([data-theme]) .summary-card span,
html:not([data-theme]) .muted-text {
  color: #687b94;
}

html:not([data-theme]) .stat-card strong,
html:not([data-theme]) .summary-card strong {
  color: #18365b;
  background: none;
  -webkit-text-fill-color: initial;
}

/* ==========================================================================
   EduNext Executive Light Theme Adaptive System (html:not([data-theme]))
   ========================================================================== */
html:not([data-theme]) .edunext-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.25), transparent 45%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
}

html:not([data-theme]) .edunext-hero h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

html:not([data-theme]) .edunext-hero .hero-subtitle {
  color: #e2e8f0 !important;
}

html:not([data-theme]) .edunext-hero .hero-tag {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
}

html:not([data-theme]) .kpi-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

html:not([data-theme]) .kpi-info strong {
  color: #0f172a !important;
  text-shadow: none !important;
}

html:not([data-theme]) .kpi-info span {
  color: #475569 !important;
}

html:not([data-theme]) .edunext-card-section,
html:not([data-theme]) .rail-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

html:not([data-theme]) .section-header-row h2,
html:not([data-theme]) .rail-header h3 {
  color: #0f172a !important;
  text-shadow: none !important;
}

html:not([data-theme]) .rail-header small {
  color: #475569 !important;
}

html:not([data-theme]) .edunext-class-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme]) .edunext-class-card:hover {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
}

html:not([data-theme]) .class-card-body h3 {
  color: #0f172a !important;
}

html:not([data-theme]) .class-subject-name,
html:not([data-theme]) .class-meta-row {
  color: #475569 !important;
}

html:not([data-theme]) .edunext-tabs {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html:not([data-theme]) .edunext-tabs .tab-btn {
  color: #475569 !important;
}

html:not([data-theme]) .edunext-tabs .tab-btn.active {
  background: #ffffff !important;
  color: #0284c7 !important;
  border: 1px solid #0284c7 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

html:not([data-theme]) .edunext-list-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme]) .edunext-list-item:hover {
  background: #ffffff !important;
}

html:not([data-theme]) .item-main strong {
  color: #0f172a !important;
}

html:not([data-theme]) .item-main span {
  color: #475569 !important;
}

html:not([data-theme]) .quote-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 1px solid #fde68a !important;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.12);
}

html:not([data-theme]) .quote-text {
  color: #78350f !important;
  text-shadow: none !important;
}

html:not([data-theme]) .quote-author {
  color: #92400e !important;
}

html:not([data-theme]) .timeline-item,
html:not([data-theme]) .task-item {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme]) .timeline-item.active {
  background: #e0f2fe !important;
  border-inline-start: 4px solid #0284c7 !important;
}

html:not([data-theme]) .time-slot {
  color: #0284c7 !important;
}

html:not([data-theme]) .schedule-detail strong,
html:not([data-theme]) .task-info strong {
  color: #0f172a !important;
}

html:not([data-theme]) .schedule-detail span,
html:not([data-theme]) .task-info span {
  color: #475569 !important;
}

html:not([data-theme]) .date-badge {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

html:not([data-theme]) .stat-card>div:last-child {
  min-width: 0;
}

html:not([data-theme]) .stat-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.15rem;
}

html:not([data-theme]) .stat-icon-blue {
  background: #e1f2ff;
  color: #1676b6;
}

html:not([data-theme]) .stat-icon-indigo {
  background: #e8eaff;
  color: #5359c9;
}

html:not([data-theme]) .stat-icon-green {
  background: #ddf7ed;
  color: #14956a;
}

html:not([data-theme]) .stat-icon-orange {
  background: #fff0df;
  color: #bd6c14;
}

html:not([data-theme]) .dashboard-hero {
  min-height: 154px;
}

html:not([data-theme]) .dashboard-hero .hero-actions .btn {
  background: #fff;
  color: #1b5689;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(10, 50, 90, 0.16);
}

html:not([data-theme]) .dashboard-hero .hero-actions .btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

/* Reference dashboard composition */
html:not([data-theme]) .reference-dashboard {
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 22px;
}

html:not([data-theme]) .reference-dashboard .dashboard-main {
  gap: 22px;
}

html:not([data-theme]) .dashboard-section-block {
  min-width: 0;
}

html:not([data-theme]) .dashboard-section-block .card-header-row {
  margin: 0 4px 12px;
}

html:not([data-theme]) .dashboard-section-block h2 {
  font-size: 1.05rem !important;
  color: #182f4d;
}

html:not([data-theme]) .dashboard-text-link {
  color: #2679c3;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

html:not([data-theme]) .class-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

html:not([data-theme]) .class-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e1eaf3;
  border-radius: 12px;
  background: #fff;
  color: #182f4d;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(26, 65, 100, 0.06);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

html:not([data-theme]) .class-card:hover {
  transform: translateY(-3px);
  border-color: #b6d7ee;
  box-shadow: 0 12px 26px rgba(26, 81, 123, 0.13);
}

html:not([data-theme]) .class-card-cover {
  height: 70px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, #254c96, #65b7db);
}

html:not([data-theme]) .class-card:nth-child(2) .class-card-cover {
  background: linear-gradient(135deg, #1e6b98, #4bc7b0);
}

html:not([data-theme]) .class-card:nth-child(3) .class-card-cover {
  background: linear-gradient(135deg, #6b54bc, #a895e6);
}

html:not([data-theme]) .class-card:nth-child(4) .class-card-cover {
  background: linear-gradient(135deg, #1774c5, #40a6df);
}

html:not([data-theme]) .class-card-cover span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  font-weight: 900;
}

html:not([data-theme]) .class-card-cover b {
  letter-spacing: 2px;
  font-size: 0.8rem;
}

html:not([data-theme]) .class-card-body {
  padding: 12px;
}

html:not([data-theme]) .class-card-body strong,
html:not([data-theme]) .class-card-body span,
html:not([data-theme]) .class-card-body small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not([data-theme]) .class-card-body strong {
  font-size: 0.84rem;
}

html:not([data-theme]) .class-card-body span {
  margin-top: 3px;
  color: #526d8b;
  font-size: 0.74rem;
}

html:not([data-theme]) .class-card-body small {
  margin-top: 7px;
  color: #7b8ca1;
  font-size: 0.68rem;
}

html:not([data-theme]) .class-progress {
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef4;
}

html:not([data-theme]) .class-progress i {
  display: block;
  height: 100%;
  min-width: 12%;
  border-radius: inherit;
  background: #347fd5;
}

html:not([data-theme]) .empty-dashboard-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #c9d9e7;
  border-radius: 12px;
  color: #71849a;
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
}

html:not([data-theme]) .reference-dashboard .dashboard-sidebar {
  gap: 14px;
}

html:not([data-theme]) .reference-dashboard .sidebar-panel {
  padding: 17px;
}

html:not([data-theme]) .reference-dashboard .profile-summary {
  gap: 4px;
}

html:not([data-theme]) .reference-dashboard .profile-summary strong {
  color: #1c4d78;
  font-size: 1rem;
}

html:not([data-theme]) .reference-dashboard .mini-metric {
  padding: 10px 0;
  border-bottom-color: #edf1f5;
}

html:not([data-theme]) .reference-dashboard .quick-links a {
  color: #44627f;
  border-bottom-color: #edf1f5;
}

/* Shared subpage language: the same dependable workspace colors without changing layouts. */
html:not([data-theme]) .output-page,
html:not([data-theme]) .auth-container {
  color: #203954;
}

html:not([data-theme]) .output-page .card,
html:not([data-theme]) .output-page .metric-panel,
html:not([data-theme]) .output-page .summary-card {
  background: #fff;
}

html:not([data-theme]) .btn {
  background: #2779c2;
  border-color: #2779c2;
  color: #fff;
  box-shadow: 0 5px 12px rgba(39, 121, 194, 0.16);
}

html:not([data-theme]) .btn:hover {
  background: #1d629f;
  border-color: #1d629f;
}

html:not([data-theme]) .btn.secondary {
  background: #eef5fb;
  border-color: #cfe1ef;
  color: #236596;
  box-shadow: none;
}

html:not([data-theme]) input,
html:not([data-theme]) select,
html:not([data-theme]) textarea,
html:not([data-theme]) .form-control,
html:not([data-theme]) .score-input {
  background: #fff;
  border-color: #d7e3ee;
  color: #203954;
}

html:not([data-theme]) form p label,
html:not([data-theme]) .form-group label {
  color: #315777;
}

html:not([data-theme]) table th {
  background: #f2f6fa;
}

html:not([data-theme]) table td {
  color: #425d78;
}

html:not([data-theme]) .qs-modal {
  background: rgba(17, 40, 67, 0.22);
  backdrop-filter: blur(3px);
}

html:not([data-theme]) .qs-modal-content {
  background: #fff;
  border-color: #d8e6f1;
  box-shadow: 0 24px 70px rgba(18, 52, 82, 0.22);
}

html:not([data-theme]) .qs-modal-title-wrap h3,
html:not([data-theme]) .qs-step-body strong {
  color: #1e4264;
}

html:not([data-theme]) .qs-modal-title-wrap p,
html:not([data-theme]) .qs-step-body p {
  color: #71859b;
}

html:not([data-theme]) .qs-step {
  background: #f5f9fc;
  border-color: #dfebf3;
}

@media (max-width: 1120px) {
  html:not([data-theme]) .class-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html:not([data-theme]) .class-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  html:not([data-theme]) .class-card-cover {
    height: 58px;
  }

  html:not([data-theme]) .class-card-body {
    padding: 9px;
  }
}

html:not([data-theme]) .card h2,
html:not([data-theme]) .sidebar-panel h3,
html:not([data-theme]) table th {
  color: #1d3557;
}

html:not([data-theme]) .sidebar-panel h3 {
  border-bottom-color: #e8eef5;
}

html:not([data-theme]) .tab-buttons {
  background: #eef4f9;
  border-color: #d9e5ef;
}

html:not([data-theme]) .tab-btn {
  color: #68809a;
}

html:not([data-theme]) .tab-btn.active {
  background: #fff;
  color: #1767a5;
  box-shadow: 0 3px 10px rgba(31, 86, 132, 0.1);
}

html:not([data-theme]) table thead {
  background: #f2f6fa;
}

html:not([data-theme]) table td,
html:not([data-theme]) table th {
  border-bottom-color: #e8eef5;
}

html:not([data-theme]) .main-footer {
  color: #8190a4;
  border-top-color: #e1e8f0;
}

/* KPI Badge Pill */
.lux-kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   Executive Command Palette Modal (Ctrl + K)
   ========================================================================== */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 90px;
  animation: cmd-fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmd-fade-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cmd-palette-box {
  width: 90%;
  max-width: 620px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.cmd-palette-icon {
  font-size: 1.2rem;
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
}

.cmd-badge {
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-group-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cyan-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
}

.cmd-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.cmd-palette-item:hover {
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold-light);
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateX(-2px);
}

.cmd-item-shortcut {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

/* ==========================================================================
   EduNext Executive Dashboard Design System Components
   ========================================================================== */
.edunext-dashboard {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 30px;
}

/* 1. Hero Banner Card */
.edunext-hero {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(15, 23, 42, 0.95) 100%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 45%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}

.edunext-hero h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin: 0;
  font-weight: 600;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hero-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tag-purple {
  color: #c7d2fe;
  border-color: rgba(199, 210, 254, 0.35);
}

.tag-emerald {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.35);
}

.tag-orange {
  color: #fdba74;
  border-color: rgba(253, 186, 116, 0.35);
}

.tag-cyan {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.35);
}

.hero-action-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.edunext-primary-btn {
  background: var(--cyan-gradient) !important;
  color: #030712 !important;
  font-weight: 800 !important;
  border: none !important;
  padding: 10px 22px !important;
  border-radius: 12px !important;
  box-shadow: var(--glow-cyan) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edunext-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5) !important;
}

.edunext-secondary-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--white) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  padding: 10px 22px !important;
  border-radius: 12px !important;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.edunext-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* 2. Executive KPI Metric Grid */
.edunext-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.icon-cyan {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan-primary);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.icon-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.icon-gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.kpi-info strong {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.kpi-info span {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
}

/* KPI Micro-Sparkline */
.kpi-sparkline {
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  margin-inline-start: auto;
}

.kpi-sparkline canvas {
  display: block;
}

.kpi-card:hover .kpi-sparkline {
  opacity: 1;
}

/* 3. Main Grid: Primary Content + Right Widget Rail */
.edunext-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.edunext-primary-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.edunext-card-section {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header-row h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.edunext-link {
  color: var(--cyan-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edunext-link:hover {
  opacity: 0.9;
  transform: translateX(-3px);
}

/* Active Classes Grid */
.edunext-class-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.edunext-class-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}

.edunext-class-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.class-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.class-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--cyan-gradient);
  color: #030712;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.class-more-btn {
  color: var(--muted);
  font-size: 0.9rem;
}

.class-card-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 2px 0;
}

.class-subject-name {
  font-size: 0.82rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.class-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 6px;
  font-weight: 600;
}

.percent-text {
  color: var(--cyan-primary);
  font-weight: 800;
}

.class-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.class-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--cyan-gradient);
  transition: width 0.4s ease;
}

/* Tabs & Activity Hub List */
.edunext-tabs {
  display: flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.edunext-tabs .tab-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.edunext-tabs .tab-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.edunext-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edunext-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.edunext-list-item:hover {
  background: rgba(30, 41, 59, 0.8);
}

.item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-main strong {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 800;
}

.item-main span {
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
}

.item-actions {
  display: flex;
  gap: 6px;
}

.btn-pill {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: background 0.2s ease;
}

.btn-pill:hover {
  background: rgba(56, 189, 248, 0.28);
}

.btn-wa {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-wa:hover {
  background: rgba(16, 185, 129, 0.3);
}

/* Secondary Rail Widgets */
.edunext-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rail-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.quote-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
}

.quote-icon {
  font-size: 2.4rem;
  line-height: 1;
  color: #fbbf24;
  font-family: Georgia, serif;
}

.quote-text {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fef08a !important;
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.quote-author {
  font-size: 0.78rem;
  color: #cbd5e1;
  text-align: end;
  font-weight: 700;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rail-header h3 {
  font-size: 0.98rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0;
}

.rail-header small {
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Timeline & Tasks */
.schedule-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.5);
  border-inline-start: 4px solid #64748b;
}

.timeline-item.active {
  border-inline-start-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.time-slot {
  font-size: 0.75rem;
  font-weight: 900;
  color: #38bdf8 !important;
  white-space: nowrap;
}

.schedule-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.schedule-detail strong {
  font-size: 0.85rem;
  color: #f8fafc !important;
  font-weight: 800;
}

.schedule-detail span {
  font-size: 0.75rem;
  color: #cbd5e1 !important;
  font-weight: 600;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.date-badge {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.22);
  color: #fef08a !important;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-info strong {
  font-size: 0.85rem;
  color: #f8fafc !important;
  font-weight: 800;
}

.task-info span {
  font-size: 0.75rem;
  color: #cbd5e1 !important;
  font-weight: 600;
}

/* Floating AI Assistant Elevation Fix */
#aiAssistantFab,
.ai-assistant-fab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 120;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(16px);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .edunext-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .edunext-main-grid {
    grid-template-columns: 1fr;
  }

  .edunext-class-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Print Optimization — Executive Dashboard Report (@media print)
   ========================================================================== */

/* Topbar Print Button */
.topbar-print-btn {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: var(--gold-primary) !important;
  transition: all 0.2s ease;
}

.topbar-print-btn:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  transform: scale(1.08);
}

@media print {

  /* ── Page Setup ─────────────────────────────────────── */
  @page {
    size: A4 portrait;
    margin: 16mm 14mm;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 12px !important;
  }

  /* ── Hide UI Chrome ──────────────────────────────────── */
  .topbar,
  .app-sidebar,
  .hero-actions,
  .hero-action-box,
  .edunext-tabs,
  .item-actions,
  .edunext-link,
  .btn,
  .btn-pill,
  .btn-wa,
  #aiAssistantFab,
  .autosave-toast,
  .weeks-calendar,
  .theme-btn,
  .action-cluster,
  .topbar-print-btn,
  #quick-start-modal,
  #command-palette-modal,
  #shortcut-toast,
  footer {
    display: none !important;
  }

  /* ── Layout Flatten ──────────────────────────────────── */
  .app-shell {
    display: block !important;
  }

  .app-main {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ── Dashboard Executive Print ───────────────────────── */
  .edunext-dashboard {
    gap: 14px !important;
  }

  .edunext-hero {
    background: linear-gradient(135deg, #10213d 0%, #1e3a5f 100%) !important;
    border-radius: 10px !important;
    padding: 18px 22px !important;
    page-break-inside: avoid;
  }

  .edunext-hero h1 {
    font-size: 1.4rem !important;
    color: #ffffff !important;
  }

  .edunext-hero .hero-subtitle {
    color: #dbeafe !important;
  }

  /* KPI Grid — 4 columns on paper */
  .edunext-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    page-break-inside: avoid;
  }

  .kpi-card {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .kpi-info strong {
    color: #0f172a !important;
    font-size: 1.35rem !important;
  }

  .kpi-info span {
    color: #475569 !important;
  }

  .kpi-sparkline {
    display: none !important;
  }

  /* Main Grid — stack vertically */
  .edunext-main-grid {
    display: block !important;
  }

  .edunext-card-section,
  .rail-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    margin-bottom: 14px;
    padding: 14px !important;
    page-break-inside: avoid;
  }

  .section-header-row h2,
  .rail-header h3 {
    color: #0f172a !important;
    font-size: 0.95rem !important;
  }

  .edunext-class-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
  }

  .class-card-body h3 {
    color: #0f172a !important;
  }

  .class-subject-name,
  .class-meta-row {
    color: #475569 !important;
  }

  .edunext-list-item {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
  }

  .item-main strong {
    color: #0f172a !important;
  }

  .item-main span {
    color: #475569 !important;
  }

  .timeline-item,
  .task-item {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
  }

  .time-slot {
    color: #0284c7 !important;
  }

  .schedule-detail strong,
  .task-info strong {
    color: #0f172a !important;
  }

  .schedule-detail span,
  .task-info span {
    color: #475569 !important;
  }

  .date-badge {
    background: #fef3c7 !important;
    color: #92400e !important;
  }

  /* Legacy selectors */
  .output-page,
  .card,
  .table-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    color: #0f172a !important;
  }

  .data-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }

  .data-table td {
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .status-badge {
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  .print-official-signatures {
    display: flex !important;
  }

  /* Print Header Watermark */
  .edunext-hero::after {
    content: "ClassBridge AI — تقرير تنفيذي رسمي";
    display: block;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #8ed7fb;
    font-weight: 700;
  }
}

/* Final dashboard overrides: keep the reference layout coherent with the light workspace. */
html:not([data-theme]) .edunext-dashboard {
  color: #1c3552;
  gap: 20px;
}

html:not([data-theme]) .edunext-hero {
  min-height: 206px;
  padding: 30px 34px;
  background:
    linear-gradient(100deg, rgba(13, 31, 57, 0.98), rgba(31, 78, 120, 0.9)),
    linear-gradient(135deg, #132c4d, #2c82ae);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 34px rgba(18, 53, 86, 0.18);
}

html:not([data-theme]) .edunext-hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  inset-inline-end: -90px;
  top: -130px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.035), 0 0 0 68px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

html:not([data-theme]) .hero-content,
html:not([data-theme]) .hero-action-box {
  position: relative;
  z-index: 1;
}

html:not([data-theme]) .hero-badge {
  background: rgba(137, 218, 249, 0.14);
  border-color: rgba(137, 218, 249, 0.3);
  color: #a9e7ff;
}

html:not([data-theme]) .edunext-hero h1,
html:not([data-theme]) .hero-subtitle {
  color: #fff;
}

html:not([data-theme]) .hero-subtitle {
  color: #b9d9ed;
}

html:not([data-theme]) .hero-tag {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

html:not([data-theme]) .edunext-primary-btn {
  background: #f1b84b !important;
  color: #193653 !important;
  box-shadow: 0 7px 16px rgba(4, 22, 42, 0.2) !important;
}

html:not([data-theme]) .edunext-secondary-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

html:not([data-theme]) .edunext-kpi-grid {
  gap: 14px;
}

html:not([data-theme]) .edunext-kpi-grid .kpi-card {
  background: #fff;
  border: 1px solid #e0e9f2;
  border-radius: 13px;
  box-shadow: 0 7px 20px rgba(27, 62, 96, 0.06);
}

html:not([data-theme]) .kpi-info strong {
  color: #193b61;
}

html:not([data-theme]) .kpi-info span {
  color: #71839a;
}

html:not([data-theme]) .icon-cyan {
  background: #e3f3ff;
  color: #247fc1;
  border-color: #cce8f8;
}

html:not([data-theme]) .icon-emerald {
  background: #e1f7ee;
  color: #15976c;
  border-color: #c9eddf;
}

html:not([data-theme]) .icon-rose {
  background: #ffebf0;
  color: #d94c70;
  border-color: #f8d3de;
}

html:not([data-theme]) .icon-gold {
  background: #fff2dc;
  color: #b97817;
  border-color: #f5dfb8;
}

html:not([data-theme]) .edunext-main-grid {
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 18px;
}

html:not([data-theme]) .edunext-card-section,
html:not([data-theme]) .rail-card {
  background: #fff;
  border: 1px solid #e1eaf2;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(28, 64, 98, 0.055);
}

html:not([data-theme]) .section-header-row h2,
html:not([data-theme]) .rail-header h3 {
  color: #1b3858;
}

html:not([data-theme]) .edunext-class-card,
html:not([data-theme]) .edunext-list-item,
html:not([data-theme]) .timeline-item,
html:not([data-theme]) .task-item {
  background: #f6f9fc;
  border-color: #e3ebf2;
}

html:not([data-theme]) .edunext-class-card:hover {
  background: #fff;
  border-color: #b7d9ed;
  box-shadow: 0 9px 20px rgba(31, 91, 133, 0.1);
}

html:not([data-theme]) .class-card-body h3,
html:not([data-theme]) .item-main strong,
html:not([data-theme]) .schedule-detail strong,
html:not([data-theme]) .task-info strong {
  color: #244464;
}

html:not([data-theme]) .class-subject-name,
html:not([data-theme]) .class-meta-row,
html:not([data-theme]) .item-main span,
html:not([data-theme]) .schedule-detail span,
html:not([data-theme]) .task-info span,
html:not([data-theme]) .rail-header small {
  color: #72869d;
}

html:not([data-theme]) .edunext-tabs {
  background: #edf4f9;
  border-color: #dce8f0;
}

html:not([data-theme]) .edunext-tabs .tab-btn {
  color: #70859b;
}

html:not([data-theme]) .edunext-tabs .tab-btn.active {
  background: #fff;
  color: #1f73b0;
  border-color: #c7e2f2;
}

html:not([data-theme]) .quote-card {
  background: linear-gradient(145deg, #edf7fd, #fff) !important;
  border-color: #d5e9f5;
}

html:not([data-theme]) .quote-icon {
  color: #3b91c7;
}

html:not([data-theme]) .quote-text {
  color: #265477;
}

html:not([data-theme]) .quote-author {
  color: #7890a5;
}

html:not([data-theme]) .timeline-item.active {
  background: #eaf6fd;
}

html:not([data-theme]) .time-slot {
  color: #2780bb;
}

html:not([data-theme]) .date-badge {
  background: #fff0d5;
  color: #a66a12;
}

html:not([data-theme]) .dashboard-calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

html:not([data-theme]) .calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border: 1px solid #e3ebf2;
  border-radius: 9px;
  background: #f6f9fc;
  color: #8191a3;
}

html:not([data-theme]) .calendar-day span {
  font-size: 0.65rem;
}

html:not([data-theme]) .calendar-day strong {
  color: #365a78;
  font-size: 0.9rem;
}

html:not([data-theme]) .calendar-day.today {
  background: #e7f4fc;
  border-color: #80c5e8;
  box-shadow: inset 0 -3px 0 #2c91c9;
}

html:not([data-theme]) .calendar-day.today strong {
  color: #17699f;
}

@media (max-width: 1024px) {
  html:not([data-theme]) .edunext-main-grid {
    grid-template-columns: 1fr;
  }

  html:not([data-theme]) .edunext-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html:not([data-theme]) .edunext-hero {
    padding: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  html:not([data-theme]) .hero-action-box {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  html:not([data-theme]) .hero-action-box .btn {
    flex: 1 1 190px;
  }

  html:not([data-theme]) .edunext-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  html:not([data-theme]) .edunext-rail {
    display: flex;
  }

  html:not([data-theme]) .section-header-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Medium screens still have enough room for the desktop workspace. */
@media (min-width: 761px) and (max-width: 1024px) {
  html:not([data-theme]) .topbar {
    flex-direction: row;
    align-items: center;
    padding: 10px 18px;
  }

  html:not([data-theme]) .app-sidebar {
    width: 220px;
  }

  html:not([data-theme]) .container {
    padding-inline: 16px;
    margin-top: 18px;
  }

  html:not([data-theme]) .edunext-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }

  html:not([data-theme]) .edunext-main-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 14px;
  }

  html:not([data-theme]) .edunext-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Compact phone workspace: preserve icon navigation and give the content room to breathe. */
@media (max-width: 760px) {
  html:not([data-theme]) .app-sidebar {
    width: 64px;
    min-width: 64px;
  }

  html:not([data-theme]) .sidebar-brand {
    padding: 14px 10px;
    justify-content: center;
  }

  html:not([data-theme]) .sidebar-brand-text,
  html:not([data-theme]) .sidebar-label,
  html:not([data-theme]) .sidebar-section-label,
  html:not([data-theme]) .sidebar-user-info,
  html:not([data-theme]) .sidebar-badge {
    display: none;
  }

  html:not([data-theme]) .sidebar-collapse-btn {
    display: none;
  }

  html:not([data-theme]) .sidebar-nav {
    padding-inline: 8px;
  }

  html:not([data-theme]) .sidebar-link {
    justify-content: center;
    padding: 10px 6px;
  }

  html:not([data-theme]) .sidebar-icon {
    width: 30px;
  }

  html:not([data-theme]) .sidebar-user-btn {
    justify-content: center;
    padding-inline: 0;
  }

  html:not([data-theme]) .topbar {
    min-height: 62px;
    padding: 8px 12px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  html:not([data-theme]) .topbar-start {
    min-width: 0;
  }

  html:not([data-theme]) .topbar-context span {
    display: none;
  }

  html:not([data-theme]) .topbar-context strong {
    font-size: 1.02rem;
  }

  html:not([data-theme]) .topbar-actions {
    min-width: 0;
    gap: 5px;
  }

  html:not([data-theme]) .topbar-search-hint {
    padding: 6px 8px;
  }

  html:not([data-theme]) .cmd-badge {
    display: none;
  }

  html:not([data-theme]) .container {
    width: 100%;
    padding-inline: 12px;
    margin-top: 14px;
  }

  html:not([data-theme]) .edunext-hero {
    min-height: 0;
  }

  html:not([data-theme]) .edunext-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-height: 500px) {
  .ai-fab-btn {
    display: none !important;
  }
}

/* Theme propagation: selected palette applies to the complete application shell. */
[data-theme="emerald"] {
  --theme-accent: #10b981;
  --theme-accent-strong: #047857;
  --theme-accent-soft: #d1fae5;
  --theme-accent-wash: #ecfdf5;
  --theme-surface: #ffffff;
  --theme-page: #f1faf6;
  --theme-ink: #123b31;
  --theme-muted: #648379;
  --theme-border: #cfe9dc;
}

[data-theme="sapphire"] {
  --theme-accent: #3b82f6;
  --theme-accent-strong: #1d4ed8;
  --theme-accent-soft: #dbeafe;
  --theme-accent-wash: #eff6ff;
  --theme-surface: #ffffff;
  --theme-page: #f2f7ff;
  --theme-ink: #18365e;
  --theme-muted: #647b9b;
  --theme-border: #d4e2f5;
}

[data-theme="ruby"] {
  --theme-accent: #e11d48;
  --theme-accent-strong: #9f1239;
  --theme-accent-soft: #ffe4e9;
  --theme-accent-wash: #fff1f2;
  --theme-surface: #ffffff;
  --theme-page: #fff6f7;
  --theme-ink: #551b2d;
  --theme-muted: #96707c;
  --theme-border: #f2d3dc;
}

[data-theme="pearl"] {
  --theme-accent: #d97706;
  --theme-accent-strong: #92400e;
  --theme-accent-soft: #fef3c7;
  --theme-accent-wash: #fffbeb;
  --theme-surface: #ffffff;
  --theme-page: #f8fafc;
  --theme-ink: #26364d;
  --theme-muted: #6b7b91;
  --theme-border: #e6dfcf;
}

[data-theme="emerald"] body,
[data-theme="sapphire"] body,
[data-theme="ruby"] body,
[data-theme="pearl"] body {
  background: var(--theme-page);
  color: var(--theme-ink);
}

[data-theme="emerald"] .app-sidebar,
[data-theme="sapphire"] .app-sidebar,
[data-theme="ruby"] .app-sidebar,
[data-theme="pearl"] .app-sidebar {
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-accent-strong) 86%, #10213d) 0%, #10213d 100%);
  border-inline-end-color: color-mix(in srgb, var(--theme-accent) 42%, transparent);
}

[data-theme="emerald"] .topbar,
[data-theme="sapphire"] .topbar,
[data-theme="ruby"] .topbar,
[data-theme="pearl"] .topbar {
  background: color-mix(in srgb, var(--theme-surface) 94%, var(--theme-accent-wash));
  border-bottom-color: var(--theme-border);
}

[data-theme="emerald"] .card,
[data-theme="emerald"] .stat-card,
[data-theme="emerald"] .summary-card,
[data-theme="emerald"] .metric-panel,
[data-theme="emerald"] .sidebar-panel,
[data-theme="emerald"] .edunext-card-section,
[data-theme="emerald"] .rail-card,
[data-theme="sapphire"] .card,
[data-theme="sapphire"] .stat-card,
[data-theme="sapphire"] .summary-card,
[data-theme="sapphire"] .metric-panel,
[data-theme="sapphire"] .sidebar-panel,
[data-theme="sapphire"] .edunext-card-section,
[data-theme="sapphire"] .rail-card,
[data-theme="ruby"] .card,
[data-theme="ruby"] .stat-card,
[data-theme="ruby"] .summary-card,
[data-theme="ruby"] .metric-panel,
[data-theme="ruby"] .sidebar-panel,
[data-theme="ruby"] .edunext-card-section,
[data-theme="ruby"] .rail-card,
[data-theme="pearl"] .card,
[data-theme="pearl"] .stat-card,
[data-theme="pearl"] .summary-card,
[data-theme="pearl"] .metric-panel,
[data-theme="pearl"] .sidebar-panel,
[data-theme="pearl"] .edunext-card-section,
[data-theme="pearl"] .rail-card {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--theme-accent-strong) 10%, transparent);
}

[data-theme="emerald"] .edunext-hero,
[data-theme="sapphire"] .edunext-hero,
[data-theme="ruby"] .edunext-hero,
[data-theme="pearl"] .edunext-hero {
  background: linear-gradient(115deg, color-mix(in srgb, var(--theme-accent-strong) 88%, #17345a), color-mix(in srgb, var(--theme-accent) 60%, #245b88));
}

[data-theme="emerald"] .edunext-link,
[data-theme="sapphire"] .edunext-link,
[data-theme="ruby"] .edunext-link,
[data-theme="pearl"] .edunext-link,
[data-theme="emerald"] .dashboard-text-link,
[data-theme="sapphire"] .dashboard-text-link,
[data-theme="ruby"] .dashboard-text-link,
[data-theme="pearl"] .dashboard-text-link {
  color: var(--theme-accent-strong);
}

[data-theme="emerald"] .edunext-class-card,
[data-theme="sapphire"] .edunext-class-card,
[data-theme="ruby"] .edunext-class-card,
[data-theme="pearl"] .edunext-class-card,
[data-theme="emerald"] .edunext-list-item,
[data-theme="sapphire"] .edunext-list-item,
[data-theme="ruby"] .edunext-list-item,
[data-theme="pearl"] .edunext-list-item {
  background: var(--theme-accent-wash);
  border-color: var(--theme-border);
}

[data-theme="emerald"] .btn,
[data-theme="sapphire"] .btn,
[data-theme="ruby"] .btn,
[data-theme="pearl"] .btn {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: #fff;
}

[data-theme="emerald"] .btn.secondary,
[data-theme="sapphire"] .btn.secondary,
[data-theme="ruby"] .btn.secondary,
[data-theme="pearl"] .btn.secondary {
  background: var(--theme-accent-wash);
  border-color: var(--theme-border);
  color: var(--theme-accent-strong);
}

[data-theme="emerald"] input,
[data-theme="emerald"] select,
[data-theme="emerald"] textarea,
[data-theme="sapphire"] input,
[data-theme="sapphire"] select,
[data-theme="sapphire"] textarea,
[data-theme="ruby"] input,
[data-theme="ruby"] select,
[data-theme="ruby"] textarea,
[data-theme="pearl"] input,
[data-theme="pearl"] select,
[data-theme="pearl"] textarea {
  background: var(--theme-surface);
  color: var(--theme-ink);
  border-color: var(--theme-border);
}

[data-theme="emerald"] table thead,
[data-theme="sapphire"] table thead,
[data-theme="ruby"] table thead,
[data-theme="pearl"] table thead {
  background: var(--theme-accent-wash);
}

[data-theme="emerald"] table td,
[data-theme="emerald"] table th,
[data-theme="sapphire"] table td,
[data-theme="sapphire"] table th,
[data-theme="ruby"] table td,
[data-theme="ruby"] table th,
[data-theme="pearl"] table td,
[data-theme="pearl"] table th {
  border-bottom-color: var(--theme-border);
  color: var(--theme-ink);
}

.command-search-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.command-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.command-search-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ==========================================================================
   EduNext Executive Platform Components (Announcements, Learning, Utilities)
   ========================================================================== */

/* Twin Grid Layout */
.edunext-twin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.twin-card {
  height: 100%;
}

/* Announcements List */
.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.2s ease;
}

html:not([data-theme]) .announcement-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.announcement-item:hover {
  transform: translateX(-4px);
  border-color: rgba(56, 189, 248, 0.35);
}

.announcement-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.announcement-content strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.announcement-content p {
  font-size: 0.76rem;
  color: #94a3b8;
  margin: 0;
}

html:not([data-theme]) .announcement-content p {
  color: #64748b;
}

.announcement-time {
  font-size: 0.72rem;
  color: var(--cyan-primary);
  font-weight: 700;
  white-space: nowrap;
}

/* Learning Hero Box */
.learning-hero-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.learning-thumbnail {
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0f172a 100%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.4), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.play-btn-pulse {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.learning-thumbnail:hover .play-btn-pulse {
  transform: scale(1.15);
}

.learning-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.learning-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.learning-info strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.learning-info small {
  font-size: 0.76rem;
  color: #94a3b8;
}

html:not([data-theme]) .learning-info small {
  color: #64748b;
}

.btn-learn-start {
  background: linear-gradient(135deg, var(--cyan-primary) 0%, #0284c7 100%);
  color: #030712;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-learn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

/* Bottom Utility Bar */
.edunext-bottom-utility-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  margin-top: 10px;
}

html:not([data-theme]) .edunext-bottom-utility-bar {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.utility-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

html:not([data-theme]) .utility-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

.utility-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  transform: translateY(-2px);
}

html:not([data-theme]) .utility-chip:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

/* ==========================================================================
   EduNext 100% Pixel-Accurate Complete UI System Rules
   ========================================================================== */

.edunext-dashboard-wrapper {
  padding: 20px 24px;
  background-color: #f8fafc;
  min-height: 100vh;
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] .edunext-dashboard-wrapper {
  background-color: #0b0f19;
}

.edunext-main-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .edunext-main-layout {
    grid-template-columns: 1fr;
  }
}

.edunext-primary-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.edunext-side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 1. Hero Card Banner */
.edunext-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 70%, #0f172a 100%);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.hero-text-block {
  flex: 1;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.hero-text-block h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin: 0;
}

.hero-skill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.hero-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.hero-skill-chip span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
}

.hero-image-block {
  width: 300px;
  height: 200px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero-student-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-text {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  flex-direction: column;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-photo-text span {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: #ffffff;
}

.hero-photo-text strong {
  font-family: 'Georgia', serif;
  font-size: 1.45rem;
  color: #ffffff;
  font-weight: 900;
}

/* 2. KPI Metric Cards Row */
.edunext-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .edunext-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

html[data-theme="dark"] .kpi-card {
  background: #1e293b;
  border-color: #334155;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.icon-cyan-box {
  background: #e0f2fe;
  color: #0284c7;
}

.icon-emerald-box {
  background: #d1fae5;
  color: #059669;
}

.icon-rose-box {
  background: #ffe4e6;
  color: #e11d48;
}

.icon-gold-box {
  background: #fef3c7;
  color: #d97706;
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-content strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

html[data-theme="dark"] .kpi-content strong {
  color: #f8fafc;
}

.kpi-content span {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

/* 3. Current Classes Section */
.edunext-classes-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html[data-theme="dark"] .edunext-classes-wrapper {
  background: #1e293b;
  border-color: #334155;
}

.section-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-top-bar h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

html[data-theme="dark"] .section-top-bar h2 {
  color: #f8fafc;
}

.edunext-link {
  color: #0284c7;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.edunext-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

.classes-carousel-container {
  position: relative;
}

.carousel-nav-btn {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #475569;
  cursor: pointer;
  z-index: 5;
}

.classes-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .classes-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.edunext-class-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

html[data-theme="dark"] .edunext-class-card {
  background: #0f172a;
  border-color: #334155;
}

.edunext-class-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.class-card-header {
  height: 80px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.banner-purple {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.banner-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.banner-teal {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.banner-blue {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.class-options {
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.8;
}

.class-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.icon-emoji {
  font-size: 1.4rem;
}

.banner-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.class-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.class-card-body h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

html[data-theme="dark"] .class-card-body h3 {
  color: #f8fafc;
}

.class-sub {
  font-size: 0.78rem;
  color: #64748b;
}

.class-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.class-meta small {
  font-size: 0.75rem;
  color: #94a3b8;
}

.class-meta strong {
  font-size: 0.78rem;
  color: #475569;
}

.class-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.class-progress-fill {
  height: 100%;
  border-radius: 4px;
}

.fill-purple {
  background: #6366f1;
}

.fill-cyan {
  background: #0284c7;
}

.fill-teal {
  background: #0d9488;
}

.fill-blue {
  background: #2563eb;
}

/* 4. Lower Twin Grid */
.edunext-twin-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .edunext-twin-section {
    grid-template-columns: 1fr;
  }
}

.twin-column-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html[data-theme="dark"] .twin-column-card {
  background: #1e293b;
  border-color: #334155;
}

.announcements-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.announcement-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.announcement-row:hover {
  background: #f8fafc;
}

html[data-theme="dark"] .announcement-row:hover {
  background: #0f172a;
}

.announcement-pill {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pill-rose {
  background: #ffe4e6;
  color: #e11d48;
}

.pill-purple {
  background: #f3e8ff;
  color: #9333ea;
}

.pill-blue {
  background: #dbeafe;
  color: #2563eb;
}

.announcement-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.announcement-meta strong {
  font-size: 0.88rem;
  color: #0f172a;
}

html[data-theme="dark"] .announcement-meta strong {
  color: #f8fafc;
}

.announcement-meta p {
  font-size: 0.78rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.announcement-date {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Continuous Learning Hub */
.learning-hub-split {
  display: flex;
  gap: 16px;
}

.learning-featured-card {
  flex: 1.2;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.learning-cover {
  height: 110px;
  background: url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=400&auto=format&fit=crop') center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-pulse-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.5);
  cursor: pointer;
}

.badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(2, 132, 199, 0.9);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
}

.learning-details {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.learning-details strong {
  font-size: 0.88rem;
  color: #ffffff;
  line-height: 1.3;
}

.learning-details small {
  font-size: 0.72rem;
  color: #94a3b8;
}

.btn-start-course {
  margin-top: 8px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-start-course:hover {
  background: #0369a1;
}

.learning-side-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-course-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
}

html[data-theme="dark"] .side-course-item {
  background: #0f172a;
  border-color: #334155;
}

.course-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.course-info strong {
  font-size: 0.76rem;
  color: #0f172a;
  display: block;
}

html[data-theme="dark"] .course-info strong {
  color: #f8fafc;
}

.course-info small {
  font-size: 0.68rem;
  color: #64748b;
}

/* 5. Bottom Section */
.edunext-bottom-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.utility-chips-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.utility-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

html[data-theme="dark"] .utility-chip-btn {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}

.utility-chip-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-2px);
}

.global-identity-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.global-identity-footer strong {
  font-size: 0.85rem;
  color: #64748b;
}

.global-identity-footer span {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* 6. Side Column Rail Widgets */
.rail-widget-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html[data-theme="dark"] .rail-widget-card {
  background: #1e293b;
  border-color: #334155;
}

/* Quote Widget Special Background */
.quote-widget {
  background: #fffdf5;
  border-color: #fef08a;
  position: relative;
}

html[data-theme="dark"] .quote-widget {
  background: #1e293b;
  border-color: #d97706;
}

.quote-symbol {
  font-size: 3rem;
  color: #0284c7;
  line-height: 1;
  font-family: Georgia, serif;
}

.quote-body {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 6px 0 10px 0;
  line-height: 1.4;
}

html[data-theme="dark"] .quote-body {
  color: #f8fafc;
}

.quote-author {
  font-size: 0.8rem;
  color: #64748b;
}

/* Schedule Widget */
.rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rail-card-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

html[data-theme="dark"] .rail-card-header h3 {
  color: #f8fafc;
}

.edunext-link-small {
  font-size: 0.75rem;
  color: #0284c7;
  font-weight: bold;
  text-decoration: none;
}

.schedule-date-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
  margin: 4px 0 14px 0;
}

.schedule-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border-right: 4px solid #cbd5e1;
}

html[data-theme="dark"] .timeline-slot {
  background: #0f172a;
}

.slot-purple {
  border-right-color: #818cf8;
}

.slot-cyan {
  border-right-color: #38bdf8;
}

.slot-emerald {
  border-right-color: #34d399;
}

.slot-rose {
  border-right-color: #fb7185;
}

.slot-time {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: bold;
}

.slot-info strong {
  font-size: 0.78rem;
  color: #0f172a;
}

html[data-theme="dark"] .slot-info strong {
  color: #f8fafc;
}

.slot-icon {
  font-size: 1rem;
}

/* Upcoming Tasks Widget */
.tasks-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.task-date-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

html[data-theme="dark"] .task-date-box {
  background: #0f172a;
}

.task-date-box strong {
  font-size: 1.1rem;
  color: #0284c7;
}

.task-date-box small {
  font-size: 0.62rem;
  color: #64748b;
}

.task-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.task-detail strong {
  font-size: 0.82rem;
  color: #0f172a;
}

html[data-theme="dark"] .task-detail strong {
  color: #f8fafc;
}

.task-detail span {
  font-size: 0.72rem;
  color: #64748b;
}

.task-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.icon-blue {
  background: #e0f2fe;
}

.icon-red {
  background: #ffe4e6;
}

.icon-green {
  background: #d1fae5;
}

/* ==========================================================================
   EduFlow LMS Teacher Dashboard - 100% Inspired Complete CSS System
   ========================================================================== */

.eduflow-dashboard-wrapper {
  padding: 24px 32px;
  background-color: #F8FAFC;
  min-height: 100vh;
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] .eduflow-dashboard-wrapper {
  background-color: #0F172A;
}

/* Sidebar Logo Mark Glow */
.eduflow-logo-mark {
  background: #00a86b !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.35) !important;
}

/* Sidebar Active Pill Glowing Accent */
.app-sidebar .sidebar-link.active {
  background: #00a86b !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.35) !important;
  border-radius: 10px !important;
}

/* 1. Welcome Row Header */
.eduflow-welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .eduflow-welcome-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

.welcome-text-side h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0F172A;
  margin: 0;
  line-height: 1.2;
}

html[data-theme="dark"] .welcome-text-side h1 {
  color: #F8FAFC;
}

.welcome-text-side p {
  font-size: 0.92rem;
  color: #64748B;
  margin: 4px 0 0 0;
}

.quick-actions-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eduflow-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-purple {
  background: #ECE8FF;
  color: #6D28D9;
}

.btn-blue {
  background: #E8EDFF;
  color: #1D4ED8;
}

.btn-lavender {
  background: #F3E8FF;
  color: #7E22CE;
}

.eduflow-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 92, 252, 0.15);
}

/* 2. EduFlow KPI Metric Grid */
.eduflow-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 1024px) {
  .eduflow-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.eduflow-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] .eduflow-kpi-card {
  background: #1E293B;
  border-color: #334155;
}

.eduflow-kpi-card:hover {
  transform: translateY(-3px);
  border-color: #7C5CFC;
  box-shadow: 0 10px 24px -4px rgba(124, 92, 252, 0.12);
}

.kpi-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.box-purple {
  background: #F5F3FF;
  color: #7C5CFC;
}

.box-blue {
  background: #EFF6FF;
  color: #3B82F6;
}

.box-amber {
  background: #FFFBEB;
  color: #F59E0B;
}

.box-rose {
  background: #FFF1F2;
  color: #F43F5E;
}

.kpi-details {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.8rem;
  color: #64748B;
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0F172A;
  margin: 2px 0;
  line-height: 1;
}

html[data-theme="dark"] .kpi-value {
  color: #F8FAFC;
}

.kpi-trend {
  font-size: 0.72rem;
  font-weight: 700;
}

.trend-up {
  color: #10B981;
}

/* 3. EduFlow Main Content Grid */
.eduflow-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

@media (max-width: 1024px) {
  .eduflow-main-grid {
    grid-template-columns: 1fr;
  }
}

.eduflow-primary-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eduflow-side-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eduflow-card-section {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .eduflow-card-section {
  background: #1E293B;
  border-color: #334155;
}

.section-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-top-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

html[data-theme="dark"] .section-top-header h2 {
  color: #F8FAFC;
}

.eduflow-link-action {
  color: #7C5CFC;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.eduflow-link-action:hover {
  color: #5B38E6;
  text-decoration: underline;
}

/* Activity Feed Items */
.activity-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #F8FAFC;
  transition: background 0.2s ease;
}

html[data-theme="dark"] .activity-row-item {
  background: #0F172A;
}

.activity-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #E0E7FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.activity-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-info strong {
  font-size: 0.88rem;
  color: #0F172A;
}

html[data-theme="dark"] .activity-info strong {
  color: #F8FAFC;
}

.activity-info small {
  font-size: 0.76rem;
  color: #64748B;
  margin-top: 2px;
}

.activity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-success {
  background: #D1FAE5;
  color: #059669;
}

.badge-pending {
  background: #FEF3C7;
  color: #D97706;
}

.activity-meta time {
  font-size: 0.7rem;
  color: #94A3B8;
}

/* EduFlow Classes Grid */
.eduflow-classes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .eduflow-classes-grid {
    grid-template-columns: 1fr;
  }
}

.eduflow-class-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .eduflow-class-card {
  background: #0F172A;
  border-color: #334155;
}

.eduflow-class-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 92, 252, 0.12);
  border-color: #7C5CFC;
}

.class-options-dots {
  color: #ffffff;
  font-weight: bold;
  font-size: 1rem;
}

.class-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.class-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.class-card-content h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

html[data-theme="dark"] .class-card-content h3 {
  color: #F8FAFC;
}

.class-subject-tag {
  font-size: 0.78rem;
  color: #64748B;
}

.class-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.class-stats-row small {
  font-size: 0.75rem;
  color: #94A3B8;
}

.class-stats-row strong {
  font-size: 0.78rem;
  color: #475569;
}

.class-progress-track {
  height: 6px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.class-progress-fill {
  height: 100%;
  background: #7C5CFC;
  border-radius: 4px;
}

/* Upcoming Classes Side Rail */
.upcoming-classes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upcoming-class-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #F8FAFC;
  border-right: 4px solid #7C5CFC;
}

html[data-theme="dark"] .upcoming-class-card {
  background: #0F172A;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  background: #FFFFFF;
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .time-block {
  background: #1E293B;
}

.time-main {
  font-size: 0.92rem;
  font-weight: 900;
  color: #7C5CFC;
}

.time-period {
  font-size: 0.65rem;
  color: #64748B;
  margin-top: 2px;
}

.class-info-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.class-info-block strong {
  font-size: 0.82rem;
  color: #0F172A;
}

html[data-theme="dark"] .class-info-block strong {
  color: #F8FAFC;
}

.class-info-block small {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 2px;
}

.countdown-pill {
  font-size: 0.68rem;
  font-weight: 800;
  background: #ECE8FF;
  color: #7C5CFC;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-later {
  background: #F1F5F9;
  color: #64748B;
}

/* Daily Tasks Checkbox List */
.date-today-sub {
  font-size: 0.75rem;
  color: #94A3B8;
}

.daily-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #0F172A;
  cursor: pointer;
}

html[data-theme="dark"] .task-checkbox-item {
  color: #F8FAFC;
}

.text-done {
  text-decoration: line-through;
  color: #94A3B8 !important;
}

/* EduFlow KPI Card Colored Top Borders */
.border-top-purple {
  border-top: 3px solid #7C5CFC !important;
}

.border-top-blue {
  border-top: 3px solid #3B82F6 !important;
}

.border-top-amber {
  border-top: 3px solid #F59E0B !important;
}

.border-top-rose {
  border-top: 3px solid #F43F5E !important;
}

/* ==========================================================================
   ClassBridge AI Executive Hero Banner (1:1 Exact Parity)
   ========================================================================== */

.executive-hero-banner {
  background: linear-gradient(135deg, #0b2545 0%, #134074 50%, #0b2545 100%);
  border-radius: 20px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(11, 37, 69, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
  .executive-hero-banner {
    flex-direction: column-reverse;
    padding: 28px 24px;
  }
}

.hero-photo-container {
  width: 360px;
  height: 220px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 992px) {
  .hero-photo-container {
    width: 100%;
    height: 180px;
  }
}

.hero-student-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-script-overlay {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
}

.hero-script-overlay span {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #ffffff;
}

.hero-script-overlay strong {
  font-family: 'Georgia', serif;
  font-size: 1.55rem;
  color: #ffffff;
  font-weight: 900;
}

.hero-text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
}

.hero-executive-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
  align-self: flex-start;
}

.hero-executive-badge span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
}

.hero-text-content h1 {
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.hero-subtext {
  font-size: 1.05rem;
  color: #94a3b8;
  margin: 8px 0 20px 0;
}

.hero-skills-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.skill-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.skill-pill-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.skill-pill-item span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.pill-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.icon-purple {
  background: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.icon-orange {
  background: rgba(249, 115, 22, 0.3);
  color: #fb923c;
}

.icon-cyan {
  background: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.hero-buttons-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-hero-primary {
  background: #ffb703;
  color: #0b2545;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 12px 26px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 183, 3, 0.35);
}

.btn-hero-primary:hover {
  background: #ffc300;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 183, 3, 0.45);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================================
   EduFlow / ClassBridge Topbar System (1:1 Visual Parity with Reference)
   ========================================================================== */

header.topbar,
.edunext-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg-main, #f8fafc);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 99;
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] header.topbar,
html[data-theme="dark"] .edunext-topbar {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Search Bar Pill */
.topbar-start {
  flex: 1;
  max-width: 420px;
}

.edunext-global-search {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.edunext-search-input {
  width: 100%;
  height: 42px;
  padding: 0 46px 0 20px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 30px;
  font-size: 0.88rem;
  color: #0f172a;
  direction: rtl;
  text-align: right;
  outline: none;
  transition: all 0.25s ease;
}

html[dir="ltr"] .edunext-search-input {
  padding: 0 20px 0 46px;
}

html[data-theme="dark"] .edunext-search-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.edunext-search-input:focus {
  background: #ffffff;
  border-color: #7c5cfc;
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.12);
}

.edunext-global-search .search-icon {
  position: absolute;
  right: 16px;
  font-size: 1.05rem;
  color: #7c5cfc;
  pointer-events: none;
}

html[dir="ltr"] .edunext-global-search .search-icon {
  right: auto;
  left: 16px;
}

/* Topbar Actions Area */
.topbar-actions,
.edunext-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Icon Buttons (Theme, Notifications, Messages, Print) */
.topbar-icon-btn,
.edunext-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #334155;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

html[data-theme="dark"] .topbar-icon-btn,
html[data-theme="dark"] .edunext-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.topbar-icon-btn:hover,
.edunext-action-btn:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

html[data-theme="dark"] .topbar-icon-btn:hover,
html[data-theme="dark"] .edunext-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Print Button Soft Yellow Accent */
.topbar-print-btn {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
}

.topbar-print-btn:hover {
  background: #fde68a !important;
}

/* Notification Red Counter Badge */
.topbar-badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #ffffff;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

html[dir="ltr"] .topbar-badge-count {
  right: auto;
  left: -2px;
}

/* Language Toggle Switcher */
.topbar-lang {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 3px;
  gap: 2px;
}

html[data-theme="dark"] .topbar-lang {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.lang-pill {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lang-pill.active {
  background: #fde68a;
  color: #92400e;
  box-shadow: 0 2px 8px rgba(253, 230, 138, 0.5);
}

/* User Profile Chip Pill Container */
.edunext-user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 14px 4px 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.2);
  min-height: 48px;
}

html[dir="ltr"] .edunext-user-profile-chip {
  padding: 4px 6px 4px 14px;
}

html[data-theme="dark"] .edunext-user-profile-chip {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

.edunext-user-profile-chip:hover,
.edunext-user-profile-chip:focus-visible {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.3);
}

.user-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  text-align: right;
  direction: rtl;
  line-height: 1.25;
}

html[dir="ltr"] .user-chip-meta {
  text-align: left;
}

.user-chip-meta strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--white);
}

html[data-theme="dark"] .user-chip-meta strong {
  color: #f8fafc;
}

.user-chip-meta span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.chip-caret {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-right: 4px;
}

html[dir="ltr"] .chip-caret {
  margin-right: 0;
  margin-left: 4px;
}

/* ==========================================================================
   Figma ClassBridge 1:1 Executive Dashboard Styling System
   ========================================================================== */

/* Topbar Brand Badge (Right side of Topbar in RTL) */
.topbar-start {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.topbar-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cb-square-logo {
  width: 38px;
  height: 38px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.cb-brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cb-brand-titles strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

html[data-theme="dark"] .cb-brand-titles strong {
  color: #f8fafc;
}

.cb-brand-titles span {
  font-size: 0.72rem;
  color: #64748b;
}

.version-tag-pill {
  background: #d1fae5;
  color: #059669;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Notification Red Badge Dot */
.topbar-badge-count-dot {
  position: absolute;
  top: 8px;
  left: auto;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

/* Profile Dropdown Menu in Topbar */
.topbar-profile-dropdown {
  position: relative;
}

.topbar-profile-dropdown summary {
  list-style: none;
}

.topbar-profile-dropdown summary::-webkit-details-marker {
  display: none;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  /* Use logical property so RTL/LTR both anchor to the correct edge */
  inset-inline-end: 0;
  left: auto;
  right: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 8px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html[data-theme="dark"] .profile-dropdown-menu {
  background: #1e293b;
  border-color: #334155;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s ease;
  cursor: pointer;
  width: 100%;
  background: transparent;
  border: none;
  font-family: inherit;
  text-align: start;
}

html[data-theme="dark"] .dropdown-item {
  color: #f1f5f9;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Logout action: compact destructive styling, no overscaled border */
.logout-item {
  color: #dc2626 !important;
  font-weight: 700;
}

.logout-item:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

html[data-theme="dark"] .logout-item {
  color: #f87171 !important;
}

html[data-theme="dark"] .logout-item:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
}

/* Ensure the logout form inside dropdown inherits full width */
.dropdown-logout-form {
  display: contents;
}

/* Dashboard Outer Wrapper */
.figma-dashboard-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
  padding: 6px 4px 20px;
  direction: rtl;
  text-align: right;
}

/* 1. Executive Hero Banner */
.figma-hero-banner {
  background: linear-gradient(135deg, #091224 0%, #0f172a 44%, #172554 100%);
  border-radius: 24px;
  padding: 28px 32px 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.26);
  border: 1px solid rgba(148, 163, 184, 0.18);
  min-height: 220px;
}

.figma-hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 38%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.22), transparent 34%);
  pointer-events: none;
}

.hero-bg-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-top-pill-row {
  margin-bottom: 16px;
}

.hero-term-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.hero-main-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.hero-text-side {
  flex: 1;
  max-width: 580px;
  z-index: 3;
}

.hero-title-arabic {
  font-size: clamp(1.6rem, 2.3vw, 2.1rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero-subtitle-arabic {
  font-size: 0.94rem;
  color: rgba(203, 213, 225, 0.92);
  margin: 0 0 16px 0;
  font-weight: 500;
}

.hero-skills-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px 0;
  flex-wrap: wrap;
}

.hero-skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
}

.hero-skill-item .skill-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.98rem;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-skill-item:hover .skill-icon-box {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.hero-skill-item .skill-blue {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.hero-skill-item .skill-orange {
  background: linear-gradient(135deg, #ea580c, #f97316);
}

.hero-skill-item .skill-green {
  background: linear-gradient(135deg, #059669, #10b981);
}

.hero-skill-item .skill-purple {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.hero-skill-item .skill-label {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
}

.hero-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-figma-primary,
.btn-figma-secondary {
  position: relative;
  overflow: hidden;
}

.btn-figma-primary:focus-visible,
.btn-figma-secondary:focus-visible,
.quick-act-btn:focus-visible,
.tab-pill:focus-visible,
.block-link-more:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.btn-figma-primary {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}

.btn-figma-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.38);
}

.btn-figma-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.btn-figma-secondary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.hero-illustration-side {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.hero-student-graphic {
  max-height: 200px;
  width: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(-8px 4px 18px rgba(0, 0, 0, 0.35));
  border-radius: 0 16px 16px 0;
}

/* ==========================================================================
   FIGMA SIGNATURE EXECUTIVE HERO BANNER — UNIVERSAL PARITY ENGINE
   1:1 Pixel-Perfect with demo_teacher_english / dashboard.html across AR & EN
   ========================================================================== */

.figma-hero-banner {
  background: linear-gradient(135deg, #091322 0%, #0e1c38 45%, #0a1529 100%) !important;
  border-radius: 22px !important;
  padding: 30px 36px 32px !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 220px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 45px rgba(6, 14, 29, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 20px !important;
  display: block !important;
}

.figma-hero-banner::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    radial-gradient(ellipse at 14% 65%, rgba(14, 165, 233, 0.12), transparent 52%),
    radial-gradient(ellipse at 82% 20%, rgba(16, 185, 129, 0.10), transparent 48%),
    radial-gradient(ellipse at 50% 95%, rgba(99, 102, 241, 0.07), transparent 55%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.hero-bg-grid-overlay {
  position: absolute !important;
  inset: 0 !important;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px) !important;
  background-size: 34px 34px !important;
  mask-image: radial-gradient(ellipse 95% 85% at 50% 50%, #000 45%, transparent 100%) !important;
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 50%, #000 45%, transparent 100%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* ─── Top Pill Strip ─── */
.figma-hero-banner .hero-top-pill-row {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 20px !important;
  flex-wrap: wrap !important;
}

.figma-hero-banner .hero-brand-mark {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 12px !important;
  padding: 6px 14px 6px 10px !important;
  backdrop-filter: blur(6px) !important;
  text-decoration: none !important;
}

.figma-hero-banner .hero-brand-icon {
  width: 28px !important;
  height: 28px !important;
  background: linear-gradient(135deg, #00a86b, #34d399) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.4) !important;
  color: #ffffff !important;
}

.figma-hero-banner .hero-brand-name {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  letter-spacing: -0.01em !important;
  line-height: 1 !important;
}

.figma-hero-banner .hero-role-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(59, 130, 246, 0.16) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(59, 130, 246, 0.32) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  backdrop-filter: blur(8px) !important;
}

.figma-hero-banner .hero-term-badge,
.figma-hero-banner .hero-academic-year-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
  backdrop-filter: blur(8px) !important;
  width: auto !important;
}

/* ─── Content Layout & Text ─── */
.figma-hero-banner .hero-main-flex {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  position: relative !important;
  z-index: 2 !important;
  min-height: 150px !important;
}

.figma-hero-banner :is(.hero-text-side, .hero-content-wrap) {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

.figma-hero-banner .hero-title-arabic {
  font-size: clamp(1.45rem, 2.4vw, 2.05rem) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.025em !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45) !important;
}

.figma-hero-banner .hero-subtitle-arabic {
  font-size: 0.92rem !important;
  color: rgba(203, 213, 225, 0.94) !important;
  margin: 0 0 22px 0 !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

/* ─── 4 Metric Pillars (Cards with glowing dots & Chips) ─── */
.figma-hero-banner .hero-skills-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 22px 0 !important;
  flex-wrap: wrap !important;
}

.figma-hero-banner .hero-skill-card {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 14px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  font-size: 0.8rem !important;
  color: #cbd5e1 !important;
  backdrop-filter: blur(8px) !important;
  transition: all 0.2s ease !important;
}

.figma-hero-banner .hero-skill-card:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  transform: translateY(-2px) !important;
}

.figma-hero-banner .hero-skill-card .skill-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

.figma-hero-banner .hero-skill-card .skill-dot.blue   { background: #38bdf8 !important; box-shadow: 0 0 8px #38bdf8 !important; }
.figma-hero-banner .hero-skill-card .skill-dot.orange { background: #fb923c !important; box-shadow: 0 0 8px #fb923c !important; }
.figma-hero-banner .hero-skill-card .skill-dot.green  { background: #34d399 !important; box-shadow: 0 0 8px #34d399 !important; }
.figma-hero-banner .hero-skill-card .skill-dot.purple { background: #c084fc !important; box-shadow: 0 0 8px #c084fc !important; }

.figma-hero-banner .hero-skill-card .skill-text {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  white-space: nowrap !important;
}

.figma-hero-banner .hero-skill-card .skill-text strong {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  margin-inline-start: 4px !important;
}

/* ─── Actions Group ─── */
.figma-hero-banner :is(.hero-actions-group, .hero-actions-row) {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

/* ─── Directional Layout: RTL (Arabic) ─── */
[dir="rtl"] .figma-hero-banner,
html[dir="rtl"] .figma-hero-banner,
html:not([dir]) .figma-hero-banner {
  direction: rtl !important;
  text-align: right !important;
}

[dir="rtl"] .figma-hero-banner :is(.hero-text-side, .hero-content-wrap),
html[dir="rtl"] .figma-hero-banner :is(.hero-text-side, .hero-content-wrap),
html:not([dir]) .figma-hero-banner :is(.hero-text-side, .hero-content-wrap) {
  direction: rtl !important;
  text-align: right !important;
  margin-inline-start: 0 !important;
  margin-inline-end: auto !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  max-width: 60% !important;
}

[dir="rtl"] .figma-hero-banner :is(.hero-top-pill-row, .hero-skills-row, .hero-actions-group, .hero-actions-row) {
  direction: rtl !important;
  justify-content: flex-start !important;
}

[dir="rtl"] .figma-hero-banner :is(.hero-title-arabic, .hero-subtitle-arabic) {
  direction: rtl !important;
  text-align: right !important;
}

/* RTL Backdrop: Student on Left, Fade to Right */
[dir="rtl"] .figma-hero-banner .hero-student-backdrop,
html[dir="rtl"] .figma-hero-banner .hero-student-backdrop,
html:not([dir]) .figma-hero-banner .hero-student-backdrop {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: 480px !important;
  max-width: 50% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  mask-image: linear-gradient(to right, #000 35%, transparent 100%) !important;
  -webkit-mask-image: linear-gradient(to right, #000 35%, transparent 100%) !important;
}

[dir="rtl"] .figma-hero-banner .hero-student-backdrop-img,
html[dir="rtl"] .figma-hero-banner .hero-student-backdrop-img,
html:not([dir]) .figma-hero-banner .hero-student-backdrop-img {
  height: 100% !important;
  width: auto !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: left bottom !important;
  filter: drop-shadow(0 14px 35px rgba(0, 0, 0, 0.45)) !important;
  mask-image: linear-gradient(to right, #000 62%, transparent 96%) !important;
  -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 96%) !important;
}

/* ─── Directional Layout: LTR (English) ─── */
[dir="ltr"] .figma-hero-banner,
html[dir="ltr"] .figma-hero-banner {
  direction: ltr !important;
  text-align: left !important;
}

[dir="ltr"] .figma-hero-banner :is(.hero-text-side, .hero-content-wrap),
html[dir="ltr"] .figma-hero-banner :is(.hero-text-side, .hero-content-wrap) {
  direction: ltr !important;
  text-align: left !important;
  margin-inline-start: 0 !important;
  margin-inline-end: auto !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  max-width: 55% !important;
}

[dir="ltr"] .figma-hero-banner :is(.hero-top-pill-row, .hero-skills-row, .hero-actions-group, .hero-actions-row) {
  direction: ltr !important;
  justify-content: flex-start !important;
}

[dir="ltr"] .figma-hero-banner :is(.hero-title-arabic, .hero-subtitle-arabic) {
  direction: ltr !important;
  text-align: left !important;
}

/* LTR Backdrop: Student on Right, Fade to Left (Exact 1:1 Parity with demo_teacher_english) */
[dir="ltr"] .figma-hero-banner .hero-student-backdrop,
html[dir="ltr"] .figma-hero-banner .hero-student-backdrop {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 480px !important;
  max-width: 50% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-end !important;
  mask-image: linear-gradient(to left, #000 35%, transparent 100%) !important;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 100%) !important;
}

[dir="ltr"] .figma-hero-banner .hero-student-backdrop-img,
html[dir="ltr"] .figma-hero-banner .hero-student-backdrop-img {
  height: 100% !important;
  width: auto !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: right bottom !important;
  filter: drop-shadow(0 14px 35px rgba(0, 0, 0, 0.45)) !important;
  mask-image: linear-gradient(to left, #000 45%, transparent 95%) !important;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 95%) !important;
}

/* Responsive Protection */
@media (max-width: 960px) {
  .figma-hero-banner .hero-student-backdrop,
  [dir="rtl"] .figma-hero-banner .hero-student-backdrop,
  [dir="ltr"] .figma-hero-banner .hero-student-backdrop {
    opacity: 0.18 !important;
    width: 280px !important;
  }
  .figma-hero-banner :is(.hero-text-side, .hero-content-wrap),
  [dir="rtl"] .figma-hero-banner :is(.hero-text-side, .hero-content-wrap),
  [dir="ltr"] .figma-hero-banner :is(.hero-text-side, .hero-content-wrap) {
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  .figma-hero-banner .hero-student-backdrop,
  [dir="rtl"] .figma-hero-banner .hero-student-backdrop,
  [dir="ltr"] .figma-hero-banner .hero-student-backdrop {
    display: none !important;
  }
}

.hero-brand-mark {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 5px 12px 5px 8px !important;
  backdrop-filter: blur(6px) !important;
}

.hero-brand-icon {
  width: 26px !important;
  height: 26px !important;
  background: linear-gradient(135deg, #00a86b, #34d399) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.4) !important;
  color: #ffffff !important;
  font-size: 0.8rem !important;
}

.hero-brand-name {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  line-height: 1 !important;
}

.hero-role-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(59, 130, 246, 0.16) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(59, 130, 246, 0.32) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  white-space: nowrap !important;
}

.btn-hero-primary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #00a86b 0%, #059669 100%) !important;
  color: #ffffff !important;
  padding: 10px 20px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.35) !important;
  transition: all 0.2s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-hero-primary:hover {
  background: linear-gradient(135deg, #008f5a 0%, #047857 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.45) !important;
  color: #ffffff !important;
}

.btn-hero-secondary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  text-decoration: none !important;
  backdrop-filter: blur(6px) !important;
  transition: all 0.2s ease !important;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .hero-student-graphic {
    max-height: 150px;
  }
}

@media (max-width: 768px) {
  .figma-hero-banner {
    padding: 20px 18px;
  }

  .hero-main-flex {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text-side {
    max-width: 100%;
  }

  .hero-skills-row {
    justify-content: center;
  }

  .hero-actions-group {
    justify-content: center;
  }

  .hero-student-graphic {
    max-height: 130px;
    border-radius: 12px;
  }
}

/* 2. Figma 4 KPI Metric Cards */
.figma-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* KPI Card v2: 1:1 Design Parity */
.kpi-card-v2 {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 74px;
  text-decoration: none;
  direction: rtl;
}

.kpi-card-v2:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.kpi-card-v2 .kpi-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.kpi-card-v2 .badge-blue {
  background: #eff6ff;
  color: #2563eb;
}

.kpi-card-v2 .badge-green {
  background: #ecfdf5;
  color: #059669;
}

.kpi-card-v2 .badge-pink {
  background: #fff1f2;
  color: #e11d48;
}

.kpi-card-v2 .badge-orange {
  background: #fff7ed;
  color: #ea580c;
}

.kpi-card-v2 .kpi-data-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.kpi-card-v2 .kpi-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-family: inherit;
}

.kpi-card-v2 .kpi-caption {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

html[data-theme="dark"] .kpi-card-v2 {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] .kpi-card-v2 .kpi-number {
  color: #f8fafc;
}

html[data-theme="dark"] .kpi-card-v2 .kpi-caption {
  color: #94a3b8;
}

html[data-theme="dark"] .kpi-card-v2 .badge-blue {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

html[data-theme="dark"] .kpi-card-v2 .badge-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

html[data-theme="dark"] .kpi-card-v2 .badge-pink {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
}

html[data-theme="dark"] .kpi-card-v2 .badge-orange {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

@media (max-width: 1024px) {
  .figma-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .figma-kpi-row {
    grid-template-columns: 1fr;
  }
}

.figma-kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
  direction: rtl;
  text-align: right;
}

html[data-theme="dark"] .figma-kpi-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: #334155;
}

.figma-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.kpi-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.badge-emerald {
  background: #d1fae5;
  color: #047857;
}

.badge-amber {
  background: #fef3c7;
  color: #b45309;
}

.dot-orange {
  color: #f59e0b;
  margin-right: 2px;
  margin-left: 0;
}

.kpi-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.box-blue-soft {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.box-purple-soft {
  background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
}

.box-emerald-soft {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.box-amber-soft {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.kpi-card-body {
  display: flex;
  flex-direction: column;
}

.kpi-title-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 4px;
}

.kpi-main-val {
  font-size: 1.9rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

html[data-theme="dark"] .kpi-main-val {
  color: #f8fafc;
}

.kpi-sub-text {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 6px;
}

.text-emerald {
  color: #10b981 !important;
  font-weight: 800;
}

.badge-emerald-solid {
  background: #ecfdf5;
  color: #059669;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 6px;
}

/* 3. Figma Dual Grid Layout */
.figma-dual-grid {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .figma-dual-grid {
    flex-direction: column;
  }
}

.figma-right-column,
.figma-left-column {
  min-width: 0;
}

.figma-right-column {
  flex: 65;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.figma-left-column {
  flex: 35;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Common Section Block Styling */
.figma-section-block,
.figma-side-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  direction: rtl;
  text-align: right;
}

html[data-theme="dark"] .figma-section-block,
html[data-theme="dark"] .figma-side-card {
  background: #1e293b;
  border-color: #334155;
}

.block-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.block-top-header h2 {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-card-head h2 {
  font-size: 0.96rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
}

html[data-theme="dark"] .block-top-header h2,
html[data-theme="dark"] .side-card-head h2 {
  color: #f8fafc;
}

.block-link-more {
  font-size: 0.85rem;
  font-weight: 800;
  color: #10b981;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.block-link-more:hover {
  opacity: 0.8;
}

/* Active Classes 2x2 Grid */
.active-classes-2x2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .active-classes-2x2-grid {
    grid-template-columns: 1fr;
  }
}

.figma-class-item-card {
  background: linear-gradient(180deg, rgba(248, 250, 252, 1) 0%, rgba(255, 255, 255, 1) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.02);
}

html[data-theme="dark"] .figma-class-item-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(15, 23, 42, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.figma-class-item-card:hover {
  border-color: rgba(16, 185, 129, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.08);
}

.location-pill,
.class-tag-location {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 8px;
  align-self: flex-start;
}

html[data-theme="dark"] .location-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.class-title-group h3 {
  font-size: 0.98rem;
  font-weight: 900;
  color: #0f172a;
  margin: 6px 0 2px 0;
}

html[data-theme="dark"] .class-title-group h3 {
  color: #f8fafc;
}

.subject-name-text {
  font-size: 0.8rem;
  font-weight: 700;
}

.color-emerald {
  color: #10b981;
}

.color-blue {
  color: #3b82f6;
}

.color-amber {
  color: #f59e0b;
}

.class-item-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
}

.perf-text {
  font-weight: 800;
  color: #0f172a;
}

html[data-theme="dark"] .perf-text {
  color: #f8fafc;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

html[data-theme="dark"] .progress-bar-bg {
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill-emerald {
  height: 100%;
  background: #10b981;
  border-radius: 10px;
}

.progress-fill-blue {
  height: 100%;
  background: #3b82f6;
  border-radius: 10px;
}

.progress-fill-amber {
  height: 100%;
  background: #f59e0b;
  border-radius: 10px;
}

.completion-subtext {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Tasks & Weekly Plans */
.tasks-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-row-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 1) 0%, rgba(255, 255, 255, 1) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

html[data-theme="dark"] .task-row-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(15, 23, 42, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.task-row-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.task-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #10b981;
  cursor: pointer;
}

.task-main-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-main-details h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

html[data-theme="dark"] .task-main-details h4 {
  color: #f8fafc;
}

.completed-task-title {
  text-decoration: line-through;
  color: #94a3b8 !important;
}

.task-meta-sub {
  font-size: 0.78rem;
  color: #64748b;
}

.due-date-text {
  font-size: 0.72rem;
  color: #94a3b8;
}

.task-status-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

.badge-amber-light {
  background: #fef3c7;
  color: #b45309;
}

.badge-emerald-light {
  background: #d1fae5;
  color: #047857;
}

.badge-rose-light {
  background: #ffe4e6;
  color: #be123c;
}

.badge-blue-light {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Activity & Updates Section */
.activity-filter-tabs {
  display: flex;
  gap: 6px;
}

.tab-pill {
  background: #f1f5f9;
  border: none;
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

html[data-theme="dark"] .tab-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.tab-pill.active {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .tab-pill.active {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #ffffff;
}

.activity-alert-box {
  background: linear-gradient(180deg, rgba(248, 250, 252, 1) 0%, rgba(255, 255, 255, 1) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

html[data-theme="dark"] .activity-alert-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.alert-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.alert-head-row strong {
  color: #0f172a;
  font-weight: 900;
}

html[data-theme="dark"] .alert-head-row strong {
  color: #f8fafc;
}

.alert-head-row time {
  font-size: 0.72rem;
  color: #94a3b8;
}

.alert-description-text {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

.btn-view-student-profile {
  font-size: 0.8rem;
  font-weight: 800;
  color: #10b981;
  text-decoration: underline;
  white-space: nowrap;
}

/* Left Column: Daily Schedule Timeline */
.side-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.side-card-title-wrap .head-left-icon,
.side-card-head .head-left-icon {
  font-size: 1.1rem;
  margin-left: 4px;
  line-height: 1;
}

.today-tag-pill {
  background: #d1fae5;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.daily-schedule-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-slot-item {
  background: linear-gradient(180deg, rgba(248, 250, 252, 1) 0%, rgba(255, 255, 255, 1) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] .schedule-slot-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(15, 23, 42, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.schedule-slot-item:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.35);
}

.active-now-slot {
  background: linear-gradient(180deg, rgba(236, 253, 245, 1) 0%, rgba(240, 253, 250, 1) 100%) !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

html[data-theme="dark"] .active-now-slot {
  background: rgba(16, 185, 129, 0.12) !important;
}

.slot-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.slot-number {
  font-size: 0.69rem;
  color: #64748b;
  white-space: nowrap;
}

.active-badge-line {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.active-now-pill {
  background: #10b981;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.slot-class-title {
  font-size: 0.88rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
}

html[data-theme="dark"] .slot-class-title {
  color: #f8fafc;
}

.slot-subject-name {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
}

.room-pill-tag {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

html[data-theme="dark"] .room-pill-tag {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.tag-emerald {
  background: #10b981 !important;
  color: #ffffff !important;
}

/* Quick Actions Grid */
.quick-actions-2x2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-act-btn {
  background: linear-gradient(180deg, rgba(248, 250, 252, 1) 0%, rgba(255, 255, 255, 1) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #334155;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
}

html[data-theme="dark"] .quick-act-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(15, 23, 42, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.quick-act-btn:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.22);
}

/* ==========================================================================
   Figma Sidebar & Luxurious Silver Scrollbar (عمود الإزاحة الفضي الفاخر)
   ========================================================================== */

/* Luxurious Silver Scrollbar for Sidebar */
.app-sidebar,
.figma-sidebar,
.sidebar-nav,
.figma-sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.app-sidebar::-webkit-scrollbar,
.figma-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.figma-sidebar-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.app-sidebar::-webkit-scrollbar-track,
.figma-sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track,
.figma-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.app-sidebar::-webkit-scrollbar-thumb,
.figma-sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb,
.figma-sidebar-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 50%, #94a3b8 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 6px rgba(203, 213, 225, 0.35);
  transition: all 0.25s ease;
}

.app-sidebar::-webkit-scrollbar-thumb:hover,
.figma-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover,
.figma-sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #cbd5e1 0%, #ffffff 50%, #cbd5e1 100%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ══════════════════════════════════════════════════════════════════════════
   FIGMA LUXURY SILVER SCROLLBAR TRACK & THUMB (عمود الإزاحة الفضي الفاخر)
   1:1 Match with Figma 1.png and 2.png on the sidebar boundary
   ══════════════════════════════════════════════════════════════════════════ */

/* Hide native scrollbars on figma-sidebar-scroll so they do not conflict with the luxury silver scrollbar */
.sidebar-nav.figma-sidebar-scroll {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.sidebar-nav.figma-sidebar-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.figma-silver-scrollbar-track {
  position: absolute !important;
  top: 72px;
  bottom: 84px;
  width: 14px !important;
  z-index: 250 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transition: opacity 0.25s ease !important;
}

.figma-silver-scrollbar-track.is-visible {
  opacity: 1 !important;
}

/* In RTL: Left edge of sidebar facing main content */
html[dir="rtl"] .figma-silver-scrollbar-track,
html:not([dir="ltr"]) .figma-silver-scrollbar-track {
  left: 2px !important;
  right: auto !important;
}

/* In LTR: Right edge of sidebar */
html[dir="ltr"] .figma-silver-scrollbar-track {
  right: 2px !important;
  left: auto !important;
}

.figma-silver-scrollbar-thumb {
  position: absolute !important;
  top: 0;
  left: 4px;
  width: 6px !important;
  min-height: 36px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 50%, #94a3b8 100%) !important;
  box-shadow: 0 0 6px rgba(203, 213, 225, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  cursor: grab !important;
  touch-action: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, width 0.15s ease !important;
}

.figma-silver-scrollbar-thumb:hover,
.figma-silver-scrollbar-thumb.is-active {
  background: linear-gradient(180deg, #cbd5e1 0%, #ffffff 50%, #cbd5e1 100%) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  width: 7px !important;
  left: 3px !important;
}

.figma-silver-scrollbar-thumb:active,
.figma-silver-scrollbar-thumb.is-active {
  cursor: grabbing !important;
}

/* Hide when sidebar is collapsed */
.app-sidebar.collapsed .figma-silver-scrollbar-track {
  display: none !important;
}

/* Sidebar Branding & Emerald Subtitle */
.brand-sub-emerald {
  color: #00d284 !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
}

.figma-logo-mark {
  background: #00d284 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 210, 132, 0.3) !important;
}

/* Red Circle Notification Badge for Risk Monitoring */
.badge-rose-circle {
  background: #be123c !important;
  color: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: auto !important;
}

html[dir="ltr"] .badge-rose-circle {
  margin-right: 0 !important;
  margin-left: auto !important;
}

/* User Avatar & Subtext in Sidebar Footer */
.figma-avatar-teal {
  background: linear-gradient(135deg, #059669 0%, #00d284 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  box-shadow: 0 2px 8px rgba(0, 210, 132, 0.3) !important;
}

.role-subtext {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
}

/* ==========================================================================
   Weekly School Calendar Widget (التقويم المدرسي الأسبوعي)
   ========================================================================== */

.calendar-month-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

html[data-theme="dark"] .calendar-month-sub {
  color: #94a3b8;
}

.weekly-calendar-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-day-pill {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
}

html[data-theme="dark"] .calendar-day-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.calendar-day-pill .day-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}

html[data-theme="dark"] .calendar-day-pill .day-name {
  color: #94a3b8;
}

.calendar-day-pill .day-num {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

html[data-theme="dark"] .calendar-day-pill .day-num {
  color: #f8fafc;
}

.calendar-day-pill:hover {
  border-color: #10b981;
  transform: translateY(-2px);
}

/* Active Day Selected Pill */
.active-day-pill {
  background: #0f172a !important;
  border-color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

html[data-theme="dark"] .active-day-pill {
  background: #10b981 !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.active-day-pill .day-name {
  color: #94a3b8 !important;
}

html[dir="ltr"] .sidebar-link,
html[dir="ltr"] .sidebar-label,
html[dir="ltr"] .sidebar-user-btn,
html[dir="ltr"] .sidebar-user-info,
html[dir="ltr"] .gradebook-page,
html[dir="ltr"] .gradebook-page-header,
html[dir="ltr"] .gradebook-class-picker,
html[dir="ltr"] .gradebook-table-card,
html[dir="ltr"] .gradebook-table,
html[dir="ltr"] .reports-page,
html[dir="ltr"] .output-page {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .gradebook-header-actions,
html[dir="ltr"] .gradebook-class-chips,
html[dir="ltr"] .gradebook-search,
html[dir="ltr"] .hero-actions,
html[dir="ltr"] .reports-header-actions,
html[dir="ltr"] .action-cluster,
html[dir="ltr"] .inline-actions {
  direction: ltr;
}

html[dir="ltr"] .gradebook-table th,
html[dir="ltr"] .gradebook-table td,
html[dir="ltr"] .output-page .data-table th,
html[dir="ltr"] .output-page .data-table td,
html[dir="ltr"] .reports-page table th,
html[dir="ltr"] .reports-page table td {
  text-align: left;
}

html[dir="ltr"] body :is(.output-page, .reports-page, .analytics-page, .risk-monitor-page, .yearbook-page, .progress-page, .gradebook-page),
html[dir="ltr"] body :is(.output-page, .reports-page, .analytics-page, .risk-monitor-page, .yearbook-page, .progress-page, .gradebook-page) :is(.page-header, .card, .metric-panel, .summary-card, .table-wrapper, .data-table, .reports-page-header, .analytics-page-header, .risk-record-card, .gradebook-table-card) {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] body :is(.output-page, .reports-page, .analytics-page, .risk-monitor-page, .yearbook-page, .progress-page, .gradebook-page) :is(h1, h2, h3, h4, h5, h6, p, label, th, td, .eyebrow, .muted-text) {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] body :is(.output-page, .reports-page, .analytics-page, .risk-monitor-page, .yearbook-page, .progress-page, .gradebook-page),
html[dir="rtl"] body :is(.output-page, .reports-page, .analytics-page, .risk-monitor-page, .yearbook-page, .progress-page, .gradebook-page) :is(.page-header, .card, .metric-panel, .summary-card, .table-wrapper, .data-table, .reports-page-header, .analytics-page-header, .risk-record-card, .gradebook-table-card) {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body :is(.output-page, .reports-page, .analytics-page, .risk-monitor-page, .yearbook-page, .progress-page, .gradebook-page) :is(h1, h2, h3, h4, h5, h6, p, label, th, td, .eyebrow, .muted-text) {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body :is(canvas, .chart-container, .score-input, input[type="number"], .student-cell small),
html[dir="rtl"] body :is(canvas, .chart-container, .score-input, input[type="number"], .student-cell small) {
  direction: ltr;
  unicode-bidi: plaintext;
}

@media (max-width: 1180px) {

  header.topbar,
  .edunext-topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }

  .topbar-start {
    order: 2;
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
    justify-content: center;
  }

  .topbar-actions,
  .edunext-topbar-actions {
    order: 1;
    min-width: 0;
    margin-inline-start: auto;
  }

  .edunext-global-search {
    flex: 1 1 320px;
    min-width: 220px;
  }
}

@media (max-width: 760px) {
  .topbar-brand-badge {
    display: none;
  }

  .topbar-actions,
  .edunext-topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .edunext-global-search {
    flex-basis: 100%;
  }

  .edunext-user-profile-chip {
    max-width: min(100%, 290px);
  }

  .user-chip-meta {
    min-width: 0;
    overflow: hidden;
  }

  .user-chip-meta strong,
  .user-chip-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.output-page,
.reports-page,
.analytics-page,
.risk-monitor-page,
.yearbook-page,
.progress-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  direction: rtl;
  text-align: right;
}

.output-page>.page-header,
.output-page>.analytics-page-header,
.reports-page>.reports-page-header,
.output-page>.risk-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  margin: 0;
  padding: 22px 28px;
  border: 1px solid #dfe7f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(20, 45, 76, 0.06);
  direction: rtl;
  text-align: right;
}

.output-page>.page-header h1,
.reports-page-header h1,
.analytics-page-header h1 {
  color: #0f1d35;
  font-size: 1.55rem;
  font-weight: 900;
}

.output-page>.page-header p,
.reports-page-header p,
.analytics-page-header p,
.output-page .eyebrow {
  color: #8a9bb2;
  font-size: 0.8rem;
}

.hero-actions,
.reports-header-actions,
.action-cluster,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  direction: rtl;
}

.output-page>.card,
.output-page>section.card,
.output-page>.metric-panel,
.reports-page>section,
.reports-page .academic-report-card,
.analytics-page>.card,
.yearbook-page>.card {
  border: 1px solid #dfe7f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(20, 45, 76, 0.05);
  direction: rtl;
  text-align: right;
}

.output-page .card-header-row,
.reports-page .academic-report-header {
  direction: rtl;
  text-align: right;
}

.output-page .data-table,
.reports-page table,
.analytics-page .data-table,
.yearbook-page .data-table {
  direction: rtl;
  text-align: right;
}

.output-page .data-table th,
.reports-page table th,
.analytics-page .data-table th,
.yearbook-page .data-table th {
  text-align: right;
  background: #f6f9fc;
  color: #203753;
}

.output-page .data-table td,
.reports-page table td,
.analytics-page .data-table td,
.yearbook-page .data-table td {
  text-align: right;
  color: #334b68;
}

/* ==========================================================================
   Figma Baseline UI Helper Architecture (Attendance, Banner, Badges & Cards)
   ========================================================================== */
.btn-attendance-present {
  background: #10b981 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.btn-attendance-present:hover {
  background: #059669 !important;
}

.btn-attendance-late {
  background: #f59e0b !important;
  color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.btn-attendance-late:hover {
  background: #d97706 !important;
}

.btn-attendance-absent {
  background: #f43f5e !important;
  color: #ffffff !important;
  border: 1px solid #e11d48 !important;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3) !important;
}

.btn-attendance-absent:hover {
  background: #e11d48 !important;
}

.btn-attendance-default {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.btn-attendance-default:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Class Details Institutional Hero Banner */
.class-details-hero-banner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 24px 28px !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}

.class-details-stat-box {
  text-align: center;
  padding: 0 16px;
}

.class-details-stat-box strong {
  font-size: 1.8rem;
  font-weight: 900;
  display: block;
  line-height: 1.1;
}

.class-details-stat-box span {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

/* Risk Level Badges */
.risk-badge-high {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
}

.risk-badge-medium {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
}

.risk-badge-low {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
}

/* Student Cases Category Cards & Badges */
.case-badge-health {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
}

.case-badge-behavioral {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.case-badge-academic {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}

/* Executive Report Cards */
.executive-report-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.executive-report-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .output-page>.page-header,
html[data-theme="dark"] .output-page>.analytics-page-header,
html[data-theme="dark"] .reports-page>.reports-page-header,
html[data-theme="dark"] .output-page>.risk-monitor-header,
html[data-theme="dark"] .output-page>.card,
html[data-theme="dark"] .output-page>section.card,
html[data-theme="dark"] .output-page>.metric-panel,
html[data-theme="dark"] .reports-page>section,
html[data-theme="dark"] .reports-page .academic-report-card,
html[data-theme="dark"] .analytics-page>.card,
html[data-theme="dark"] .yearbook-page>.card {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] .output-page>.page-header h1,
html[data-theme="dark"] .reports-page-header h1,
html[data-theme="dark"] .analytics-page-header h1,
html[data-theme="dark"] .output-page .data-table th,
html[data-theme="dark"] .reports-page table th,
html[data-theme="dark"] .analytics-page .data-table th,
html[data-theme="dark"] .yearbook-page .data-table th {
  color: #f8fafc;
}

@media (max-width: 760px) {

  .output-page>.page-header,
  .output-page>.analytics-page-header,
  .reports-page>.reports-page-header,
  .output-page>.risk-monitor-header {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .hero-actions,
  .reports-header-actions {
    justify-content: flex-start;
  }
}

html[data-theme="dark"] .active-day-pill .day-name {
  color: #e2e8f0 !important;
}

.active-day-pill .day-num {
  color: #ffffff !important;
}

/* ==========================================================================
   Executive Command Palette Modal (Ctrl + K) - 1:1 Dark Glass Styling
   ========================================================================== */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.cmd-palette-box {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: scaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  text-align: right;
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.cmd-palette-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  outline: none !important;
  font-family: inherit !important;
  box-shadow: none !important;
  direction: rtl;
  text-align: right;
}

.cmd-palette-input:focus {
  border-color: #00a86b !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15) !important;
  background: #ffffff !important;
}

.cmd-palette-input::placeholder {
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
}

.cmd-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  direction: ltr;
}

.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px 4px;
}

.cmd-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.18s ease;
  background: transparent;
  border: 1px solid transparent;
}

.cmd-palette-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #00a86b;
  transform: translateX(-2px);
}

.cmd-item-shortcut {
  font-size: 0.72rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  direction: ltr;
}

.command-search-empty {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
}

/* ==========================================================================
   Recommendation 1: Skeleton Shimmer Loaders
   ========================================================================== */
.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s infinite;
  border-radius: 8px;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   Recommendation 2: Executive Mobile Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    direction: rtl;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.2s ease;
    flex: 1;
    height: 100%;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: #00a86b;
  }

  .mobile-nav-icon {
    font-size: 1.25rem;
    line-height: 1;
  }

  /* Add padding to body so bottom bar doesn't overlap content */
  body {
    padding-bottom: 74px;
  }
}

/* ==========================================================================
   CLASSBRIDGE MASTER FIGMA DESIGN SYSTEM (1.png - 23.png)
   Pure Institutional Light Architecture with Emerald (#00a86b) Accents
   ========================================================================== */

/* Universal Canvas and Main Viewport */
body,
.app-shell,
.app-main {
  background-color: #f4f6f9 !important;
  color: #0f172a !important;
}

.container,
.container-wide {
  max-width: 1440px !important;
  padding: 24px 28px !important;
  margin: 0 auto !important;
}

/* 1. All Cards & Content Containers (Pure White with Soft Border) */
.card,
.stat-card,
.summary-card,
.figma-card,
.figma-side-card,
.figma-kpi-card,
.kpi-card,
.rail-card,
.edunext-card-section,
.eduflow-card,
.portfolio-card,
.case-card,
.detail-card,
.report-card,
.chart-card,
.calendar-card,
.schedule-card,
.task-card,
.settings-section,
.profile-card,
.action-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02) !important;
  color: #0f172a !important;
}

/* Card Headings and Text Overrides */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.stat-card h1,
.stat-card h2,
.stat-card h3,
.figma-card h1,
.figma-card h2,
.figma-card h3,
.figma-side-card h2,
.figma-side-card h3,
.figma-kpi-card strong,
.kpi-card strong,
.section-header-row h2,
.rail-header h3,
.data-table-title,
.box-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.card p,
.card span:not([class*="badge"]),
.card small,
.figma-card p,
.figma-card span:not([class*="badge"]),
.muted-text,
.text-muted,
.sub-text,
.date-sub,
.kpi-info span,
.rail-header small {
  color: #64748b !important;
}

/* 2. Midnight Hero Banner (1.png - 5.png Dashboard) */
.figma-hero-banner,
.eduflow-hero,
.edunext-hero {
  background: linear-gradient(135deg, #0b1329 0%, #172554 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
  padding: 24px 28px !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(11, 19, 41, 0.15) !important;
}

.figma-hero-banner h1,
.eduflow-hero h1,
.edunext-hero h1 {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.figma-hero-banner p,
.eduflow-hero p,
.edunext-hero .hero-subtitle {
  color: #94a3b8 !important;
}

.hero-tag,
.hero-tag-badge {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
}

/* 3. Sleek Compact KPI Cards (1:1 Proportional Architecture) */
.figma-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}

@media (max-width: 1024px) {
  .figma-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 640px) {
  .figma-kpi-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

.figma-kpi-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 5px !important;
  min-height: auto !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.2s ease !important;
}

.figma-kpi-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

.kpi-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.kpi-icon-box {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.kpi-badge {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 1px 7px !important;
  border-radius: 14px !important;
}

.kpi-card-body {
  display: flex !important;
  flex-direction: column !important;
}

.kpi-title-label {
  font-size: 0.75rem !important;
  color: #64748b !important;
  margin-bottom: 1px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.kpi-main-val {
  font-size: 1.28rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1.15 !important;
  margin: 1px 0 !important;
}

.kpi-sub-text {
  font-size: 0.69rem !important;
  margin-top: 1px !important;
  white-space: nowrap !important;
}

.kpi-bottom-pill-wrap {
  margin-top: 2px !important;
}

.badge-emerald-solid {
  background: #10b981 !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
}

/* 4. Active Classes Grid Items */
.figma-class-item-card,
.edunext-class-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.figma-class-item-card:hover,
.edunext-class-card:hover {
  border-color: #cbd5e1 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05) !important;
}

.class-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.class-name-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

/* 5. Schedule & Active Period (1.png) */
.schedule-slot-item,
.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  margin-bottom: 8px;
}

.schedule-slot-item.active-slot,
.timeline-item.active {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  border-inline-start: 4px solid #00a86b !important;
}

.active-slot .slot-period-tag {
  background: #d1fae5 !important;
  color: #065f46 !important;
  font-weight: 800 !important;
}

/* 6. Quick Action Buttons */
.quick-act-btn,
.eduflow-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.15s ease !important;
}

.quick-act-btn:hover,
.eduflow-action-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #00a86b !important;
  transform: translateY(-1px);
}

.quick-act-btn.primary {
  background: #00a86b !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.25) !important;
}

.quick-act-btn.primary:hover {
  background: #008f5a !important;
  color: #ffffff !important;
}

/* 7. Tables & Data Lists */
.table-wrapper,
.data-table-container,
.figma-table-wrap {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

table,
.data-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
}

table th,
.data-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 14px 18px !important;
  text-align: right !important;
  white-space: nowrap;
}

table td,
.data-table td {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 14px 18px !important;
  color: #1e293b !important;
  font-size: 0.88rem !important;
  text-align: right !important;
}

table tbody tr:hover,
.data-table tbody tr:hover {
  background: #f8fafc !important;
}

/* 8. Status Pills & Badges (Matches PNGs 1:1) */
.badge-emerald,
.badge-success,
.badge-recorded,
.badge-active,
.status-active,
.status-excellent {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 0.76rem !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-blue,
.badge-info,
.badge-submitted,
.badge-standard,
.status-submitted {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 0.76rem !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-amber,
.badge-warning,
.badge-pending,
.badge-average,
.status-pending,
.status-average {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 0.76rem !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-rose,
.badge-danger,
.badge-critical,
.badge-risk,
.status-critical,
.status-risk,
.status-late {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 0.76rem !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-purple,
.status-enrolled,
.status-regular {
  background: #ede9fe !important;
  color: #5b21b6 !important;
  border: 1px solid #ddd6fe !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 0.76rem !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 9. Gradebook and Analytics Active Filter Tabs */
.filter-tabs-row,
.class-tabs-row,
.edunext-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 20px;
}

.filter-tab-pill,
.class-tab-pill,
.tab-btn {
  padding: 8px 18px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab-pill:hover,
.class-tab-pill:hover,
.tab-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.filter-tab-pill.active,
.class-tab-pill.active,
.tab-btn.active {
  background: #0b1329 !important;
  color: #ffffff !important;
  border-color: #0b1329 !important;
  font-weight: 700 !important;
}

/* 10. Form Controls & Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 0.88rem !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #00a86b !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15) !important;
}

/* 11. Buttons */
.btn-primary,
.btn-emerald {
  background: #00a86b !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 9px 18px !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.25) !important;
  cursor: pointer;
}

.btn-primary:hover,
.btn-emerald:hover {
  background: #008f5a !important;
  color: #ffffff !important;
}

.btn-secondary,
.btn-white {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 9px 18px !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  cursor: pointer;
}

.btn-secondary:hover,
.btn-white:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* Compact & Small Button Variations — High Specificity Overrides */
.btn-sm,
.btn-small,
.btn.btn-sm,
.btn.btn-small,
.btn-secondary.btn-sm,
.btn-secondary.btn-small,
.btn-primary.btn-sm,
.btn-primary.btn-small,
button.btn-sm,
a.btn-sm,
button.btn-small,
a.btn-small {
  padding: 3px 9px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  line-height: 1.35 !important;
}

/* Any button inside data tables or tables must be compact and elegant */
table .btn,
table .btn-sm,
table .btn-small,
table .btn-secondary,
table .btn-primary,
table a.btn,
.data-table .btn,
.ws-data-table .btn,
.leadership-table .btn,
.data-table a.btn,
.data-table button:not(.btn-primary-large),
.ws-data-table button:not(.btn-primary-large) {
  padding: 3px 9px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  line-height: 1.35 !important;
}

/* Table Action Buttons — Luxury ClassBridge Standard */
.cb-table-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 3px 8px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  background: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.cb-table-btn-edit {
  background: #ecfdf5 !important;
  color: #00a86b !important;
  border: 1px solid #a7f3d0 !important;
}

.cb-table-btn-edit:hover {
  background: #00a86b !important;
  color: #ffffff !important;
  border-color: #00a86b !important;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.25) !important;
}

.cb-table-btn-danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.cb-table-btn-danger:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25) !important;
}

.cb-table-btn-success {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1px solid #bbf7d0 !important;
}

.cb-table-btn-success:hover {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25) !important;
}

/* Footer */
.main-footer {
  background: transparent !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  font-size: 0.78rem !important;
  padding: 20px 28px !important;
  text-align: center;
}

/* ==========================================================================
   Figma Calm Executive Topbar (1:1 with User Reference Image)
   ========================================================================== */
.figma-calm-topbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 32px !important;
  height: auto !important;
  min-height: 68px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 250 !important;
  /* Above sidebar (200) so notification panel renders over it */
  direction: rtl;
}

/* Right side in RTL: Teacher Profile Chip + Action Icons */
.calm-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Teacher Profile Chip */
.calm-profile-details {
  position: relative;
}

.calm-profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: all 0.2s ease;
  background: transparent;
}

.calm-profile-chip::-webkit-details-marker {
  display: none;
}

.calm-profile-chip:hover {
  background: rgba(241, 245, 249, 0.8);
}

.calm-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
  background: #e0f2fe;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.calm-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.calm-avatar-fallback,
.calm-avatar-monogram {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #00a86b 100%);
  color: #ffffff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

.calm-profile-text {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.calm-profile-name {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.calm-profile-role {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
}

.calm-chevron {
  color: #94a3b8;
  margin-inline-start: 4px;
  transition: transform 0.2s ease;
}

.calm-profile-details[open] .calm-chevron {
  transform: rotate(180deg);
}

/* Action Icons Group: Theme, Notifications, Messages */
.calm-icon-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calm-action-btn {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.calm-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.calm-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #f43f5e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 9999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px #ffffff;
}

/* ── Notifications Dropdown Panel (Authentic Institutional Multi-Role) ── */
/* ── Notifications Dropdown Panel (Anchored Enterprise Standard: 360px) ── */
.notif-panel {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: -10px !important;
  left: auto !important;
  transform: none !important;
  z-index: 99999 !important;
  width: 360px !important;
  max-width: calc(100vw - 24px) !important;
  max-height: min(480px, calc(100vh - 85px)) !important;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  animation: notifFlyoutIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

/* Subtle caret/arrow pointing directly to the notification bell */
.notif-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  border-right: 1px solid rgba(226, 232, 240, 0.95);
  transform: rotate(-45deg);
  z-index: 3;
}

@keyframes notifFlyoutIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Invisible click-outside dismiss backdrop overlay (standard enterprise pattern) */
.notif-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 99998;
}

/* Directional positioning rules: opens towards the open center of the workspace, completely away from the sidebar */
html[dir="rtl"] .notif-panel {
  right: -10px !important;
  left: auto !important;
  transform: none !important;
  direction: rtl;
}

html[dir="ltr"] .notif-panel {
  right: -10px !important;
  left: auto !important;
  transform: none !important;
  direction: ltr;
}

@media (max-width: 640px) {

  .notif-panel,
  html[dir="rtl"] .notif-panel,
  html[dir="ltr"] .notif-panel {
    position: fixed !important;
    top: 64px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }

  .notif-panel::before {
    display: none;
  }
}

/* ── Panel Header ── */
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.95);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  gap: 8px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.notif-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.notif-panel-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap !important;
  letter-spacing: -0.01em;
}

.notif-count-pill {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  line-height: 1.3;
  flex-shrink: 0;
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.notif-header-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  padding: 3px 8px;
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.notif-btn-read {
  background: rgba(2, 132, 199, 0.06);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.2);
}

.notif-btn-read:hover {
  background: rgba(2, 132, 199, 0.14);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.notif-btn-clear {
  background: rgba(239, 68, 68, 0.05);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.18);
}

.notif-btn-clear:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.notif-btn-close {
  background: rgba(100, 116, 139, 0.08);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.2);
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.76rem;
}

.notif-btn-close:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  transform: scale(1.08);
}

/* ── Panel Scrollable List (Ultra-Sleek Custom Scrollbar) ── */
.notif-panel-list {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.notif-panel-list::-webkit-scrollbar {
  width: 4px;
}

.notif-panel-list::-webkit-scrollbar-track {
  background: transparent;
}

.notif-panel-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
}

.notif-panel-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* ── Notification Item ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(241, 245, 249, 0.95);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  background: #ffffff;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #f8fafc;
}

/* Unread item subtle glow and accent line */
.notif-item.notif-unread {
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.85) 0%, rgba(248, 250, 252, 0.95) 100%);
}

html[dir="rtl"] .notif-item.notif-unread {
  border-left: none;
  border-right: 3px solid #0284c7;
}

html[dir="ltr"] .notif-item.notif-unread {
  border-right: none;
  border-left: 3px solid #0284c7;
}

.notif-item.notif-unread:hover {
  background: rgba(224, 242, 254, 0.55);
}

/* Notification Item Icon */
.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.86rem;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease;
}

.notif-item:hover .notif-item-icon {
  transform: scale(1.05);
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.notif-sender-role-pill {
  font-size: 0.63rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.notif-item-time {
  font-size: 0.66rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: auto;
}

html[dir="rtl"] .notif-item-time {
  margin-left: 0;
  margin-right: auto;
}

.notif-single-del-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.70rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
  opacity: 0.6;
}

.notif-item:hover .notif-single-del-btn {
  opacity: 1;
}

.notif-single-del-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  transform: scale(1.1);
}

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.notif-item-text {
  font-size: 0.74rem;
  font-weight: 500;
  color: #475569;
  margin: 0 0 5px;
  line-height: 1.45;
}

.notif-sender-credit {
  font-size: 0.67rem;
  font-weight: 700;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(2, 132, 199, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(2, 132, 199, 0.12);
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0284c7;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.22);
}

/* Empty State */
.notif-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  text-align: center;
}

.notif-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  opacity: 0.75;
}

.notif-empty-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px;
}

.notif-empty-sub {
  font-size: 0.74rem;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
  max-width: 250px;
}

/* Panel Footer */
.notif-panel-footer {
  padding: 8px 14px;
  border-top: 1px solid rgba(241, 245, 249, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.notif-view-all-btn {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0284c7;
  text-decoration: none;
  padding: 5px 16px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.22);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notif-view-all-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   DARK THEME: Notifications Panel Luxury Adaptation
   ══════════════════════════════════════════════════════════════════════════ */
html[data-theme="dark"] .notif-panel {
  background: rgba(15, 23, 42, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .notif-panel::before {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .notif-panel-header {
  background: rgba(30, 41, 59, 0.6) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .notif-panel-title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .notif-count-pill {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.4) !important;
}

html[data-theme="dark"] .notif-btn-read {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
}

html[data-theme="dark"] .notif-btn-read:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  color: #7dd3fc !important;
}

html[data-theme="dark"] .notif-btn-clear {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.25) !important;
}

html[data-theme="dark"] .notif-btn-clear:hover {
  background: rgba(244, 63, 94, 0.22) !important;
  color: #fda4af !important;
}

html[data-theme="dark"] .notif-btn-close {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .notif-btn-close:hover {
  background: rgba(244, 63, 94, 0.22) !important;
  color: #fda4af !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

html[data-theme="dark"] .notif-backdrop {
  background: transparent !important;
}

html[data-theme="dark"] .notif-item {
  background: rgba(15, 23, 42, 0.6) !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .notif-item:hover {
  background: rgba(30, 41, 59, 0.6) !important;
}

html[data-theme="dark"] .notif-item.notif-unread {
  background: rgba(14, 165, 233, 0.08) !important;
  border-right-color: #38bdf8 !important;
}

html[data-theme="dark"] .notif-item.notif-unread:hover {
  background: rgba(14, 165, 233, 0.14) !important;
}

html[data-theme="dark"] .notif-item-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .notif-item-text {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .notif-item-time {
  color: #64748b !important;
}

html[data-theme="dark"] .notif-sender-credit {
  background: rgba(56, 189, 248, 0.1) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
}

html[data-theme="dark"] .notif-unread-dot {
  background: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

html[data-theme="dark"] .notif-empty-title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .notif-empty-sub {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .notif-panel-footer {
  background: rgba(30, 41, 59, 0.6) !important;
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .notif-view-all-btn {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

html[data-theme="dark"] .notif-view-all-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  color: #0f172a !important;
}



.calm-timer-btn {
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  font-size: 1.15rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
}

.calm-timer-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  transform: scale(1.05);
}

/* Language Switcher Capsule (1:1 with User Screenshot) */
.topbar-lang-capsule {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  padding: 3px 4px !important;
  gap: 3px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  user-select: none;
}

.lang-capsule-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 16px !important;
  border-radius: 9999px !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  line-height: 1.35 !important;
}

.lang-capsule-item:hover {
  color: #0f172a !important;
}

.lang-capsule-item.active {
  background: #00a86b !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.3) !important;
}

.lang-capsule-item.active svg {
  stroke: #ffffff !important;
}

/* Left side in RTL: Calm Rounded Soft White Glass Pill Search Bar (1:1 with Figma) */
.calm-topbar-left {
  flex: 1;
  max-width: 500px;
  margin-inline-start: 32px;
}

.calm-search-form,
form.calm-search-form,
#topbar-calm-search-form {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 44px !important;
  background: rgba(248, 250, 252, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 9999px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 16px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
}

.calm-search-form:hover,
form.calm-search-form:hover {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(203, 213, 225, 0.95) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.calm-search-form:focus-within,
form.calm-search-form:focus-within {
  background: #ffffff !important;
  border-color: #00a86b !important;
  box-shadow: 0 0 0 3.5px rgba(0, 168, 107, 0.12), 0 3px 12px rgba(0, 0, 0, 0.05) !important;
}

.calm-search-icon-btn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  padding: 0;
  margin-inline-end: 10px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.calm-search-form:focus-within .calm-search-icon-btn {
  color: #00a86b !important;
}

/* Inner input MUST BE 100% transparent with NO border or dark fill */
.calm-search-input,
.calm-search-form input,
.calm-search-form input[type="text"],
form.calm-search-form input.calm-search-input,
form.calm-search-form input[type="text"],
#topbar-calm-search-input {
  flex: 1 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.9rem !important;
  color: #0f172a !important;
  padding: 0 4px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  height: 100% !important;
  line-height: normal !important;
  direction: rtl !important;
  text-align: right !important;
  font-family: inherit !important;
}

.calm-search-input::placeholder,
.calm-search-form input::placeholder,
#topbar-calm-search-input::placeholder {
  color: #94a3b8 !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
}

.profile-dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: 8px;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-width: 200px;
  padding: 8px;
  z-index: 200;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: #00a86b;
}

.dropdown-item.logout-item {
  color: #dc2626;
}

.dropdown-item.logout-item:hover {
  background: #fee2e2;
  color: #991b1b;
}

.dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 6px 0;
}

/* ==========================================================================
   Universal Institutional Light Architecture (ClassBridge 1:1 Unified Theme)
   Applies clean white card, typography, and table styling across ALL platform pages.
   ========================================================================== */
.card,
.lux-card,
.auth-card,
.summary-card,
.metric-panel,
.sidebar-panel,
.stat-card,
.rail-card,
.quote-card,
.recommendation-item,
.reference-item,
.class-summary-card,
.subject-summary-card,
.attendance-summary-card,
.system-setting-card,
.annual-gradebook-card,
.portfolio-card,
.archive-card,
.student-case-card,
.edunext-hero,
.edunext-class-card,
.edunext-tabs {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03) !important;
  color: #0f172a !important;
}

/* Metric / Stat / KPI Card Universal Compact Reset */
.analytics-grid .card,
.figma-kpi-card,
.stat-card,
.summary-card,
.metric-panel,
.school-admin-metric,
.class-details-stat-box {
  padding: 10px 14px !important;
  min-height: auto !important;
  gap: 4px !important;
}

.analytics-grid .card strong,
.figma-kpi-card .kpi-main-val,
.stat-card strong,
.summary-card strong,
.metric-panel strong,
.class-details-stat-box strong {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  margin: 1px 0 !important;
}

.analytics-grid .card span,
.figma-kpi-card .kpi-title-label,
.stat-card span,
.summary-card span,
.metric-panel span,
.class-details-stat-box span {
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

.analytics-grid .card small,
.figma-kpi-card .kpi-sub-text,
.stat-card small,
.summary-card small,
.metric-panel small {
  font-size: 0.68rem !important;
  color: #64748b !important;
}

/* Universal Page Headers & Top Banners */
.page-header,
.output-page>.page-header,
.analytics-page-header,
.reports-page-header,
.progress-top-banner,
.risk-monitor-header,
.gradebook-page-header,
.attendance-page-header,
.archive-page-header,
.settings-page-header,
.search-page-header {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
  color: #0f172a !important;
}

.page-header h1,
.output-page>.page-header h1,
.analytics-page-header h1,
.reports-page-header h1,
.progress-top-banner h1,
.risk-monitor-header h1,
.gradebook-page-header h1,
.edunext-hero h1 {
  color: #0f172a !important;
  text-shadow: none !important;
}

.page-header p,
.output-page>.page-header p,
.analytics-page-header p,
.reports-page-header p,
.progress-top-banner p,
.risk-monitor-header p,
.gradebook-page-header p,
.hero-subtitle {
  color: #64748b !important;
}

/* Universal Tables (ClassBridge Institutional Data Tables) */
.table-wrapper,
.data-table-container,
.output-page .table-wrapper,
.gradebook-table-card,
.risk-record-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  overflow-x: auto !important;
}

table,
.data-table,
.gradebook-table,
.risk-record-table,
.attendance-table {
  background: #ffffff !important;
  color: #0f172a !important;
  border-collapse: collapse !important;
  width: 100% !important;
}

th,
.data-table th,
.table-wrapper th,
.output-page .table-wrapper th,
.gradebook-table th,
.risk-record-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-weight: 700 !important;
  padding: 11px 14px !important;
}

td,
.data-table td,
.table-wrapper td,
.output-page .table-wrapper td,
.gradebook-table td,
.risk-record-table td {
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: transparent !important;
  padding: 11px 14px !important;
}

tr:hover td,
.data-table tbody tr:hover td,
.table-wrapper tbody tr:hover td,
.gradebook-table tbody tr:hover td {
  background: #f8fafc !important;
}

/* Universal Empty States */
.empty-state,
.analytics-empty-state,
.progress-empty-panel,
.class-summary-empty-state,
.output-page .empty-state {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03) !important;
  color: #0f172a !important;
  text-align: center !important;
}

.empty-state h3,
.analytics-empty-state h3,
.progress-empty-panel h3,
.class-summary-empty-state h3 {
  color: #0f172a !important;
  font-weight: 900 !important;
}

.empty-state p,
.analytics-empty-state p,
.progress-empty-panel p,
.class-summary-empty-state p,
.muted-text {
  color: #64748b !important;
}

/* Universal Form Controls across All Pages */
.form-control,
input[type="text"]:not(.calm-search-input):not(.hero-search-input),
input[type="email"],
input[type="password"],
input[type="search"]:not(.calm-search-input):not(.hero-search-input),
input[type="number"],
input[type="date"],
select,
textarea {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  padding: 9px 14px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.88rem !important;
  transition: all 0.2s ease !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: #00a86b !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15) !important;
  outline: none !important;
}

/* Universal Buttons */
.btn-primary,
.btn-submit,
.action-btn-primary {
  background: #00a86b !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 9px 18px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn-primary:hover,
.btn-submit:hover,
.action-btn-primary:hover {
  background: #008f5a !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.35) !important;
}

.btn-secondary,
.btn-outline,
.action-btn-secondary {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn-secondary:hover,
.btn-outline:hover,
.action-btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px) !important;
}

/* Dark Theme Support for Universal Architecture */
html[data-theme="dark"] :is(.card, .lux-card, .auth-card, .summary-card, .metric-panel, .sidebar-panel,
  .stat-card, .rail-card, .quote-card, .recommendation-item, .reference-item,
  .page-header, .output-page > .page-header, .analytics-page-header, .reports-page-header,
  .progress-top-banner, .risk-monitor-header, .gradebook-page-header,
  .table-wrapper, .empty-state, .analytics-empty-state, .progress-empty-panel,
  .class-summary-empty-state) {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(.page-header h1, .output-page > .page-header h1, .analytics-page-header h1,
  .reports-page-header h1, .progress-top-banner h1, .risk-monitor-header h1,
  .gradebook-page-header h1, .empty-state h3, .analytics-empty-state h3,
  .progress-empty-panel h3, .class-summary-empty-state h3) {
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(.page-header p, .output-page > .page-header p, .analytics-page-header p,
  .reports-page-header p, .progress-top-banner p, .risk-monitor-header p,
  .gradebook-page-header p, .empty-state p, .analytics-empty-state p,
  .progress-empty-panel p, .class-summary-empty-state p, .muted-text) {
  color: #94a3b8 !important;
}

html[data-theme="dark"] :is(th, .data-table th, .table-wrapper th, .output-page .table-wrapper th,
  .gradebook-table th, .risk-record-table th) {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] :is(td, .data-table td, .table-wrapper td, .output-page .table-wrapper td,
  .gradebook-table td, .risk-record-table td) {
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] :is(.form-control, input[type="text"], input[type="email"], input[type="password"],
  input[type="search"], input[type="number"], input[type="date"], select, textarea) {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   Recommendation 3: Official Inspection & Ministry Print Architecture
   Transforms dark glass into pure official letterhead ready for inspection
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm 15mm 15mm 15mm;
  }

  /* Reset layout, backgrounds, and shadows for pure black-on-white paper print */
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Hide interactive, navigational, and non-printable UI */
  .app-sidebar,
  .topbar,
  .main-footer,
  .ai-fab-btn,
  .ai-modal,
  .mobile-bottom-nav,
  .cmd-palette-overlay,
  .hero-actions,
  .hero-actions-group,
  .qs-modal,
  #shortcut-toast,
  .btn,
  button,
  input[type="submit"] {
    display: none !important;
  }

  .app-shell,
  .app-main,
  .container,
  .container-wide {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  /* Ministry / School Letterhead Header */
  .page-header,
  .figma-hero-banner {
    border-bottom: 2px solid #0f172a !important;
    border-radius: 0 !important;
    padding: 0 0 14pt 0 !important;
    margin-bottom: 18pt !important;
  }

  .page-header h1 {
    font-size: 18pt !important;
    font-weight: 900 !important;
    color: #000000 !important;
  }

  /* Cards converted to clean borders */
  .card,
  .lux-card,
  .summary-card {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6pt !important;
    padding: 10pt !important;
    margin-bottom: 14pt !important;
    break-inside: avoid;
  }

  /* Tables in high-contrast official format */
  .table-wrapper {
    border: 1px solid #94a3b8 !important;
    border-radius: 4pt !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  table,
  .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border-bottom: 2px solid #64748b !important;
    padding: 6pt 8pt !important;
    font-size: 9.5pt !important;
  }

  td {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 6pt 8pt !important;
    font-size: 9pt !important;
  }

  /* Status Badges */
  .status-badge {
    border: 1px solid #64748b !important;
    color: #0f172a !important;
    padding: 2pt 6pt !important;
    font-size: 8pt !important;
    border-radius: 4pt !important;
    font-weight: bold !important;
  }

  /* Avoid breaking elements across pages */
  tr,
  .summary-card,
  .info-list>div {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* ==========================================================================
   Figma 1:1 Executive Dashboard Architecture
   Two-column layout, Side Rail, Classes, Continuing Ed, Announcements, Footer
   ========================================================================== */

.dashboard-composite-grid {
  display: grid;
  grid-template-columns: 295px 1fr;
  gap: 20px;
  align-items: start;
  direction: rtl;
  width: 100%;
}

@media (max-width: 1100px) {
  .dashboard-composite-grid {
    display: flex;
    flex-direction: column;
  }

  .dashboard-main-area {
    order: 1;
    width: 100%;
  }

  .dashboard-side-rail {
    order: 2;
    width: 100%;
  }
}

.dashboard-side-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-main-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* A. Side Quote Card */
.side-quote-card {
  background: linear-gradient(135deg, #fffdf2 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 18px;
  padding: 16px 20px 18px;
  position: relative;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.07);
  text-align: right;
  direction: rtl;
}

.quote-icon-mark {
  font-size: 1.4rem;
  color: #f59e0b;
  margin-bottom: 6px;
  opacity: 0.85;
}

.quote-body {
  font-size: 0.96rem;
  font-weight: 800;
  color: #78350f;
  line-height: 1.5;
  margin: 0 0 8px 0;
  font-family: inherit;
}

.quote-author-name {
  font-size: 0.78rem;
  color: #b45309;
  font-weight: 700;
}

/* B. Side Widget Card General */
.side-widget-card {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  text-align: right;
  direction: rtl;
}

.side-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.side-widget-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-widget-subtitle {
  font-size: 0.70rem;
  color: #94a3b8;
  display: block;
  font-weight: 600;
  margin-top: 1px;
}

.side-widget-link {
  font-size: 0.74rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease;
}

.side-widget-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

/* Timeline in Today's Schedule */
.schedule-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.timeline-slot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 4px 0;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-blue {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.dot-cyan {
  background: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.dot-emerald {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.dot-pink {
  background: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
}

.timeline-slot-info {
  flex: 1;
  min-width: 0;
}

.slot-time {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}

.slot-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.slot-icon-box.box-blue {
  background: #eff6ff;
  color: #2563eb;
}

.slot-icon-box.box-cyan {
  background: #ecfeff;
  color: #0891b2;
}

.slot-icon-box.box-emerald {
  background: #ecfdf5;
  color: #059669;
}

.slot-icon-box.box-pink {
  background: #fff1f2;
  color: #e11d48;
}

/* Upcoming Tasks List */
.upcoming-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upcoming-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
}

.upcoming-task-item:last-child {
  border-bottom: none;
}

.task-date-pill {
  font-size: 0.70rem;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.task-info-wrap {
  flex: 1;
  min-width: 0;
}

.task-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-sub-label {
  font-size: 0.68rem;
  color: #94a3b8;
  display: block;
}

.task-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.task-icon-box.box-blue {
  background: #eff6ff;
  color: #2563eb;
}

.task-icon-box.box-pink {
  background: #fff1f2;
  color: #e11d48;
}

.task-icon-box.box-emerald {
  background: #ecfdf5;
  color: #059669;
}

/* C. Current Classes Section */
.dashboard-classes-section {
  margin-top: 2px;
}

.section-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.section-link-more {
  font-size: 0.78rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.section-link-more:hover {
  text-decoration: underline;
}

.current-classes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .current-classes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .current-classes-grid {
    grid-template-columns: 1fr;
  }
}

.current-class-card {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.current-class-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.class-cover-wrap {
  height: 64px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-theme-design {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}

.cover-theme-ai {
  background: linear-gradient(135deg, #065f46, #10b981);
}

.cover-theme-robot {
  background: linear-gradient(135deg, #0e7490, #06b6d4);
}

.cover-theme-coding {
  background: linear-gradient(135deg, #4c1d95, #8b5cf6);
}

.class-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.class-card-menu-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.70rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.class-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  direction: rtl;
}

.class-grade-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.class-subject-title {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 6px;
}

.class-bottom-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.70rem;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

.class-progress-track {
  height: 4px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.class-progress-fill {
  height: 100%;
  border-radius: 4px;
}

.bar-theme-blue {
  background: #3b82f6;
}

.bar-theme-green {
  background: #10b981;
}

.bar-theme-cyan {
  background: #06b6d4;
}

.bar-theme-purple {
  background: #8b5cf6;
}

/* D. Dual Block: Continuing Education & Announcements */
.dashboard-bottom-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 840px) {
  .dashboard-bottom-dual-grid {
    grid-template-columns: 1fr;
  }
}

.bottom-card-panel {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  text-align: right;
  direction: rtl;
}

.learning-content-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 560px) {
  .learning-content-split {
    grid-template-columns: 1fr;
  }
}

.featured-course-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.featured-course-thumb-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 90px;
  background: #0f172a;
}

.featured-course-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.course-pill-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #38bdf8;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.play-overlay-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.featured-course-thumb-wrap:hover .play-overlay-btn {
  background: rgba(0, 0, 0, 0.35);
}

.featured-course-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  margin: 2px 0 0;
  line-height: 1.3;
}

.featured-course-meta {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.btn-start-course {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 4px;
  transition: background 0.2s ease;
}

.btn-start-course:hover {
  background: #1d4ed8;
}

.learning-modules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-item-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  background: #f8fafc;
  transition: background 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.module-item-card:hover {
  background: #f1f5f9;
}

.module-thumb-wrap {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #1e293b;
}

.module-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
}

.module-info {
  flex: 1;
  min-width: 0;
}

.module-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-duration {
  font-size: 0.65rem;
  color: #64748b;
  display: block;
}

/* Announcements List */
.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcement-item-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.announcement-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.announcement-icon-badge.badge-pink {
  background: #fff1f2;
  color: #e11d48;
}

.announcement-icon-badge.badge-purple {
  background: #faf5ff;
  color: #9333ea;
}

.announcement-icon-badge.badge-blue {
  background: #eff6ff;
  color: #2563eb;
}

.announcement-content {
  flex: 1;
  min-width: 0;
}

.announcement-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.announcement-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.announcement-time-tag {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}

.announcement-snippet {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* E. Institutional Footer Bar */
.dashboard-footer-bar {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  margin-top: 10px;
  direction: rtl;
}

.footer-brand-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.footer-brand-title {
  font-size: 0.90rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.footer-brand-sub {
  font-size: 0.70rem;
  color: #94a3b8;
  font-weight: 600;
}

.footer-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-action-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Dark Mode Overrides for New Architecture */
html[data-theme="dark"] .side-quote-card {
  background: linear-gradient(135deg, #2a200a 0%, #1f1a08 100%);
  border-color: #78350f;
}

html[data-theme="dark"] .side-quote-card .quote-body {
  color: #fef08a;
}

html[data-theme="dark"] .side-quote-card .quote-author-name {
  color: #facc15;
}

html[data-theme="dark"] :is(.side-widget-card,
  .current-class-card,
  .bottom-card-panel,
  .dashboard-footer-bar) {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] :is(.side-widget-title,
  .section-heading,
  .class-grade-name,
  .featured-course-title,
  .module-title,
  .announcement-title,
  .footer-brand-title) {
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(.module-item-card,
  .announcement-item-card,
  .footer-action-pill) {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

/* ==========================================================================
   DASHBOARD LAYOUT FIX v20260906-12
   Override all conflicting rules for the composite dashboard
   ========================================================================== */

/* -- 1. Reset the !important override from line 11165 that breaks banner -- */
.dashboard-main-area .figma-hero-banner {
  background: linear-gradient(135deg, #091224 0%, #0f172a 44%, #172554 100%) !important;
  border-radius: 20px !important;
  padding: 22px 26px !important;
  overflow: hidden !important;
  position: relative !important;
  min-height: 190px !important;
  display: block !important;
}

/* -- 2. Hero flex container: always horizontal -- */
.dashboard-main-area .figma-hero-banner .hero-main-flex {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  position: relative !important;
  z-index: 2 !important;
  min-height: 160px !important;
}

/* -- 3. Text side: controlled width, no overflow -- */
.dashboard-main-area .figma-hero-banner .hero-text-side {
  flex: 1 1 0 !important;
  max-width: 62% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  z-index: 3 !important;
}

/* -- 4. Title: smaller, single line friendly -- */
.dashboard-main-area .figma-hero-banner .hero-title-arabic {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 0 4px 0 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* -- 5. Subtitle -- */
.dashboard-main-area .figma-hero-banner .hero-subtitle-arabic {
  font-size: 0.82rem !important;
  color: rgba(203, 213, 225, 0.92) !important;
  margin: 0 0 12px 0 !important;
}

/* -- 6. Skills row: compact horizontal row -- */
.dashboard-main-area .figma-hero-banner .hero-skills-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  margin: 0 0 14px 0 !important;
}

/* -- 7. Each skill item: compact column icon+label -- */
.dashboard-main-area .figma-hero-banner .hero-skill-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  width: auto !important;
}

/* -- 8. Skill icon box: small square -- */
.dashboard-main-area .figma-hero-banner .hero-skill-item .skill-icon-box {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.88rem !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25) !important;
}

/* -- 9. Skill label text -- */
.dashboard-main-area .figma-hero-banner .hero-skill-item .skill-label {
  font-size: 0.62rem !important;
  color: #cbd5e1 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* -- 10. Action buttons row -- */
.dashboard-main-area .figma-hero-banner .hero-actions-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

/* -- 11. Illustration side: fixed size -- */
.dashboard-main-area .figma-hero-banner .hero-illustration-side {
  flex: 0 0 auto !important;
  width: 150px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dashboard-main-area .figma-hero-banner .hero-student-graphic {
  max-height: 170px !important;
  width: 150px !important;
  object-fit: contain !important;
  filter: drop-shadow(-6px 4px 14px rgba(0, 0, 0, 0.35)) !important;
}

/* -- 12. Term badge -- */
.dashboard-main-area .figma-hero-banner .hero-term-badge {
  font-size: 0.72rem !important;
  padding: 3px 12px !important;
}

/* -- 13. KPI cards row: 4 columns, compact -- */
.dashboard-main-area .figma-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}

/* -- 14. KPI card v2: compact size -- */
.kpi-card-v2 {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  direction: rtl;
  text-align: right;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card-v2:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.kpi-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.kpi-badge-icon.badge-blue {
  background: #eff6ff;
  color: #2563eb;
}

.kpi-badge-icon.badge-green {
  background: #ecfdf5;
  color: #059669;
}

.kpi-badge-icon.badge-pink {
  background: #fff1f2;
  color: #e11d48;
}

.kpi-badge-icon.badge-orange {
  background: #fff7ed;
  color: #ea580c;
}

.kpi-data-group {
  flex: 1;
  min-width: 0;
}

.kpi-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 2px;
}

.kpi-caption {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
}

/* -- 15. figma-dashboard-wrapper: clean layout, keep gap -- */
.figma-dashboard-wrapper {
  padding: 4px 0 16px !important;
  gap: 16px !important;
}

/* -- 16. Responsive fixes -- */
@media (max-width: 1200px) {
  .dashboard-composite-grid {
    grid-template-columns: 260px 1fr !important;
  }

  .dashboard-main-area .figma-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .dashboard-composite-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-main-area .figma-hero-banner .hero-title-arabic {
    white-space: normal !important;
    font-size: 1.1rem !important;
  }

  .dashboard-main-area .figma-hero-banner .hero-illustration-side {
    display: none !important;
  }

  .dashboard-main-area .figma-hero-banner .hero-text-side {
    max-width: 100% !important;
  }
}

/* ==========================================================================
   EXACT 1:1 REFERENCE DASHBOARD REBUILD (v20260906-14)
   Matches media_1788666907934.png down to the pixel
   ========================================================================== */

/* Overall container */
.figma-dashboard-wrapper {
  padding: 6px 2px 20px !important;
  direction: rtl !important;
  text-align: right !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

/* Two-column layout */
.dashboard-composite-grid {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 16px !important;
  align-items: start !important;
  direction: rtl !important;
  width: 100% !important;
}

.dashboard-side-rail {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.dashboard-main-area {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  min-width: 0 !important;
}

/* 1. Hero Banner */
.dashboard-hero-banner-wrap {
  width: 100% !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08) !important;
  background: #0f172a !important;
  line-height: 0 !important;
}

.dashboard-hero-banner-image {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 16px !important;
  object-fit: cover !important;
}

/* 2. 4 KPI Cards */
.figma-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 0 !important;
  direction: rtl !important;
}

.kpi-card-v2 {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  direction: rtl !important;
  text-align: right !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.kpi-card-v2:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07) !important;
}

.kpi-card-v2 .kpi-data-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.kpi-card-v2 .kpi-number {
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  font-family: inherit !important;
}

.kpi-card-v2 .kpi-caption {
  font-size: 0.74rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.kpi-card-v2 .kpi-badge-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.kpi-card-v2 .badge-blue {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.kpi-card-v2 .badge-green {
  background: #ecfdf5 !important;
  color: #059669 !important;
}

.kpi-card-v2 .badge-pink {
  background: #fff1f2 !important;
  color: #e11d48 !important;
}

.kpi-card-v2 .badge-orange {
  background: #fff7ed !important;
  color: #ea580c !important;
}

/* 3. Current Classes */
.dashboard-classes-section {
  margin-top: 0 !important;
}

.section-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
}

.section-heading {
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.section-link-more {
  font-size: 0.74rem !important;
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.current-classes-wrapper-rel {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.current-classes-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
}

.classes-carousel-nav-btn {
  position: absolute !important;
  left: -12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #475569 !important;
  font-size: 0.70rem !important;
  cursor: pointer !important;
  z-index: 5 !important;
}

.current-class-card {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  text-decoration: none !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.current-class-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07) !important;
}

.class-cover-wrap {
  height: 68px !important;
  position: relative !important;
  overflow: hidden !important;
  background: #0f172a !important;
}

.class-cover-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.class-card-menu-btn {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border: none !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.65rem !important;
  backdrop-filter: blur(4px) !important;
  cursor: pointer !important;
}

.class-card-body {
  padding: 8px 12px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: right !important;
  direction: rtl !important;
}

.class-grade-name {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.class-subject-title {
  font-size: 0.70rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  margin: 1px 0 5px !important;
}

.class-bottom-stats {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 0.68rem !important;
  color: #64748b !important;
  font-weight: 700 !important;
  margin-bottom: 3px !important;
}

.class-progress-track {
  height: 4px !important;
  background: #f1f5f9 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.class-progress-fill {
  height: 100% !important;
  border-radius: 4px !important;
}

.bar-theme-blue {
  background: #2563eb !important;
}

.bar-theme-green {
  background: #10b981 !important;
}

.bar-theme-cyan {
  background: #06b6d4 !important;
}

.bar-theme-purple {
  background: #8b5cf6 !important;
}

/* 4. Bottom Dual Grid */
.dashboard-bottom-dual-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  direction: rtl !important;
}

.bottom-card-panel {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  text-align: right !important;
  direction: rtl !important;
}

.learning-content-split {
  display: grid !important;
  grid-template-columns: 1.1fr 1fr !important;
  gap: 10px !important;
  align-items: start !important;
}

.featured-course-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.featured-course-thumb-wrap {
  height: 80px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  position: relative !important;
  background: #0f172a !important;
}

.featured-course-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.course-pill-tag {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  color: #38bdf8 !important;
  font-size: 0.60rem !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

.play-overlay-btn {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  background: rgba(0, 0, 0, 0.25) !important;
}

.featured-course-title {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 3px 0 1px !important;
  line-height: 1.25 !important;
}

.featured-course-meta {
  font-size: 0.65rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

.btn-start-course {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  margin-top: 3px !important;
  width: 100% !important;
  text-align: center !important;
}

.learning-modules-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.module-item-card {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  text-decoration: none !important;
}

.module-thumb-wrap {
  width: 42px !important;
  height: 28px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
  background: #1e293b !important;
}

.module-thumb-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.mini-play-icon {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 0.55rem !important;
  background: rgba(0, 0, 0, 0.25) !important;
}

.module-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.module-title {
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.module-duration {
  font-size: 0.60rem !important;
  color: #64748b !important;
  display: block !important;
}

/* Announcements */
.announcements-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}

.announcement-item-card {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
}

.announcement-icon-badge {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.82rem !important;
  flex-shrink: 0 !important;
}

.announcement-icon-badge.badge-pink {
  background: #fff1f2 !important;
  color: #e11d48 !important;
}

.announcement-icon-badge.badge-purple {
  background: #faf5ff !important;
  color: #9333ea !important;
}

.announcement-icon-badge.badge-blue {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.announcement-content {
  flex: 1 !important;
  min-width: 0 !important;
}

.announcement-head-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
}

.announcement-title {
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.announcement-time-tag {
  font-size: 0.62rem !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
}

.announcement-snippet {
  font-size: 0.68rem !important;
  color: #64748b !important;
  margin: 2px 0 0 !important;
  line-height: 1.3 !important;
}

/* 5. Side Rail */
.side-quote-card {
  background: linear-gradient(135deg, #fffcf0 0%, #fef3c7 100%) !important;
  border: 1px solid #fef08a !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  position: relative !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.05) !important;
  text-align: right !important;
  direction: rtl !important;
}

.quote-mark-icon {
  margin-bottom: 4px !important;
  line-height: 1 !important;
}

.quote-body {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  line-height: 1.45 !important;
  margin: 0 0 6px 0 !important;
  font-family: inherit !important;
}

.quote-author-name {
  font-size: 0.72rem !important;
  color: #64748b !important;
  font-weight: 700 !important;
}

.side-widget-card {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  text-align: right !important;
  direction: rtl !important;
}

.side-widget-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #f8fafc !important;
}

.side-widget-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.side-widget-subtitle {
  font-size: 0.65rem !important;
  color: #94a3b8 !important;
  display: block !important;
  font-weight: 600 !important;
}

.side-widget-link {
  font-size: 0.70rem !important;
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.schedule-timeline-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.timeline-slot-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 3px 0 !important;
}

.timeline-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

.timeline-slot-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.slot-time {
  font-size: 0.65rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  display: block !important;
  line-height: 1.1 !important;
}

.slot-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 1px 0 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.slot-icon-box {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.78rem !important;
  flex-shrink: 0 !important;
}

.upcoming-tasks-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}

.upcoming-task-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 0 !important;
  border-bottom: 1px solid #f8fafc !important;
}

.task-date-pill {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1f5f9 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  min-width: 32px !important;
}

.task-date-day {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1 !important;
}

.task-date-month {
  font-size: 0.58rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

.task-info-wrap {
  flex: 1 !important;
  min-width: 0 !important;
}

.task-name {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.task-sub-label {
  font-size: 0.62rem !important;
  color: #94a3b8 !important;
  display: block !important;
}

.task-icon-box {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.78rem !important;
  flex-shrink: 0 !important;
}

/* 6. Institutional Footer Bar */
.dashboard-footer-bar {
  background: #ffffff !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 14px !important;
  padding: 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02) !important;
  margin-top: 4px !important;
  direction: rtl !important;
}

.footer-brand-side {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.footer-map-img {
  height: 26px !important;
  width: auto !important;
  object-fit: contain !important;
  opacity: 0.5 !important;
}

.footer-brand-title {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.footer-brand-sub {
  font-size: 0.64rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  display: block !important;
}

.footer-quick-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.footer-action-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.footer-action-pill:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .dashboard-composite-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   TEACHER QUICK ACTIONS & MINI CALENDAR STYLES (v20260906-15)
   ========================================================================== */

/* -- 1. Mini Calendar Widget in Side Rail -- */
.mini-calendar-widget {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  text-align: right !important;
  direction: rtl !important;
}

.mini-calendar-widget .side-widget-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #f8fafc !important;
  flex-wrap: nowrap !important;
}

.mini-calendar-widget .side-widget-head>div:first-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

.mini-calendar-widget .side-widget-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  line-height: 1.3 !important;
}

.mini-calendar-widget .side-widget-title i {
  flex-shrink: 0 !important;
  font-size: 0.95rem !important;
}

.mini-calendar-widget .side-widget-subtitle {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  display: block !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 1px !important;
}

.mini-calendar-widget .side-widget-link {
  font-size: 0.70rem !important;
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 3px 8px !important;
  border-radius: 9999px !important;
  background: rgba(37, 99, 235, 0.08) !important;
  transition: all 0.2s ease !important;
}

.mini-calendar-widget .side-widget-link:hover {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #1d4ed8 !important;
}

.calendar-month-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin-top: 4px !important;
}

.cal-weekdays {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  text-align: center !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  padding-bottom: 4px !important;
  border-bottom: 1px solid #f8fafc !important;
}

.cal-days-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding-top: 4px !important;
}

.cal-week-row {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 2px !important;
}

.cal-day {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  text-decoration: none !important;
  position: relative !important;
  transition: all 0.15s ease !important;
}

.cal-day:hover:not(.cal-day-empty) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.cal-day-empty {
  visibility: hidden !important;
}

.cal-day-today {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

.cal-day-today:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.cal-event-dot {
  position: absolute !important;
  bottom: 2px !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
}

.cal-event-dot.dot-blue {
  background: #3b82f6 !important;
}

.cal-event-dot.dot-pink {
  background: #f43f5e !important;
}

.cal-event-dot.dot-emerald {
  background: #10b981 !important;
}

.cal-footer-note {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 8px !important;
  padding-top: 6px !important;
  border-top: 1px solid #f8fafc !important;
  font-size: 0.65rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

.cal-today-badge {
  background: #eff6ff !important;
  color: #2563eb !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  font-size: 0.60rem !important;
}

/* -- 2. Teacher Daily Quick Actions Panel -- */
.teacher-quick-actions-panel {
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  text-align: right !important;
  direction: rtl !important;
}

.qa-panel-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.qa-head-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.qa-badge-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important;
}

.qa-title-text {
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.qa-subtitle-text {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

.qa-buttons-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 10px !important;
}

@media (max-width: 1300px) {
  .qa-buttons-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .qa-buttons-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.qa-action-card {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  transition: all 0.2s ease !important;
  position: relative !important;
}

.qa-action-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

.qa-icon-wrap {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
}

.qa-text-wrap {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.qa-action-title {
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.qa-action-desc {
  font-size: 0.62rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.qa-arrow-icon {
  font-size: 0.65rem !important;
  opacity: 0.4 !important;
  transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.qa-action-card:hover .qa-arrow-icon {
  opacity: 0.9 !important;
  transform: translateX(-3px) !important;
}

/* Specific Card Themes */
.qa-card-blue {
  background: #f8faff !important;
  border-color: #e0e7ff !important;
}

.qa-card-blue .qa-icon-wrap {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.qa-card-blue .qa-action-title {
  color: #1e3a8a !important;
}

.qa-card-green {
  background: #f6fdf9 !important;
  border-color: #d1fae5 !important;
}

.qa-card-green .qa-icon-wrap {
  background: #ecfdf5 !important;
  color: #059669 !important;
}

.qa-card-green .qa-action-title {
  color: #064e3b !important;
}

.qa-card-purple {
  background: #faf7ff !important;
  border-color: #ede9fe !important;
}

.qa-card-purple .qa-icon-wrap {
  background: #f5f3ff !important;
  color: #7c3aed !important;
}

.qa-card-purple .qa-action-title {
  color: #4c1d95 !important;
}

.qa-card-orange {
  background: #fffaf5 !important;
  border-color: #ffedd5 !important;
}

.qa-card-orange .qa-icon-wrap {
  background: #fff7ed !important;
  color: #ea580c !important;
}

.qa-card-orange .qa-action-title {
  color: #7c2d12 !important;
}

.qa-card-cyan {
  background: #f6feff !important;
  border-color: #cffafe !important;
}

.qa-card-cyan .qa-icon-wrap {
  background: #ecfeff !important;
  color: #0891b2 !important;
}

.qa-card-cyan .qa-action-title {
  color: #164e63 !important;
}

.qa-card-pink {
  background: #fff8f8 !important;
  border-color: #ffe4e6 !important;
}

.qa-card-pink .qa-icon-wrap {
  background: #fff1f2 !important;
  color: #e11d48 !important;
}

.qa-card-pink .qa-action-title {
  color: #881337 !important;
}

/* -- 3. Quick Action Buttons on Class Cards -- */
.class-card-quick-footer {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 8px !important;
  padding-top: 6px !important;
  border-top: 1px solid #f8fafc !important;
}

.class-pill-act {
  flex: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-size: 0.64rem !important;
  font-weight: 800 !important;
  padding: 3px 6px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.class-pill-act.act-grade {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #dbeafe !important;
}

.class-pill-act.act-grade:hover {
  background: #2563eb !important;
  color: #ffffff !important;
}

.class-pill-act.act-att {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #d1fae5 !important;
}

.class-pill-act.act-att:hover {
  background: #059669 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   BILINGUAL (RTL/LTR), SVG ICONS & COURSERA/UDEMY STYLES (v20260906-16)
   ========================================================================== */

/* -- 1. Crisp SVG Icon Display in KPI Cards -- */
.kpi-card-v2 .kpi-badge-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.kpi-card-v2 .kpi-badge-icon svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
}

/* -- 2. Coursera & Udemy Provider Tags -- */
.panel-badge-head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.provider-pill {
  font-size: 0.60rem !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

.coursera-badge {
  background: #eff6ff !important;
  color: #0056D2 !important;
  border: 1px solid #bfdbfe !important;
}

.udemy-badge {
  background: #faf5ff !important;
  color: #A435F0 !important;
  border: 1px solid #e9d5ff !important;
}

.module-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 2px !important;
}

.module-platform-tag {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
}

.module-platform-tag.tag-coursera {
  background: #eff6ff !important;
  color: #0056D2 !important;
}

.module-platform-tag.tag-udemy {
  background: #faf5ff !important;
  color: #A435F0 !important;
}

/* -- 3. English Hero Banner Styling -- */
.dashboard-en-hero-banner {
  background: linear-gradient(135deg, #091224 0%, #0f172a 50%, #1e293b 100%) !important;
  border-radius: 16px !important;
  padding: 22px 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  color: #ffffff !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 180px !important;
}

.en-banner-text-side {
  flex: 1 !important;
  min-width: 0 !important;
  z-index: 2 !important;
}

.en-hero-title {
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.25 !important;
}

.en-hero-sub {
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
  margin: 0 0 16px 0 !important;
}

.en-hero-skills-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.en-skill-badge {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  color: #e2e8f0 !important;
  font-weight: 700 !important;
}

.en-skill-badge span {
  font-size: 0.9rem !important;
}

.en-banner-img-side {
  position: relative !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.en-student-img {
  height: 140px !important;
  width: auto !important;
  object-fit: contain !important;
  border-radius: 12px !important;
}

.en-motto-tag {
  font-size: 0.70rem !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  font-style: italic !important;
  margin-top: 4px !important;
}

/* -- 4. Full LTR Layout Support (When English is Selected) -- */
html[dir="ltr"] .figma-dashboard-wrapper {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .dashboard-composite-grid {
  grid-template-columns: 1fr 280px !important;
  direction: ltr !important;
}

html[dir="ltr"] .dashboard-side-rail {
  order: 2 !important;
}

html[dir="ltr"] .dashboard-main-area {
  order: 1 !important;
}

html[dir="ltr"] .figma-kpi-row {
  direction: ltr !important;
}

html[dir="ltr"] .kpi-card-v2 {
  direction: ltr !important;
  text-align: left !important;
  flex-direction: row !important;
}

html[dir="ltr"] .teacher-quick-actions-panel {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .dashboard-classes-section {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .current-class-card {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .class-card-body {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .dashboard-bottom-dual-grid {
  direction: ltr !important;
}

html[dir="ltr"] .bottom-card-panel {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .side-quote-card,
html[dir="ltr"] .side-widget-card {
  direction: ltr !important;
  text-align: left !important;
}

html[dir="ltr"] .dashboard-footer-bar {
  direction: ltr !important;
}

html[dir="ltr"] .classes-carousel-nav-btn {
  left: auto !important;
  right: -12px !important;
}

/* -- 5. Full RTL Layout Support (When Arabic is Selected) -- */
html[dir="rtl"] .figma-dashboard-wrapper {
  direction: rtl !important;
  text-align: right !important;
}

html[dir="rtl"] .dashboard-composite-grid {
  grid-template-columns: 280px 1fr !important;
  direction: rtl !important;
}

html[dir="rtl"] .kpi-card-v2 {
  direction: rtl !important;
  text-align: right !important;
}

/* ==========================================================================
   FIX CONTINUOUS LEARNING SPLIT LAYOUT (v20260906-17)
   Matches media_1788669557233.png fix
   ========================================================================== */
.learning-content-split {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr !important;
  gap: 12px !important;
  align-items: stretch !important;
  width: 100% !important;
}

.learning-modules-list,
.featured-course-box {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.featured-course-thumb-wrap {
  width: 100% !important;
  height: 84px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  position: relative !important;
  background: #0f172a !important;
}

.featured-course-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.featured-course-box .course-pill-tag {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  color: #38bdf8 !important;
  font-size: 0.60rem !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}

.featured-course-title {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 4px 0 2px !important;
  line-height: 1.3 !important;
}

.featured-course-meta {
  font-size: 0.65rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.btn-start-course {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 6px 12px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  background: #2563eb !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  margin-top: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

.btn-start-course:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.learning-modules-list {
  gap: 6px !important;
}

.module-item-card {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  text-decoration: none !important;
  min-width: 0 !important;
}

.module-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.module-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ==========================================================================
   CB-UI-REC-1: Figma Visual System Recovery & Design Tokens
   Authoritative Executive Educational Design System
   ========================================================================== */

:root {
  --figma-navy: #0f172a;
  --figma-navy-surface: #1e293b;
  --figma-navy-deep: #090d16;
  --figma-emerald: #00a86b;
  --figma-emerald-hover: #008f5a;
  --figma-emerald-light: #ecfdf5;
  --figma-emerald-soft: #d1fae5;
  --figma-blue: #0284c7;
  --figma-blue-light: #f0f9ff;
  --figma-purple: #7c3aed;
  --figma-danger: #e11d48;
  --figma-warning: #f59e0b;
  --figma-surface-light: #f8fafc;
  --figma-border: #e2e8f0;
  --figma-border-subtle: #f1f5f9;
  --figma-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --figma-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
  --figma-shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* 1. Executive Live Responsive Hero Component */
.figma-live-hero {
  position: relative !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #0b1329 0%, #0f172a 45%, #1e1b4b 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px rgba(11, 19, 41, 0.25) !important;
  color: #ffffff !important;
  padding: 28px 34px !important;
  margin-bottom: 20px !important;
  display: block !important;
  line-height: normal !important;
}

.hero-bg-grid {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0.15 !important;
  pointer-events: none !important;
}

.hero-abstract-bars {
  position: absolute !important;
  bottom: 0 !important;
  inset-inline-end: 36px !important;
  opacity: 0.22 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 10px !important;
  height: 110px !important;
}

.hero-bar {
  width: 14px !important;
  border-radius: 4px 4px 0 0 !important;
  background: linear-gradient(180deg, #34d399 0%, #00a86b 100%) !important;
}

.hero-bar.h-40 {
  height: 40% !important;
}

.hero-bar.h-65 {
  height: 65% !important;
}

.hero-bar.h-90 {
  height: 90% !important;
}

.hero-bar.h-75 {
  height: 75% !important;
}

.hero-bar.h-100 {
  height: 100% !important;
}

.hero-content-wrap {
  position: relative !important;
  z-index: 2 !important;
  max-width: 680px !important;
}

.hero-academic-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 14px !important;
  border-radius: 9999px !important;
  background: rgba(0, 168, 107, 0.18) !important;
  border: 1px solid rgba(0, 168, 107, 0.35) !important;
  color: #6ee7b7 !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  margin-bottom: 12px !important;
}

.hero-academic-pill .pill-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #34d399 !important;
  box-shadow: 0 0 8px #34d399 !important;
}

.hero-main-title {
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
  margin: 0 0 8px 0 !important;
  letter-spacing: -0.01em !important;
  font-family: 'Cairo', sans-serif !important;
}

.hero-sub-title {
  font-size: 0.96rem !important;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
  line-height: 1.5 !important;
  margin: 0 0 20px 0 !important;
  font-family: 'Cairo', sans-serif !important;
}

.hero-actions-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.hero-btn-primary {
  background: #00a86b !important;
  color: #ffffff !important;
  padding: 9px 18px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.35) !important;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.hero-btn-primary:hover {
  background: #008f5a !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(0, 168, 107, 0.45) !important;
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  padding: 9px 18px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(8px) !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.20) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}

.hero-btn-subtle {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* 2. Today's Cockpit (مسار اليوم الذكي) */
.todays-cockpit {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  padding: 22px 24px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
  margin-top: 18px !important;
  margin-bottom: 22px !important;
  transition: background 0.25s ease, border-color 0.25s ease !important;
}

[data-theme="dark"] .todays-cockpit {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.cockpit-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 18px !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.cockpit-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.cockpit-badge-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: #ecfdf5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border: 1px solid #d1fae5 !important;
}

[data-theme="dark"] .cockpit-badge-icon {
  background: rgba(0, 168, 107, 0.15) !important;
  border-color: rgba(0, 168, 107, 0.3) !important;
}

.cockpit-title-text {
  font-size: 1.12rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  font-family: 'Cairo', sans-serif !important;
}

[data-theme="dark"] .cockpit-title-text {
  color: #f8fafc !important;
}

.cockpit-subtitle-text {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin: 2px 0 0 0 !important;
}

[data-theme="dark"] .cockpit-subtitle-text {
  color: #94a3b8 !important;
}

.cockpit-btn-add-task {
  padding: 6px 14px !important;
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  background: #00a86b !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.25) !important;
  transition: all 0.2s ease !important;
}

.cockpit-btn-add-task:hover {
  background: #008f5a !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.cockpit-cards-grid {
  display: grid !important;
  grid-template-columns: 1.3fr 1fr 1.1fr !important;
  gap: 14px !important;
}

@media (max-width: 1024px) {
  .cockpit-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

.cockpit-card {
  border-radius: 14px !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 145px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}

.cockpit-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="dark"] .cockpit-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* Card 1: Current Lesson Focus */
.current-class-card-focus.has-active-lesson {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%) !important;
  border: 1px solid #a7f3d0 !important;
  box-shadow: 0 4px 16px rgba(0, 168, 107, 0.12) !important;
}

[data-theme="dark"] .current-class-card-focus.has-active-lesson {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}

.cockpit-card-badge-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
}

.cockpit-pill-live {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #d1fae5 !important;
  color: #065f46 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
}

[data-theme="dark"] .cockpit-pill-live {
  background: rgba(52, 211, 153, 0.25) !important;
  color: #6ee7b7 !important;
}

.cockpit-live-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  animation: pulse-dot 1.5s infinite !important;
}

@keyframes pulse-dot {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.cockpit-pill-idle {
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
}

[data-theme="dark"] .cockpit-pill-idle {
  background: #334155 !important;
  color: #cbd5e1 !important;
}

.cockpit-pill-next {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
}

[data-theme="dark"] .cockpit-pill-next {
  background: rgba(2, 132, 199, 0.25) !important;
  color: #7dd3fc !important;
}

.cockpit-pill-pending {
  background: #fff7ed !important;
  color: #c2410c !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
}

[data-theme="dark"] .cockpit-pill-pending {
  background: rgba(234, 88, 12, 0.25) !important;
  color: #fdba74 !important;
}

.cockpit-time-slot {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

[data-theme="dark"] .cockpit-time-slot {
  color: #94a3b8 !important;
}

.cockpit-card-main-title {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 0 4px 0 !important;
  line-height: 1.25 !important;
  font-family: 'Cairo', sans-serif !important;
}

[data-theme="dark"] .cockpit-card-main-title {
  color: #f8fafc !important;
}

.cockpit-card-subject {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
}

[data-theme="dark"] .cockpit-card-subject {
  color: #cbd5e1 !important;
}

.cockpit-btn-action-primary {
  background: #00a86b !important;
  color: #ffffff !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 12px !important;
  width: fit-content !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.25) !important;
  transition: all 0.2s ease !important;
}

.cockpit-btn-action-primary:hover {
  background: #008f5a !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.cockpit-btn-action-secondary {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 12px !important;
  width: fit-content !important;
  transition: all 0.2s ease !important;
}

.cockpit-btn-action-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="dark"] .cockpit-btn-action-secondary {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .cockpit-btn-action-secondary:hover {
  background: #334155 !important;
  border-color: #64748b !important;
}

/* Queue Items Preview */
.cockpit-queue-items-preview {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-top: 6px !important;
}

.queue-mini-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.76rem !important;
}

.queue-mini-item .queue-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #f59e0b !important;
  flex-shrink: 0 !important;
}

.queue-mini-item .queue-text {
  display: flex !important;
  flex-direction: column !important;
}

.queue-mini-item .queue-text strong {
  color: #0f172a !important;
}

[data-theme="dark"] .queue-mini-item .queue-text strong {
  color: #f8fafc !important;
}

.queue-mini-item .queue-text small {
  color: #64748b !important;
  font-size: 0.70rem !important;
}

[data-theme="dark"] .queue-mini-item .queue-text small {
  color: #94a3b8 !important;
}

.queue-empty-clean {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #00a86b !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 8px 0 !important;
}

/* 3. Fast Actions Strip (Figma Refined Touchpoints) */
.cockpit-fast-strip {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 18px !important;
  padding-top: 16px !important;
  border-top: 1px solid #f1f5f9 !important;
}

[data-theme="dark"] .cockpit-fast-strip {
  border-top-color: #334155 !important;
}

.fast-strip-label {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  margin-inline-end: 4px !important;
}

[data-theme="dark"] .fast-strip-label {
  color: #94a3b8 !important;
}

.fast-strip-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.fast-strip-btn:hover {
  background: #ffffff !important;
  border-color: #00a86b !important;
  color: #00a86b !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.15) !important;
}

[data-theme="dark"] .fast-strip-btn {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .fast-strip-btn:hover {
  background: #1e293b !important;
  border-color: #34d399 !important;
  color: #34d399 !important;
}

/* ==========================================================================
   CB-UI-REC-1 — COMPLETION PATCH
   Missing classes restored for full Figma fidelity
   ========================================================================== */

/* --- Calendar: has-event day marker --- */
.cal-day-has-event {
  position: relative;
  font-weight: 700;
  color: #0f172a;
}

.cal-day-has-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00a86b;
}

html[data-theme="dark"] .cal-day-has-event {
  color: #e2e8f0;
}

html[data-theme="dark"] .cal-day-has-event::after {
  background: #34d399;
}

/* --- Schedule Widget (side rail today's schedule panel) --- */
.schedule-widget {
  border-top: 3px solid #3b82f6 !important;
}

.schedule-widget .side-widget-title {
  color: #1e40af;
}

html[data-theme="dark"] .schedule-widget {
  border-top-color: #60a5fa !important;
}

html[data-theme="dark"] .schedule-widget .side-widget-title {
  color: #93c5fd;
}

/* --- Tasks Widget (side rail upcoming tasks panel) --- */
.tasks-widget {
  border-top: 3px solid #f59e0b !important;
}

.tasks-widget .side-widget-title {
  color: #92400e;
}

html[data-theme="dark"] .tasks-widget {
  border-top-color: #fbbf24 !important;
}

html[data-theme="dark"] .tasks-widget .side-widget-title {
  color: #fde68a;
}

/* --- QA Card: Teal (Next Class) --- */
.qa-card-teal {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%) !important;
  border: 1.5px solid #5eead4 !important;
}

.qa-card-teal .qa-icon-wrap {
  background: #0d9488 !important;
  color: #ffffff !important;
}

.qa-card-teal:hover {
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%) !important;
  border-color: #14b8a6 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.18) !important;
}

html[data-theme="dark"] .qa-card-teal {
  background: linear-gradient(135deg, #0f2e2a 0%, #134e4a 100%) !important;
  border-color: #0d9488 !important;
}

html[data-theme="dark"] .qa-card-teal .qa-icon-wrap {
  background: #0f766e !important;
}

/* --- QA Card: Slate (What Remains Today groups) --- */
.qa-card-slate {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
}

.qa-card-slate .qa-icon-wrap {
  background: #475569 !important;
  color: #ffffff !important;
}

.qa-card-slate:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
  border-color: #94a3b8 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(71, 85, 105, 0.12) !important;
}

html[data-theme="dark"] .qa-card-slate {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .qa-card-slate .qa-icon-wrap {
  background: #334155 !important;
}

html[data-theme="dark"] .qa-card-slate .qa-action-title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .qa-card-slate .qa-action-desc {
  color: #94a3b8 !important;
}

/* --- QA Card: Indigo (Add Subject) --- */
.qa-card-indigo {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important;
  border: 1.5px solid #a5b4fc !important;
}

.qa-card-indigo .qa-icon-wrap {
  background: #4f46e5 !important;
  color: #ffffff !important;
}

.qa-card-indigo:hover {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%) !important;
  border-color: #6366f1 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.18) !important;
}

html[data-theme="dark"] .qa-card-indigo {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
  border-color: #4f46e5 !important;
}

html[data-theme="dark"] .qa-card-indigo .qa-icon-wrap {
  background: #4338ca !important;
}

/* --- QA Card: Rose (Parent Communication) --- */
.qa-card-rose {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%) !important;
  border: 1.5px solid #fda4af !important;
}

.qa-card-rose .qa-icon-wrap {
  background: #e11d48 !important;
  color: #ffffff !important;
}

.qa-card-rose:hover {
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%) !important;
  border-color: #f43f5e !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.18) !important;
}

html[data-theme="dark"] .qa-card-rose .qa-icon-wrap {
  background: #be123c !important;
}

/* ==========================================================================
   TODAY'S COCKPIT (مسار اليوم الذكي) — CB-UI-REC-1 FIGMA RECOVERY
   Consolidated Operational Sequence:
   CURRENT NOW -> NEXT -> NEEDS ATTENTION -> ACTION
   ========================================================================== */

.todays-cockpit-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.02);
  margin-top: 20px;
  margin-bottom: 24px;
  position: relative;
  transition: all 0.2s ease;
}

html[data-theme="dark"] .todays-cockpit-panel {
  background: #0e162e;
  border-color: #1e293b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.cockpit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

html[data-theme="dark"] .cockpit-header {
  border-bottom-color: #1e293b;
}

.cockpit-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cockpit-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #00a86b;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a7f3d0;
  flex-shrink: 0;
}

html[data-theme="dark"] .cockpit-badge-icon {
  background: #064e3b;
  color: #34d399;
  border-color: #059669;
}

.cockpit-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

html[data-theme="dark"] .cockpit-heading {
  color: #f8fafc;
}

.cockpit-subheading {
  font-size: 0.8rem;
  color: #64748b;
  margin: 2px 0 0 0;
  font-weight: 500;
}

html[data-theme="dark"] .cockpit-subheading {
  color: #94a3b8;
}

.cockpit-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
}

.cockpit-btn-outline:hover {
  background: #ffffff;
  border-color: #00a86b;
  color: #00a86b;
  transform: translateY(-1px);
}

html[data-theme="dark"] .cockpit-btn-outline {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .cockpit-btn-outline:hover {
  background: #334155;
  border-color: #34d399;
  color: #34d399;
}

/* 3-column Flow Grid */
.cockpit-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .cockpit-flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cockpit-flow-grid {
    grid-template-columns: 1fr;
  }
}

/* Step Card */
.cockpit-step-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  min-height: 190px;
}

html[data-theme="dark"] .cockpit-step-card {
  background: #131d38;
  border-color: #1e293b;
}

.cockpit-step-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transform: translateY(-2px);
}

/* Live Current Card Highlight */
.cockpit-step-card.step-current.is-live {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
  box-shadow: 0 4px 16px rgba(0, 168, 107, 0.08);
}

html[data-theme="dark"] .cockpit-step-card.step-current.is-live {
  background: linear-gradient(135deg, #062b1e 0%, #0d3827 100%);
  border-color: #059669;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.step-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00a86b;
  display: inline-block;
  position: relative;
}

.step-current.is-live .step-pulse-ring {
  position: absolute;
  top: 50%;
  right: -4px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 168, 107, 0.3);
  animation: gentle-pulse 2s infinite ease-out;
}

@keyframes gentle-pulse {
  0% {
    transform: translateY(-50%) scale(0.8);
    opacity: 0.8;
  }

  50% {
    transform: translateY(-50%) scale(1.6);
    opacity: 0;
  }

  100% {
    transform: translateY(-50%) scale(0.8);
    opacity: 0;
  }
}

.step-dot.dot-next {
  background: #0284c7;
}

.step-dot.dot-amber {
  background: #f59e0b;
}

.step-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
}

html[data-theme="dark"] .step-label {
  color: #94a3b8;
}

.step-current.is-live .step-label {
  color: #065f46;
}

html[data-theme="dark"] .step-current.is-live .step-label {
  color: #6ee7b7;
}

.step-status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.pill-live {
  background: #00a86b;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 168, 107, 0.3);
}

.pill-upcoming {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

html[data-theme="dark"] .pill-upcoming {
  background: #075985;
  color: #e0f2fe;
  border-color: #0284c7;
}

.pill-attention {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

html[data-theme="dark"] .pill-attention {
  background: #78350f;
  color: #fef3c7;
  border-color: #b45309;
}

.step-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.step-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #047857;
  margin-bottom: 6px;
}

html[data-theme="dark"] .step-time-badge {
  color: #34d399;
}

.step-time-badge.badge-next {
  color: #0284c7;
}

html[data-theme="dark"] .step-time-badge.badge-next {
  color: #38bdf8;
}

.step-subject-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

html[data-theme="dark"] .step-subject-title {
  color: #f1f5f9;
}

.step-class-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.step-class-meta .meta-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

html[data-theme="dark"] .step-class-meta .meta-tag {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.step-action-row {
  margin-top: auto;
}

.btn-step-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-action-primary {
  background: #00a86b;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 168, 107, 0.25);
}

.btn-action-primary:hover {
  background: #008f5a;
  box-shadow: 0 4px 10px rgba(0, 168, 107, 0.35);
  transform: translateY(-1px);
}

.btn-action-secondary {
  background: #ffffff;
  color: #0284c7 !important;
  border: 1.5px solid #0284c7;
}

.btn-action-secondary:hover {
  background: #0284c7;
  color: #ffffff !important;
  transform: translateY(-1px);
}

html[data-theme="dark"] .btn-action-secondary {
  background: #1e293b;
  border-color: #38bdf8;
  color: #38bdf8 !important;
}

html[data-theme="dark"] .btn-action-secondary:hover {
  background: #0284c7;
  color: #ffffff !important;
}

.btn-action-subtle {
  background: #ffffff;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
}

.btn-action-subtle:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a !important;
}

html[data-theme="dark"] .btn-action-subtle {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1 !important;
}

/* Calm Empty State */
.step-empty-calm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 8px;
  color: #64748b;
}

html[data-theme="dark"] .step-empty-calm {
  color: #94a3b8;
}

.empty-calm-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
}

html[data-theme="dark"] .empty-calm-icon {
  background: #1e293b;
  color: #64748b;
}

.empty-calm-icon.icon-success {
  background: #d1fae5;
  color: #059669;
}

html[data-theme="dark"] .empty-calm-icon.icon-success {
  background: #064e3b;
  color: #34d399;
}

.empty-calm-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

html[data-theme="dark"] .empty-calm-title {
  color: #f1f5f9;
}

.empty-calm-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

html[data-theme="dark"] .empty-calm-sub {
  color: #94a3b8;
}

/* Attention Chips */
.attention-summary-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.attention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.chip-plans {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.chip-plans:hover {
  background: #dbeafe;
}

html[data-theme="dark"] .chip-plans {
  background: #1e3a8a;
  color: #93c5fd;
  border-color: #2563eb;
}

.chip-tasks {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.chip-tasks:hover {
  background: #f3e8ff;
}

html[data-theme="dark"] .chip-tasks {
  background: #581c87;
  color: #d8b4fe;
  border-color: #7e22ce;
}

/* Micro Remains Feed */
.remains-items-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.feed-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.feed-item-row:hover {
  background: #f8fafc;
  border-color: #00a86b;
  color: #00a86b;
}

html[data-theme="dark"] .feed-item-row {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .feed-item-row:hover {
  background: #334155;
  border-color: #34d399;
  color: #34d399;
}

.feed-item-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}

.feed-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.feed-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-meta {
  font-size: 0.68rem;
  color: #64748b;
}

html[data-theme="dark"] .feed-item-meta {
  color: #94a3b8;
}

/* LTR adjustments */
html[dir="ltr"] .todays-cockpit-panel {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .step-current.is-live .step-pulse-ring {
  right: auto;
  left: -4px;
}

html[dir="ltr"] .btn-step-action svg {
  transform: rotate(0deg);
}

html[dir="rtl"] .btn-step-action svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   CB-UI-REC-1 — FINAL AUTHORITY OVERRIDE (appended last, wins all cascades)
   Cockpit Panel Glass Cards + All Dashboard Section Visual System
   ========================================================================== */

/* ─── Cockpit Panel Container ─────────────────────────────────────── */
.todays-cockpit-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  padding: 22px 26px !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04), 0 1px 4px rgba(15, 23, 42, 0.02) !important;
  margin-top: 20px !important;
  margin-bottom: 24px !important;
  position: relative !important;
}

html[data-theme="dark"] .todays-cockpit-panel {
  background: #0d1a2e !important;
  border-color: #1e2d45 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* ─── Cockpit Header ──────────────────────────────────────────────── */
.todays-cockpit-panel .cockpit-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-bottom: 18px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

html[data-theme="dark"] .todays-cockpit-panel .cockpit-header {
  border-bottom-color: #1e293b !important;
}

.todays-cockpit-panel .cockpit-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.todays-cockpit-panel .cockpit-badge-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: #ecfdf5 !important;
  color: #00a86b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #a7f3d0 !important;
  flex-shrink: 0 !important;
}

.todays-cockpit-panel .cockpit-heading {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

html[data-theme="dark"] .todays-cockpit-panel .cockpit-heading {
  color: #f8fafc !important;
}

.todays-cockpit-panel .cockpit-subheading {
  font-size: 0.78rem !important;
  color: #64748b !important;
  margin: 2px 0 0 0 !important;
}

/* ─── 3-Column Flow Grid ──────────────────────────────────────────── */
.todays-cockpit-panel .cockpit-flow-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
}

@media (max-width: 1100px) {
  .todays-cockpit-panel .cockpit-flow-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .todays-cockpit-panel .cockpit-flow-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Glass Step Card ─────────────────────────────────────────────── */
.todays-cockpit-panel .cockpit-step-card {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-height: 190px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

html[data-theme="dark"] .todays-cockpit-panel .cockpit-step-card {
  background: #121e36 !important;
  border-color: #1e293b !important;
}

.todays-cockpit-panel .cockpit-step-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07) !important;
  transform: translateY(-2px) !important;
}

/* Live Current Card */
.todays-cockpit-panel .cockpit-step-card.step-current.is-live {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
  border-color: #86efac !important;
  box-shadow: 0 4px 18px rgba(0, 168, 107, 0.1) !important;
}

html[data-theme="dark"] .todays-cockpit-panel .cockpit-step-card.step-current.is-live {
  background: linear-gradient(135deg, #062b1e 0%, #0d3827 100%) !important;
  border-color: #059669 !important;
}

/* ─── Step Card Top Row ───────────────────────────────────────────── */
.todays-cockpit-panel .step-card-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.todays-cockpit-panel .step-indicator {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  position: relative !important;
}

.todays-cockpit-panel .step-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #00a86b !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.todays-cockpit-panel .step-dot.dot-next {
  background: #0284c7 !important;
}

.todays-cockpit-panel .step-dot.dot-amber {
  background: #d97706 !important;
}

.todays-cockpit-panel .step-label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
  letter-spacing: 0.01em !important;
}

html[data-theme="dark"] .todays-cockpit-panel .step-label {
  color: #94a3b8 !important;
}

/* Live pulse ring */
.todays-cockpit-panel .step-pulse-ring {
  position: absolute !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 2px solid #00a86b !important;
  top: 50% !important;
  right: -4px !important;
  transform: translateY(-50%) !important;
  animation: cockpit-pulse 1.6s ease-out infinite !important;
  opacity: 0 !important;
}

@keyframes cockpit-pulse {
  0% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-50%) scale(2.2);
  }
}

/* Status Pills */
.todays-cockpit-panel .step-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

.todays-cockpit-panel .pill-live {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.todays-cockpit-panel .pill-upcoming {
  background: #e0f2fe !important;
  color: #0369a1 !important;
}

.todays-cockpit-panel .pill-attention {
  background: #fff7ed !important;
  color: #c2410c !important;
}

html[data-theme="dark"] .todays-cockpit-panel .pill-live {
  background: rgba(52, 211, 153, 0.2) !important;
  color: #6ee7b7 !important;
}

html[data-theme="dark"] .todays-cockpit-panel .pill-upcoming {
  background: rgba(2, 132, 199, 0.2) !important;
  color: #7dd3fc !important;
}

html[data-theme="dark"] .todays-cockpit-panel .pill-attention {
  background: rgba(234, 88, 12, 0.2) !important;
  color: #fdba74 !important;
}

/* ─── Step Card Body ──────────────────────────────────────────────── */
.todays-cockpit-panel .step-card-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.todays-cockpit-panel .step-time-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #00a86b !important;
  background: rgba(0, 168, 107, 0.08) !important;
  padding: 3px 10px !important;
  border-radius: 7px !important;
  width: fit-content !important;
}

.todays-cockpit-panel .step-time-badge.badge-next {
  color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.08) !important;
}

.todays-cockpit-panel .step-subject-title {
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

html[data-theme="dark"] .todays-cockpit-panel .step-subject-title {
  color: #f1f5f9 !important;
}

.todays-cockpit-panel .step-class-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.todays-cockpit-panel .meta-tag {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  padding: 2px 9px !important;
  border-radius: 6px !important;
}

html[data-theme="dark"] .todays-cockpit-panel .meta-tag {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

/* Step Action Button */
.todays-cockpit-panel .step-action-row {
  margin-top: auto !important;
  padding-top: 10px !important;
}

.todays-cockpit-panel .btn-step-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
  border: 1.5px solid transparent !important;
}

.todays-cockpit-panel .btn-action-primary {
  background: linear-gradient(135deg, #00a86b, #10b981) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.22) !important;
}

.todays-cockpit-panel .btn-action-primary:hover {
  background: linear-gradient(135deg, #008f5a, #00a86b) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 168, 107, 0.3) !important;
}

.todays-cockpit-panel .btn-action-secondary {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.todays-cockpit-panel .btn-action-secondary:hover {
  background: #dbeafe !important;
  transform: translateY(-1px) !important;
}

.todays-cockpit-panel .btn-action-subtle {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}

.todays-cockpit-panel .btn-action-subtle:hover {
  background: #f1f5f9 !important;
  border-color: #00a86b !important;
  color: #00a86b !important;
}

/* Empty State */
.todays-cockpit-panel .step-empty-calm {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 10px 0 !important;
}

.todays-cockpit-panel .empty-calm-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  background: #f1f5f9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #94a3b8 !important;
}

.todays-cockpit-panel .empty-calm-icon.icon-success {
  background: #ecfdf5 !important;
  color: #059669 !important;
}

.todays-cockpit-panel .empty-calm-title {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 4px !important;
}

html[data-theme="dark"] .todays-cockpit-panel .empty-calm-title {
  color: #f1f5f9 !important;
}

.todays-cockpit-panel .empty-calm-sub {
  font-size: 0.76rem !important;
  color: #64748b !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

/* Attention chips */
.todays-cockpit-panel .attention-summary-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-bottom: 10px !important;
}

.todays-cockpit-panel .attention-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.todays-cockpit-panel .chip-plans {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.todays-cockpit-panel .chip-tasks {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}

/* Feed items */
.todays-cockpit-panel .remains-items-feed {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin-bottom: 8px !important;
}

.todays-cockpit-panel .feed-item-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  text-decoration: none !important;
  transition: background 0.15s ease !important;
}

.todays-cockpit-panel .feed-item-row:hover {
  background: #f1f5f9 !important;
}

.todays-cockpit-panel .feed-item-bullet {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #00a86b !important;
  flex-shrink: 0 !important;
}

.todays-cockpit-panel .feed-item-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.todays-cockpit-panel .feed-item-title {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.todays-cockpit-panel .feed-item-meta {
  font-size: 0.7rem !important;
  color: #64748b !important;
  display: block !important;
}

html[data-theme="dark"] .todays-cockpit-panel .feed-item-row {
  background: #1a2640 !important;
}

html[data-theme="dark"] .todays-cockpit-panel .feed-item-title {
  color: #e2e8f0 !important;
}

/* ─── KPI Row Final Authority ─────────────────────────────────────── */
.figma-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 20px !important;
}

@media (max-width: 900px) {
  .figma-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 500px) {
  .figma-kpi-row {
    grid-template-columns: 1fr !important;
  }
}

.kpi-card-v2 {
  background: #ffffff !important;
  border: 1px solid #e8edf5 !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
  transition: box-shadow 0.2s, transform 0.2s !important;
  direction: rtl !important;
  text-align: right !important;
}

.kpi-card-v2:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-2px) !important;
}

html[data-theme="dark"] .kpi-card-v2 {
  background: #111827 !important;
  border-color: #1e293b !important;
}

.kpi-card-v2 .kpi-badge-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.kpi-card-v2 .badge-blue {
  background: #eff6ff !important;
}

.kpi-card-v2 .badge-green {
  background: #ecfdf5 !important;
}

.kpi-card-v2 .badge-pink {
  background: #fff1f2 !important;
}

.kpi-card-v2 .badge-orange {
  background: #fff7ed !important;
}

html[data-theme="dark"] .kpi-card-v2 .badge-blue {
  background: rgba(59, 130, 246, 0.12) !important;
}

html[data-theme="dark"] .kpi-card-v2 .badge-green {
  background: rgba(16, 185, 129, 0.12) !important;
}

html[data-theme="dark"] .kpi-card-v2 .badge-pink {
  background: rgba(244, 63, 94, 0.12) !important;
}

html[data-theme="dark"] .kpi-card-v2 .badge-orange {
  background: rgba(234, 88, 12, 0.12) !important;
}

.kpi-card-v2 .kpi-data-group {
  flex: 1 !important;
  min-width: 0 !important;
}

.kpi-card-v2 .kpi-number {
  font-size: 1.55rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
}

html[data-theme="dark"] .kpi-card-v2 .kpi-number {
  color: #f8fafc !important;
}

.kpi-card-v2 .kpi-caption {
  font-size: 0.78rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  margin-top: 2px !important;
}

html[data-theme="dark"] .kpi-card-v2 .kpi-caption {
  color: #94a3b8 !important;
}

.figma-calm-topbar {
  flex-shrink: 0 !important;
}

@media (max-width: 760px) {
  .figma-calm-topbar {
    gap: 8px !important;
    padding: 8px 12px !important;
  }

  .calm-topbar-right {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
  }

  .calm-profile-chip {
    min-width: 0;
    gap: 6px;
    padding: 4px;
  }

  .calm-profile-text {
    max-width: 90px;
    min-width: 0;
  }

  .calm-profile-name,
  .calm-profile-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calm-icon-actions {
    min-width: 0;
    flex: 1 1 190px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .calm-action-btn {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px;
  }

  .topbar-lang-capsule {
    gap: 0 !important;
    padding: 2px !important;
  }

  .lang-capsule-item {
    padding-inline: 8px !important;
    font-size: 0.78rem !important;
  }

  .calm-topbar-left {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 100%;
    margin-inline-start: 0;
  }
}