@import url('https://fonts.googleapis.com/css2?family=Battambang:wght@400;700;900&family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&family=Moul&family=Moulpali&family=Siemreap&family=Noto+Sans+Khmer:wght@400;500;600;700&display=swap');
/* ==========================================================================
   AUTO-DETECTION FONT ENGINE (Khmer & English Unicode Separation)
   - English characters (Latin / Numbers / Punctuation) -> Times New Roman
   - Khmer characters (Body / General Text / Tables)   -> Khmer OS Battambang
   - Khmer Main Titles / Headings / Banners / Badges   -> Khmer OS Muol Light
   Works automatically on all text regardless of language switch state.
   ========================================================================== */

/* 1. Times New Roman (Latin Range) */
@font-face {
  font-family: 'Times New Roman';
  src: local('Times New Roman'),
       url('../fonts/Times_New_Roman.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-024F, U+0259, U+1E00-1EFF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2200-22FF;
}

/* 2. Khmer OS Battambang (Khmer Regular Range - All Weights 100-900) */
@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* Aliases for Khmer OS Battambang */
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'KhmerOS_battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'Khmer OS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'KhmerOS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Battambang';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* 3. Khmer OS Muol Light (Khmer Title Range - All Weights 100-900) */
@font-face {
  font-family: 'Khmer OS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Khmer OS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'KhmerOS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS Muol Light';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'KhmerOS_muollight';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_muollight';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'KhmerOS_muollight';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'Moul';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Moul';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Moul';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* Tacteing (Symbol / Ornament) */
@font-face {
  font-family: 'Tacteing';
  src: url('../fonts/Tacteing.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 4. Unified Composite Font: Body & Controls */
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/Times_New_Roman.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-024F, U+0259, U+1E00-1EFF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2200-22FF;
}
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppAutoFont';
  src: url('../fonts/KhmerOS_battambang.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* 5. Unified Composite Font: Titles & Headings */
@font-face {
  font-family: 'AppTitleAutoFont';
  src: url('../fonts/Times_New_Roman.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-024F, U+0259, U+1E00-1EFF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2200-22FF;
}
@font-face {
  font-family: 'AppTitleAutoFont';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AppTitleAutoFont';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppTitleAutoFont';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppTitleAutoFont';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'AppTitleAutoFont';
  src: url('../fonts/KhmerOS_muollight.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: only light !important;
  --icon-orange: #f97316;
  --icon-color: #f97316;
  --font-body: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Battambang', sans-serif;
  --font-title: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Moul', 'Khmer OS Battambang', serif;
  --font-en: 'Times New Roman', serif;
  --font-kh-body: 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Battambang', sans-serif;
  --font-kh-title: 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Moul', serif;
  --sans: var(--font-body);
  --heading: var(--font-title);
  --sidebar-bg: #0f2439;
  --sidebar-hover: #1a3454;
  --sidebar-active: #1d4175;
  --sidebar-text: #a8c4e0;
  --sidebar-text-active: #ffffff;
  --topbar-bg: #ffffff;
  --content-bg: #f0f2f5;
  --card-bg: #ffffff;
  --accent: #1565c0;
  --accent-hover: #0d47a1;
  --approve-bg: #2e7d32;
  --approve-hover: #1b5e20;
  --reject-bg: #c62828;
  --reject-hover: #b71c1c;
  --border: #dde3ea;
  --text-primary: #1a2332;
  --text-secondary: #5a6a7e;
  --table-header: #e8edf3;
  --table-stripe: #f7f9fc;
  --footer-bg: #0f2439;
  --tag-bg: #e3f2fd;
  --tag-text: #1565c0;
  --table-row-border: #90caf9;
  --primary: var(--accent);
  --primary-color: var(--accent);
  --border-color: var(--border);
  --card-border: var(--border);
  --bg-secondary: #f8fafc;
  --accent-bg: #e3f2fd;
}

/* Base Body & Document Night Mode Protection */
html, body {
  color-scheme: only light !important;
  background-color: #f0f2f5 !important;
  color: #1a2332 !important;
  font-family: var(--font-body);
  line-height: 1.55;
  margin: 0;
  padding: 0;
}

/* General / Body Auto-Detection Typography */
html, body, table, td, th, p, span, div, input, select, textarea, button, li, ul, a, label,
.topbar-select, .searchable-select-trigger, .searchable-select-option, .searchable-select-input,
.dropdown-item, .nav-item, .sidebar-nav a {
  font-family: var(--font-body);
  line-height: 1.55;
  color-scheme: only light;
}

/* Main Titles, Headings & Document Titles Auto-Detection Typography */
h1, h2, h3, h4, h5, h6,
.title, .main-title, .page-title, .section-title, .header-title,
.doc-title, .report-title, .modal-title, .card-title,
.page-header h1, .page-header h2, .sidebar-logo h1, .sidebar-logo h2,
.national-motto, .school-name-title, .cert-title, .muol-title,
.main-title-header, .top-title, th.report-header, .print-title {
  font-family: var(--font-title) !important;
}

/* Universal Typography when switched to Khmer */
html.lang-kh, body.lang-kh, .lang-kh, [lang="kh"],
.lang-kh body, [lang="kh"] body {
  font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Battambang', sans-serif !important;
  --sans: var(--font-body);
  --heading: var(--font-title);
}

/* Force all descendant elements in Khmer mode to render with Khmer OS Battambang */
.lang-kh *:not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.title):not(.main-title):not(.page-title):not(.header-title):not(.doc-title):not(.report-title):not(.modal-title):not(.national-motto):not(.school-name-title):not(.muol-title):not(.khmer-title),
[lang="kh"] *:not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.title):not(.main-title):not(.page-title):not(.header-title):not(.doc-title):not(.report-title):not(.modal-title):not(.national-motto):not(.school-name-title):not(.muol-title):not(.khmer-title) {
  font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Battambang', sans-serif !important;
}

/* Main Titles & Headings in Khmer mode use Khmer OS Muol Light */
.lang-kh h1, .lang-kh h2, .lang-kh h3, .lang-kh h4, .lang-kh h5, .lang-kh h6,
.lang-kh .title, .lang-kh .main-title, .lang-kh .page-title, .lang-kh .section-title, .lang-kh .header-title,
.lang-kh .doc-title, .lang-kh .report-title, .lang-kh .modal-title, .lang-kh .card-title,
.lang-kh .page-header h1, .lang-kh .page-header h2, .lang-kh .sidebar-logo h1, .lang-kh .sidebar-logo h2,
.lang-kh .national-motto, .lang-kh .school-name-title, .lang-kh .cert-title, .lang-kh .muol-title, .lang-kh .khmer-title,
.lang-kh .main-title-header, .lang-kh .top-title, .lang-kh th.report-header, .lang-kh .print-title,
[lang="kh"] h1, [lang="kh"] h2, [lang="kh"] h3, [lang="kh"] h4, [lang="kh"] h5, [lang="kh"] h6,
[lang="kh"] .title, [lang="kh"] .main-title, [lang="kh"] .page-title, [lang="kh"] .section-title, [lang="kh"] .header-title,
[lang="kh"] .doc-title, [lang="kh"] .report-title, [lang="kh"] .modal-title, [lang="kh"] .card-title,
[lang="kh"] .page-header h1, .lang-kh .page-header h2, .lang-kh .sidebar-logo h1, .lang-kh .sidebar-logo h2,
[lang="kh"] .national-motto, [lang="kh"] .school-name-title, [lang="kh"] .cert-title, [lang="kh"] .muol-title, [lang="kh"] .khmer-title,
[lang="kh"] .main-title-header, [lang="kh"] .top-title, [lang="kh"] th.report-header, [lang="kh"] .print-title {
  font-family: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Moul', 'Khmer OS Battambang', serif !important;
}

/* --- Sidebar & UI Styles --- */
.sidebar {
  width: 270px; min-width: 270px; height: 100vh; background: var(--sidebar-bg);
  display: flex; flex-direction: column; transition: all 0.3s ease;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15); z-index: 50;
}
.sidebar-logo {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.sidebar-logo .logo-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; font-weight: 700; flex-shrink: 0; margin: 0 auto;
}
.sidebar-logo h1 { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; }
.sidebar-logo p { color: var(--sidebar-text); font-size: 10px; margin-top: 2px; letter-spacing: 0.5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.nav-section-label {
  padding: 14px 20px 6px; font-size: 10px; font-weight: 600;
  color: rgba(168,196,224,0.5); text-transform: uppercase; letter-spacing: 1.2px;
}
/* Navigation Menu Items with Distinct Left Border Colors on Hover & Active */
.nav-item {
  display: flex; align-items: center; padding: 9px 20px; cursor: pointer;
  color: var(--sidebar-text); font-size: 13px; transition: all 0.2s ease; position: relative;
  gap: 12px; text-decoration: none; user-select: none;
  --menu-color: #42a5f5;
}
.nav-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--menu-color, #42a5f5); border-radius: 0 4px 4px 0;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}
.nav-item:hover::before {
  width: 4px;
  background: var(--menu-color, #42a5f5);
  box-shadow: 2px 0 10px var(--menu-color, rgba(66, 165, 245, 0.5));
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}
.nav-item.active::before {
  width: 4px;
  background: var(--menu-color, #42a5f5);
  box-shadow: 2px 0 8px var(--menu-color, rgba(66, 165, 245, 0.4));
}
.nav-item i { width: 18px; text-align: center; font-size: 13px; color: var(--icon-orange, #f97316); opacity: 1; transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; }
.nav-item:hover i:first-child { color: var(--menu-color, var(--icon-orange, #f97316)); opacity: 1; transform: scale(1.1); }
.nav-item.active i { opacity: 1; }
.nav-item.active i:first-child { color: var(--menu-color, var(--icon-orange, #f97316)); }
.nav-item .chevron { margin-left: auto; font-size: 10px; transition: transform 0.25s, color 0.2s; opacity: 0.7; color: var(--sidebar-text); }
.nav-item.expanded .chevron { transform: rotate(90deg); }

.nav-sub { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.nav-sub.open { max-height: 1000px; }
.nav-sub-item {
  display: flex; align-items: center; padding: 8px 20px 8px 50px; cursor: pointer;
  color: var(--sidebar-text); font-size: 12.5px; transition: all 0.2s ease;
  text-decoration: none; position: relative; gap: 8px;
}
.nav-sub-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--menu-color, #42a5f5); border-radius: 0 3px 3px 0;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-sub-item:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}
.nav-sub-item:hover::before {
  width: 3.5px;
  background: var(--menu-color, #42a5f5);
  box-shadow: 2px 0 8px var(--menu-color, rgba(66, 165, 245, 0.4));
}
.nav-sub-item.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
}
.nav-sub-item.active::before {
  width: 3.5px;
  background: var(--menu-color, #42a5f5);
}
.nav-sub-item::after {
  content: ''; position: absolute; left: 38px; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: rgba(168,196,224,0.3); transform: translateY(-50%);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-sub-item:hover::after {
  background: var(--menu-color, #42a5f5);
  box-shadow: 0 0 6px var(--menu-color, rgba(66, 165, 245, 0.6));
  transform: translateY(-50%) scale(1.2);
}
.nav-sub-item.active::after {
  background: var(--menu-color, #42a5f5);
  box-shadow: 0 0 6px var(--menu-color, rgba(66, 165, 245, 0.6));
}

/* Distinct Menu Left Border Colors */
[data-menu="dashboard"], .nav-item[data-menu="dashboard"] { --menu-color: #10b981; }
[data-menu="school-mgmt"], .nav-item[data-menu="school-mgmt"], .nav-sub[data-menu="school-mgmt"] { --menu-color: #3b82f6; }
[data-menu="class-mgmt"], .nav-item[data-menu="class-mgmt"], .nav-sub[data-menu="class-mgmt"] { --menu-color: #6366f1; }
[data-menu="exam-mgmt"], .nav-item[data-menu="exam-mgmt"], .nav-sub[data-menu="exam-mgmt"] { --menu-color: #f59e0b; }
[data-menu="schedule-mgmt"], .nav-item[data-menu="schedule-mgmt"], .nav-sub[data-menu="schedule-mgmt"] { --menu-color: #06b6d4; }
[data-menu="teacher-mgmt"], .nav-item[data-menu="teacher-mgmt"], .nav-sub[data-menu="teacher-mgmt"] { --menu-color: #8b5cf6; }
[data-menu="student-mgmt"], .nav-item[data-menu="student-mgmt"], .nav-sub[data-menu="student-mgmt"] { --menu-color: #0ea5e9; }
[data-menu="hr-mgmt"], .nav-item[data-menu="hr-mgmt"], .nav-sub[data-menu="hr-mgmt"] { --menu-color: #f43f5e; }
[data-menu="staff-mgmt"], .nav-item[data-menu="staff-mgmt"], .nav-sub[data-menu="staff-mgmt"] { --menu-color: #f97316; }
[data-menu="discipline-mgmt"], .nav-item[data-menu="discipline-mgmt"], .nav-sub[data-menu="discipline-mgmt"] { --menu-color: #ef4444; }
[data-menu="score-mgmt"], .nav-item[data-menu="score-mgmt"], .nav-sub[data-menu="score-mgmt"] { --menu-color: #eab308; }
[data-menu="payment-mgmt"], .nav-item[data-menu="payment-mgmt"], .nav-sub[data-menu="payment-mgmt"] { --menu-color: #22c55e; }
[data-menu="report-mgmt"], .nav-item[data-menu="report-mgmt"], .nav-sub[data-menu="report-mgmt"] { --menu-color: #14b8a6; }
[data-menu="subject-mgmt"], .nav-item[data-menu="subject-mgmt"], .nav-sub[data-menu="subject-mgmt"] { --menu-color: #d946ef; }
[data-menu="account-mgmt"], .nav-item[data-menu="account-mgmt"], .nav-sub[data-menu="account-mgmt"] { --menu-color: #ec4899; }
[data-menu="website-mgmt"], .nav-item[data-menu="website-mgmt"], .nav-sub[data-menu="website-mgmt"] { --menu-color: #38bdf8; }
[data-menu="system-settings"], .nav-item[data-menu="system-settings"], .nav-sub[data-menu="system-settings"] { --menu-color: #94a3b8; }

/* Main Layout */
.main-wrapper { display: flex; height: 100vh; overflow: hidden; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* Top Bar */
.topbar {
  background: var(--topbar-bg); padding: 0 24px; height: 56px; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  flex-shrink: 0;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb span { color: var(--text-secondary); }
.breadcrumb .bc-sep { color: #c0c8d4; font-size: 10px; }
.breadcrumb .bc-current { color: var(--text-primary); font-weight: 600; }

.topbar-controls { display: flex; align-items: center; gap: 14px; }
.topbar-select {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13.5px; color: var(--text-primary); background: #fff;
  cursor: pointer; outline: none; font-family: var(--sans);
  transition: border-color 0.2s;
}
.topbar-select option { font-size: 14px; padding: 6px 10px; }
.topbar-select:focus { border-color: var(--accent); }

/* Content Area – fully scrollable right-side panel */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 12px;
  min-height: 0;
  box-sizing: border-box;
}
.content-area::-webkit-scrollbar { width: 6px; height: 6px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: #c8cdd4; border-radius: 4px; }
.content-area::-webkit-scrollbar-corner { background: transparent; }

/* Page Header */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.page-header h2 {
  font-size: 14px;
}
.card-actions-header .page-header h2 { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  min-width: 0;
  z-index: 10;
}
.page-header h2 {
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Elevate header and allow dropdowns to overflow freely in front of all page cards and tables */
.page-header:has(.dropdown-menu.show),
.page-header:has(.is-open),
.page-header.has-open-dropdown {
  z-index: 2147483647 !important;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  cursor: grab;
  padding: 4px 2px;
}
.page-header-actions:has(.dropdown-menu.show),
.page-header-actions:has(.is-open),
.page-header-actions.has-open-dropdown {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  z-index: 2147483647 !important;
}
.page-header-actions:active {
  cursor: grabbing;
}
.page-header-actions::-webkit-scrollbar {
  display: none;
}
.page-header-actions > * {
  flex-shrink: 0;
}

/* Scroller Bar & Nav Buttons */
.scroller-bar-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 100%;
  min-width: 0;
  gap: 6px;
}
.scroller-bar-track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
}
.scroller-bar-track:active {
  cursor: grabbing;
}
.scroller-bar-track::-webkit-scrollbar {
  display: none;
}
.scroller-bar-track > * {
  flex-shrink: 0;
}

.scroller-nav-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  user-select: none;
  z-index: 2;
}
.scroller-nav-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
  transform: scale(1.08);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}
.scroller-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
  background: #e2e8f0;
}
.scroller-nav-btn:disabled,
.scroller-nav-btn.disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

/* Cards */
.card {
  background: var(--card-bg); border-radius: 10px; border: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04); overflow: hidden; margin-bottom: 14px;
}
.card-header {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-header i { color: var(--accent); font-size: 13.5px; }
.card-body { padding: 16px; }

/* Filter Section */
.filter-section {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 10px;
  padding: 8px 14px; background: #f8fafc; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch; cursor: grab;
}
.filter-section:active {
  cursor: grabbing;
}
.filter-section::-webkit-scrollbar {
  display: none;
}
.filter-section > * {
  flex-shrink: 0;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
}
.filter-select, .filter-input {
  padding: 6px 11px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text-primary, #1e293b);
  background: #fff;
  cursor: pointer;
  outline: none;
  font-family: var(--font-body);
  min-width: 150px;
  transition: all 0.2s ease;
  min-height: 33px;
  box-sizing: border-box;
}
select.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M11.9997 13.1714L16.9495 8.22168L18.3637 9.63589L11.9997 15.9999L5.63574 9.63589L7.04996 8.22168L11.9997 13.1714Z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--accent, #1565c0);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.12);
}

/* Date input calendar picker icon */
input[type="date"].filter-input {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 4px;
  filter: invert(0.35);
  transition: all 0.15s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(0.15);
  background: rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 16px;
  border: none; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: #2563eb; color: #fff; border: 1px solid #1d4ed8; }
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
.btn-approve { background: var(--approve-bg); color: #fff; }
.btn-approve:hover { background: var(--approve-hover); box-shadow: 0 2px 8px rgba(46,125,50,0.3); }
.btn-reject { background: var(--reject-bg); color: #fff; }
.btn-reject:hover { background: var(--reject-hover); box-shadow: 0 2px 8px rgba(198,40,40,0.3); }
.btn-success { background: #16a34a; color: #fff; border: 1px solid #15803d; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: #fff; border: 1px solid #b91c1c; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #f59e0b; color: #fff; border: 1px solid #d97706; }
.btn-warning:hover { background: #d97706; }
.btn-orange { background: #ea580c; color: #fff; border: 1px solid #c2410c; }
.btn-orange:hover { background: #c2410c; }
.btn-info { background: #0284c7; color: #fff; border: 1px solid #0369a1; }
.btn-info:hover { background: #0369a1; }
.btn-secondary { background: #64748b; color: #fff; border: 1px solid #475569; }
.btn-secondary:hover { background: #475569; }
.btn-outline {
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
}
.btn-outline:hover { background: #f0f2f5; border-color: #bcc5d0; }
.bg-blue, .btn-blue { background-color: #2563eb !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.bg-green, .btn-green { background-color: #16a34a !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.bg-danger, .bg-red, .btn-red { background-color: #dc2626 !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.bg-orange, .btn-orange { background-color: #ea580c !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.bg-warning, .btn-warning { background-color: #f59e0b !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.bg-secondary, .btn-secondary { background-color: #64748b !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.text-center { text-align: center !important; }

/* Dropdown Menu */
.dropdown-menu {
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 180px; z-index: 100;
  display: none; flex-direction: column; overflow: hidden;
}
.dropdown-menu.show { display: flex; }
.dropdown-item {
  padding: 10px 16px; font-size: 13px; color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background 0.2s;
}
.dropdown-item:hover { background: #f0f2f5; }
.dropdown-item i { width: 16px; color: var(--text-secondary); }

/* Action Dropdown Menu (Fixed in front of all table/content records) */
.action-dropdown-container {
  position: relative;
  display: inline-block;
}

.action-dropdown-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  background-color: #f97316 !important;
  color: #ffffff !important;
  border: 1px solid #ea580c !important;
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.25);
  transition: all 0.15s ease-in-out;
}

.action-dropdown-btn i,
.action-dropdown-btn .fas,
.action-dropdown-btn .fa-solid {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.action-dropdown-btn:hover,
.action-dropdown-btn.active {
  background-color: #ea580c !important;
  border-color: #c2410c !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
  transform: translateY(-0.5px);
}

.action-dropdown-btn:active {
  background-color: #c2410c !important;
  border-color: #9a3412 !important;
  transform: translateY(0);
}

.action-dropdown-menu {
  position: fixed;
  z-index: 2147483647 !important;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
  min-width: 150px;
  padding: 4px 0;
  overflow: hidden;
  animation: actionDropdownFadeIn 0.12s ease-out;
}

@keyframes actionDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  text-align: left;
  transition: background 0.12s ease;
  user-select: none;
  font-family: var(--font-body);
}

.action-dropdown-item:hover {
  background: #f1f5f9;
  color: var(--accent, #1565c0);
}

.action-dropdown-item.danger {
  color: #dc2626;
}

.action-dropdown-item.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.action-dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  flex-shrink: 0;
}

.action-dropdown-item.danger i {
  color: #dc2626;
}

/* Searchable Dropdown UL / LI System */
.searchable-select-container {
  position: relative;
  display: inline-block;
  width: 100%;
}
.searchable-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  min-height: 36px;
  padding: 5px 10px;
}
.searchable-select-trigger:hover:not(.disabled) {
  border-color: #94a3b8;
}
.searchable-select-trigger.open {
  border-color: var(--accent, #1565c0);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}
.searchable-select-trigger.disabled {
  background: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.7;
}
.searchable-select-dropdown {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18), 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 2147483647;
}
.searchable-select-options,
ul.searchable-select-options {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  max-height: 250px;
  -webkit-overflow-scrolling: touch;
}
.searchable-select-option,
li.searchable-select-option {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
  border-bottom: 1px solid #f8fafc;
}
.searchable-select-option:last-child {
  border-bottom: none;
}
.searchable-select-option:hover:not(.disabled) {
  background: #f1f5f9;
  color: var(--accent, #1565c0);
}
.searchable-select-option.active,
.searchable-select-option.selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.searchable-select-option.disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Custom Language Switcher Dropdown */
.topbar-lang-container {
  position: relative;
  display: inline-flex;
}
.topbar-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: 1px solid #ea580c;
  border-radius: 8px;
  cursor: pointer;
  color: #ffffff;
  min-height: 34px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
  transition: all 0.15s ease;
}
.topbar-lang-btn:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  border-color: #c2410c;
  color: #ffffff;
}
.lang-dropdown-menu,
ul.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 150px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 4px 0;
  margin: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: dropdownFadeIn 0.12s ease-out;
}
.lang-dropdown-menu li,
ul.lang-dropdown-menu li {
  padding: 8px 14px;
  font-size: 14px;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
}
.lang-dropdown-menu li:hover {
  background: #f1f5f9;
  color: #1565c0;
}
.lang-dropdown-menu li.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpMobile {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Mobile Responsiveness for Dropdown UL / LI */
@media (max-width: 640px) {
  .searchable-select-mobile-sheet {
    position: fixed !important;
    /* bottom is controlled by JS (keyboard offset) — do NOT override with !important */
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-height: 80vh !important;
    border-radius: 16px 16px 0 0 !important;
    z-index: 2147483647 !important;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.25) !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideUpMobile 0.2s ease-out !important;
    transition: bottom 0.15s ease !important;
    /* Respect iPhone home-indicator / notch */
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  .searchable-select-mobile-sheet ul.searchable-select-options {
    max-height: 55vh !important;
  }
  .searchable-select-mobile-sheet li.searchable-select-option {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  .lang-dropdown-menu,
  ul.lang-dropdown-menu {
    min-width: 160px !important;
  }
  .topbar-lang-btn {
    font-size: 13.5px !important;
    padding: 5px 8px !important;
  }
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.table-wrapper::-webkit-scrollbar { height: 5px; }
.table-wrapper::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 11px 16px; text-align: left; font-size: 11.5px; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--table-header); border-bottom: 1px solid var(--table-row-border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 16px; font-size: 13px; color: var(--text-primary);
  border-bottom: 1px solid var(--table-row-border); white-space: nowrap;
}

/* Light blue grid borders for bordered tables (overrides Bootstrap dark borders) */
.table-bordered > :not(caption) > * > * {
  border-color: var(--table-row-border) !important;
}
tbody tr:hover { background: #f5f8fc; }
tbody tr:nth-child(even) { background: var(--table-stripe); }
tbody tr:nth-child(even):hover { background: #edf2f9; }

.no-data {
  text-align: center; padding: 48px 20px; color: var(--text-secondary);
}
.no-data i { font-size: 40px; opacity: 0.25; display: block; margin-bottom: 12px; }
.no-data p { font-size: 13px; }

.table-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-secondary); background: #fafbfc;
}
.table-footer .total { font-weight: 600; color: var(--text-primary); }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border, #e2e8f0); background: #f8fafc; }
.tab-item {
  padding: 12px 20px; font-size: 13px; font-weight: 500; cursor: pointer;
  color: #64748b; border-bottom: 2.5px solid transparent;
  margin-bottom: -2px; transition: all 0.2s ease; user-select: none;
  display: inline-flex; align-items: center;
}
.tab-item:hover { color: #1e293b; background: #f1f5f9; }
.tab-item.active,
.tabs .tab-item.active {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-bottom-color: #2563eb !important;
  background: #ffffff !important;
  font-weight: 700 !important;
}
.tab-item.active *,
.tabs .tab-item.active * {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}
.tab-item.active i,
.tabs .tab-item.active i {
  color: #2563eb !important;
}

/* Attendance Specific */
.attendance-select {
  padding: 4px 8px; font-size: 12px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; color: var(--text-primary);
}
.attendance-select.present { border-color: #66bb6a; background: #e8f5e9; color: #2e7d32; }
.attendance-select.absent { border-color: #ef5350; background: #ffebee; color: #c62828; }
.attendance-select.late { border-color: #ffa726; background: #fff3e0; color: #e65100; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.badge-pending  { background: #fff3e0; color: #e65100; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.badge-rejected { background: #ffebee; color: #c62828; }
.badge-info     { background: var(--tag-bg); color: var(--tag-text); }
.badge-danger   { background: #fdf2f8; color: #db2777; }
.badge-success  { background: #f0fdf4; color: #15803d; }
.badge-warning  { background: #fffbeb; color: #b45309; }

/* Form Specific Styles */
.form-section { border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-bottom: 24px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.form-section h3 { font-size: 14px; color: var(--accent); margin-bottom: 20px; border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.form-full { grid-column: 1 / -1; }
.photo-upload { width: 120px; height: 150px; border: 2px dashed var(--border); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); cursor: pointer; background: #fafbfc; transition: all 0.2s; }
.photo-upload:hover { border-color: var(--accent); background: #eef4fc; color: var(--accent); }
.photo-preview { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: none; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.stat-icon.blue { background: #e3f2fd; color: #1565c0; }
.stat-icon.green { background: #e8f5e9; color: #2e7d32; }
.stat-icon.red { background: #ffebee; color: #c62828; }
.stat-icon.orange { background: #fff3e0; color: #e65100; }
.stat-info h4 { font-size: 22px; font-weight: 700; line-height: 1; }
.stat-info p { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; }

/* Footer */
.footer {
  padding: 10px 24px; background: var(--footer-bg); color: rgba(255,255,255,0.5);
  font-size: 12px; text-align: center; border-top: 1px solid rgba(255,255,255,0.06);
}

/* Page transitions */
.page { animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Checkbox */
.custom-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }

/* Selected table row highlight */
tr.row-selected { background-color: rgba(var(--accent-rgb, 59, 130, 246), 0.08) !important; }

/* Custom Toggle Switch */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--approve-bg); }
input:checked + .slider:before { transform: translateX(16px); }

/* --- MODAL STYLES --- */
.modal-overlay {
  position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background-color: #fff; width: 600px; max-width: 98vw; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  overflow: hidden; animation: slideDown 0.3s; display: flex; flex-direction: column;
}
/* Modal width size classes */
.w-600  { width: 600px;  max-width: 98vw; }
.w-700  { width: 700px;  max-width: 98vw; }
.w-800  { width: 800px;  max-width: 98vw; }
.w-900  { width: 900px;  max-width: 98vw; }
.w-1000 { width: 1000px; max-width: 98vw; }
.w-1100 { width: 1100px; max-width: 98vw; }
.w-1200 { width: 1200px; max-width: 98vw; }
.w-full { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }

/* Modal Bootstrap Container width */
.modal-content.container,
.modal-content.modal-container,
.modal-container,
.modal-content:has(.form-grid),
.modal-content:has(form.form-container),
.modal-content.modal-add-edit {
  width: 100%;
  max-width: 1140px;
}
@media (min-width: 1400px) {
  .modal-content.container,
  .modal-content.modal-container,
  .modal-container,
  .modal-content:has(.form-grid),
  .modal-content:has(form.form-container),
  .modal-content.modal-add-edit {
    max-width: 1320px;
  }
}
@media (max-width: 1200px) {
  .modal-content.container,
  .modal-content.modal-container,
  .modal-container,
  .modal-content:has(.form-grid),
  .modal-content:has(form.form-container),
  .modal-content.modal-add-edit {
    max-width: 960px;
  }
}
@media (max-width: 992px) {
  .modal-content.container,
  .modal-content.modal-container,
  .modal-container,
  .modal-content:has(.form-grid),
  .modal-content:has(form.form-container),
  .modal-content.modal-add-edit {
    max-width: 96vw;
  }
}

/* Modal Group Bottom Horizontal Scrollbar */
.modal-group-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
.modal-group-scroll::-webkit-scrollbar {
  height: 6px;
}
.modal-group-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.modal-group-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.modal-group-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Bootstrap Container style for input forms */
.form-container,
.input-form-container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 1400px) {
  .form-container,
  .input-form-container {
    max-width: 1320px;
  }
}
@media (max-width: 1200px) {
  .form-container,
  .input-form-container {
    max-width: 960px;
  }
}

/* Form sticky footer / action bar */
.form-sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  background: #f8fafc;
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}
.form-sticky-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

@keyframes slideDown { from {transform: translateY(-20px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
.modal-header {
  padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
  background: #f8fafc; flex-shrink: 0;
}
.modal-header h3 { margin: 0; font-size: 16px; color: var(--accent); }
.modal-close { cursor: pointer; font-size: 22px; color: var(--text-secondary); line-height: 1; }
.modal-body { padding: 20px; max-height: 78vh; overflow-y: auto; flex: 1; min-height: 0; }
.modal-body.no-padding { padding: 0; overflow: hidden; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  flex-shrink: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.modal-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

/* Modal Language Tabs Pill Bar */
.modal-lang-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9 !important;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #cbd5e1 !important;
}

.modal-lang-tab-btn {
  border: none;
  background: transparent;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-lang-tab-btn * {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

.modal-lang-tab-btn:hover:not(.active) {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
.modal-lang-tab-btn:hover:not(.active) * {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.modal-lang-tab-btn.active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border-color: #ea580c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
}
.modal-lang-tab-btn.active * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.modal-lang-tab-btn .flag-icon-img,
.modal-lang-tab-btn .flag-icon {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.modal-footer.text-center,
.modal-footer[style*="text-align: center"],
.modal-footer[style*="text-align:center"] {
  justify-content: center !important;
}

.modal-footer > div:not(.modal-footer-left):not(.modal-footer-right) {
  display: flex !important;
  align-items: center !important;
  justify-content: inherit !important;
  gap: 16px !important;
}

/* Clear margins inside flex modal-footer so gap controls exact 16px spacing */
.modal-footer button,
.modal-footer .btn {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.modal-footer .mr-5,
.modal-footer button.mr-5,
.modal-footer .btn.mr-5 {
  margin-right: 0 !important;
}

/* Universal spacing between Cancel / Secondary and Save / Primary buttons */
.mr-5 {
  margin-right: 16px !important;
}

.mr-5 + button,
.mr-5 + .btn {
  margin-left: 0 !important;
}

button.btn-outline + button.bg-green,
button.bg-warning + button.bg-green,
button.btn-secondary + button.bg-green,
button.btn-outline + button.btn-primary,
button.bg-warning + button.btn-primary,
button.btn-secondary + button.btn-primary,
.btn-outline + .bg-green,
.bg-warning + .bg-green,
.btn-secondary + .bg-green,
.btn-outline + .btn-primary,
.bg-warning + .btn-primary,
.btn-secondary + .btn-primary,
button + button.bg-green,
button + button.btn-primary,
.btn + .bg-green,
.btn + .btn-primary {
  margin-left: 16px !important;
}

@supports (gap: 16px) {
  .modal-footer button.btn-outline + button.bg-green,
  .modal-footer button.bg-warning + button.bg-green,
  .modal-footer button.btn-secondary + button.bg-green,
  .modal-footer button.btn-outline + button.btn-primary,
  .modal-footer button.bg-warning + button.btn-primary,
  .modal-footer button.btn-secondary + button.btn-primary,
  .modal-footer .btn-outline + .bg-green,
  .modal-footer .bg-warning + .bg-green,
  .modal-footer .btn-secondary + .bg-green,
  .modal-footer .btn-outline + .btn-primary,
  .modal-footer .bg-warning + .btn-primary,
  .modal-footer .btn-secondary + .btn-primary,
  .modal-footer button + button.bg-green,
  .modal-footer button + button.btn-primary,
  .modal-footer .btn + .bg-green,
  .modal-footer .btn + .btn-primary,
  .modal-footer > div button + button.bg-green,
  .modal-footer > div .btn + .bg-green,
  .modal-footer > div button + button.btn-primary,
  .modal-footer > div .btn + .btn-primary {
    margin-left: 0 !important;
  }
}

/* Permission Grid */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 5px; }
.perm-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-main); }

/* Discipline type colors */
.discipline-warn { color: #e65100; }
.discipline-minor { color: #f9a825; }
.discipline-major { color: #c62828; }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { width: 220px; min-width: 220px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    z-index: 200;
    height: 100vh;
    width: 270px;
    min-width: 270px;
    transition: left 0.28s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }
  .sidebar.mobile-open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
  }
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Hamburger toggle button — only visible on mobile */
.sidebar-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  background: var(--sidebar-bg, #0f2439);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background 0.2s;
}
.sidebar-hamburger:hover { background: var(--sidebar-hover, #1a3454); }
@media (max-width: 768px) {
  .sidebar-hamburger { display: flex; }
}

/* Dark overlay behind sidebar on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(1px);
}
@media (max-width: 768px) {
  .sidebar-overlay { display: block; }
}

/* Scrollbar for sidebar */
.sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }


/* -----------------------------------------------------------
   PRINT STYLES & TEMPLATE (Khmer PDF Layout)
   ----------------------------------------------------------- */
#print-container {
  display: none; /* Hidden on screen */
  font-family: 'Hanuman', 'KhmerOS Battambang', serif;
  background: white;
  color: #000;
  padding: 20px;
  width: 210mm; /* A4 width */
  margin: 0 auto;
}

.print-header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #1565c0;
  padding-bottom: 10px;
}
.print-header h1 { font-size: 16pt; margin-bottom: 4px; font-weight: bold; }
.print-header h2 { font-size: 16pt; margin-bottom: 4px; font-weight: bold; }
.print-header h3 { font-size: 18pt; margin-bottom: 15px; font-weight: bold; text-decoration: underline; }
.print-header p { font-size: 12pt; margin: 2px 0; }

.print-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13pt;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  font-size: 12pt;
}
.print-table th, .print-table td {
  border: 1px solid #1565c0;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
}
.print-table th { background-color: #f0f0f0; }
.print-table .col-no { width: 40px; }
.print-table .col-name { width: 150px; text-align: left; }
.print-table .col-gender { width: 50px; }
.print-table .col-dob { width: 100px; }
.print-table .col-pob { width: 140px; }
.print-table .col-address { width: 140px; text-align: left;}
.print-table .col-class { width: 50px; }

.print-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  font-size: 13pt;
}

.print-signatures {
  display: flex;
  justify-content: space-between;
  text-align: center;
  margin-top: 50px;
}
.sign-box { width: 45%; }
.sign-title { margin-bottom: 40px; font-size: 13pt; }
.sign-line { border-top: 1px solid #1565c0; width: 60%; margin: 0 auto; }
.sign-name { margin-top: 5px; font-size: 13pt; }
.sign-role { font-size: 12pt; }

@media print {
  @page { margin: 8mm 10mm; size: A4 portrait; }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .no-print, .sidebar, .navbar, .top-nav, .page-header, .modal-header, .modal-footer, .modal-close, button, .btn {
    display: none !important;
  }
  .modal-overlay, .modal, .modal-content, .modal-body {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .print-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* --- School Info Specific Styles (from original) --- */
.school-header-banner {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 50%, #1a237e 100%);
  padding: 28px 28px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}
.school-header-banner::before {
  content: ''; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px;
  background: rgba(255,255,255,0.04); border-radius: 50%;
}
.school-header-banner::after {
  content: ''; position: absolute; bottom: -60px; right: 80px; width: 120px; height: 120px;
  background: rgba(255,255,255,0.03); border-radius: 50%;
}
.school-header-banner h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; position: relative; }
.school-header-banner p { font-size: 13px; opacity: 0.8; position: relative; }
.school-header-banner .school-code-badge {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.5px; border: 1px solid rgba(255,255,255,0.1);
}

.section-divider {
  display: flex; align-items: center; gap: 12px; margin: 24px 0 16px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.section-divider::after {
  content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent);
}

.info-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { width: 180px; min-width: 180px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; }
.info-value { font-size: 14px; font-weight: 500; color: var(--text-primary); }

.upload-area {
  border: 2px dashed var(--border); border-radius: 10px; padding: 28px;
  text-align: center; cursor: pointer; transition: all .2s; background: #fafbfc;
}
.upload-area:hover { border-color: var(--accent); background: var(--tag-bg); }
.upload-area i { font-size: 28px; color: var(--accent); margin-bottom: 8px; }
.upload-area p { font-size: 12px; color: var(--text-secondary); }

.logo-preview {
  width: 90px; height: 90px; border: 2px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; background: #f8fafc;
  overflow: hidden; flex-shrink: 0;
}
.logo-preview i { font-size: 32px; color: var(--accent); }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0; }
.checkbox-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* Session picker cards (Declare Class) */
.session-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.session-option {
  position: relative;
  flex: 1;
  min-width: 150px;
  max-width: 220px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 14px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
  user-select: none;
}
.session-option:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}
.session-option.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}
.session-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.session-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
  background: #f1f5f9;
  color: #64748b;
  transition: background .2s, color .2s;
}
.session-option.selected .session-option-icon {
  background: var(--accent);
  color: #fff;
}
.session-option-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
}
.session-option-hint {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.session-option-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  background: #fff;
  transition: all .2s;
}
.session-option.selected .session-option-check {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.session-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.session-badge i {
  font-size: 12px;
}
.session-table-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--accent);
}

.map-placeholder {
  width: 100%; height: 200px; background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-radius: 10px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; border: 1px solid #90caf9; position: relative; overflow: hidden;
}
.map-placeholder i { font-size: 36px; color: #1565c0; margin-bottom: 8px; position: relative; z-index: 1; }
.map-placeholder p { font-size: 12px; color: #1565c0; font-weight: 500; position: relative; z-index: 1; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.green { background: var(--approve-bg); }
.status-dot.red { background: var(--reject-bg); }

/* Toast / Alert Positioned at Top Center of Screen for All Devices */
#toast {
  position: fixed !important;
  top: 24px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -20px) scale(0.96) !important;
  z-index: 9999999 !important;
  opacity: 0 !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  margin: 0 !important;
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
}

#toast.visible {
  opacity: 1 !important;
  transform: translate(-50%, 0) scale(1) !important;
  pointer-events: auto !important;
}

.toast-container {
  border-radius: 50px !important;
  padding: 10px 24px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 10px !important;
  min-width: 180px !important;
  max-width: min(92vw, 560px) !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  background-color: #28a745 !important;
  background: #28a745 !important;
  margin: 0 auto !important;
}

#toast .toast-container,
#toast .toast-container.toast-success,
.toast-container.toast-success,
.toast-container:not(.toast-error):not(.toast-warning):not(.toast-info),
.alert-success {
  background-color: #28a745 !important;
  background: #28a745 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(40, 167, 69, 0.3) !important;
}

#toast .toast-container *,
#toast .toast-title,
#toast .toast-message,
#toast #toastMsg,
#toast .toast-icon,
#toast i,
#toast span,
#toast div {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.toast-icon {
  font-size: 18px !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.toast-content {
  display: inline-flex !important;
  align-items: center !important;
}

.toast-title {
  display: none !important;
}

.toast-message {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  color: #ffffff !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

#toast .toast-container.toast-error {
  background-color: #dc3545 !important;
  background: #dc3545 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

#toast .toast-container.toast-warning {
  background-color: #f59e0b !important;
  background: #f59e0b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

#toast .toast-container.toast-info {
  background-color: #0284c7 !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

/* Mobile & tablet responsiveness for toast / alerts */
@media (max-width: 768px) {
  #toast {
    top: 14px !important;
    left: 50% !important;
    max-width: calc(100vw - 20px) !important;
    width: auto !important;
    transform: translate(-50%, -10px) scale(0.96) !important;
  }
  #toast.visible {
    transform: translate(-50%, 0) scale(1) !important;
  }
  #toast .toast-container {
    padding: 8px 18px !important;
    min-width: 160px !important;
    max-width: calc(100vw - 24px) !important;
    gap: 8px !important;
    border-radius: 50px !important;
  }
  #toast .toast-icon {
    font-size: 16px !important;
  }
  #toast .toast-title {
    display: none !important;
  }
  #toast .toast-message {
    font-size: 13.5px !important;
    white-space: normal !important;
  }
}

.alert {
  border-radius: 8px !important;
}

.alert-success {
  background-color: #28a745 !important;
  border-color: #218838 !important;
  color: #ffffff !important;
}

.alert-success * {
  color: #ffffff !important;
}

/* --- Utility Classes --- */
.cursor-pointer { cursor: pointer; }
.d-none { display: none; }
.d-flex { display: flex; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-reject { color: var(--reject-bg); }
.ml-5 { margin-left: 5px; }
.p-20 { padding: 20px; }
.p-40 { padding: 40px; }
.p-50 { padding: 50px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.min-h-60 { min-height: 60px; }
.min-h-80 { min-height: 80px; }
.fw-600 { font-weight: 600; }
.fs-11 { font-size: 12px; }
.fs-15 { font-size: 15px; }
.fs-18 { font-size: 18px; }
.fs-22 { font-size: 22px; }
.fs-24 { font-size: 24px; }
.fs-32 { font-size: 32px; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: #666; }
.flex-items-center-gap10 { display: flex; align-items: center; gap: 10px; }
.flex-align-start-gap20 { display: flex; align-items: flex-start; gap: 20px; }
.flex-1 { flex: 1; }
.grid-1col-gap15 { display: grid; grid-template-columns: 1fr; gap: 15px; }
.grid-2col-gap15 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.grid-2col-gap20 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4col-gap20 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.col-span-2 { grid-column: span 2; }
.loading-box { padding: 40px; text-align: center; }
.divider-v { width: 1px; height: 24px; background: var(--border); }
.header-icon { color: var(--text-secondary); cursor: pointer; font-size: 15px; }
.border-none { border: none !important; }
.shadow-none { box-shadow: none !important; }
.p-24 { padding: 24px; }
.mb-4 { margin-bottom: 4px; }
.mr-4 { margin-right: 4px; }
.mr-8 { margin-right: 8px; }
.italic { font-style: italic; }
.font-mono { font-family: monospace; }
.ls-2 { letter-spacing: 2px; }
.border-top { border-top: 1px solid var(--border); }
.overflow-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.max-w-200 { max-width: 200px; }
.pb-25 { padding-bottom: 25px; }
.pt-25 { padding-top: 25px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.w-100 { width: 100px; }
.h-80 { height: 80px; }
.max-h-400-auto { max-height: 400px; overflow-y: auto; }
.bg-white { background: #fff; }
.bg-slate { background: #f8fafc; }
.border { border: 1px solid var(--border); }
.rounded-8 { border-radius: 8px; }
.m-0 { margin: 0; }
.mb-2 { margin-bottom: 2px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-32 { margin-bottom: 32px; }
.p-0 { padding: 0; }
.p-10 { padding: 10px; }
.p-16-20 { padding: 16px 20px; }
.pb-5 { padding-bottom: 5px; }
.pb-12 { padding-bottom: 12px; }
.border-b-1 { border-bottom: 1px solid var(--border); }
.border-b-2 { border-bottom: 2px solid var(--border); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.text-primary { color: var(--text-primary); }
.text-accent { color: var(--accent); }
.grid-cols-auto-240 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,#1565c0,#42a5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.grid-cols-auto-400 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.list-none { list-style: none; }
.p-10-0 { padding: 10px 0; }
.fs-48 { font-size: 48px; }
.text-border { color: var(--border); }
.mb-15 { margin-bottom: 15px; }
.stat-icon.purple { background: #f3e5f5; color: #7b1fa2; }
.align-end { align-items: flex-end; }
.bg-light { background: #f8f9fa; }
.semester-row { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr auto; gap: 10px; margin-bottom: 10px; padding: 10px; background: #f8f9fa; border-radius: 4px; }
.week-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  border-top: 5px solid var(--accent);
  transition: all 0.2s ease;
}
.week-card.exam {
  background: linear-gradient(135deg, #fffcfc, #fff);
  border-top-color: var(--reject-bg);
}
.week-number {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.week-number.exam { background: var(--reject-bg); }
.week-dates-box { background: #f8fafc; padding: 10px; border-radius: 8px; border: 1px solid #edf2f7; }
.fs-10 { font-size: 10px; }
.p-2-8 { padding: 2px 8px; }
.p-60 { padding: 60px; }
.opacity-2 { opacity: 0.2; }
.border-dashed { border: 1px dashed var(--border); }
.rounded-10 { border-radius: 10px; }
.flex-items-center-gap6 { display: flex; align-items: center; gap: 6px; }

/* --- Define Schedule Page Styles --- */
.custom-shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

/* Custom scrollbar for table container */
.table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.flex-items-center-gap8 { display: flex; align-items: center; gap: 8px; }
.w-14 { width: 14px; }
.text-approve { color: var(--approve-bg); }
.justify-end { justify-content: flex-end; }
.align-start { align-items: flex-start; }
.mt-4 { margin-top: 4px; }
.gap-6 { gap: 6px; }

.bg-gray-100 { background: #f0f0f0; }
.rounded-4 { border-radius: 4px; }
.w-900 { width: 900px !important; }

.w-50 { width: 50px; }
.badge-accent { background: var(--accent); color: #fff; }
.gap-5 { gap: 5px; }
.mr-auto { margin-right: auto; }
.p-8 { padding: 8px; }
.fw-500 { font-weight: 500; }
.fw-bold { font-weight: bold; }

/* Schedule Table Styles */
.schedule-table th, .schedule-table td { border: 1px solid var(--table-row-border); padding: 10px; text-align: center; }
.schedule-slot { cursor: pointer; transition: background 0.2s; min-width: 80px; min-height: 50px; }
.schedule-slot:hover { background: #f0f7ff; }
.slot-content { font-size: 12px; }
.slot-subject { font-weight: bold; color: var(--accent); }
.slot-teacher { font-size: 12px; color: var(--text-secondary); }
.slot-empty { color: #ccc; font-size: 18px; }

/* Compact Table and Table Input Styles */
.table-sm th,
.table-sm td {
  padding: 6px 10px;
}
.table-input {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
  background: #ffffff;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.table-input:not(:disabled):hover {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #f8fafc;
}
.table-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.1);
  background: #ffffff;
}
.table-input:disabled {
  background: #f0f2f5;
  color: var(--text-secondary);
  cursor: not-allowed;
  border-color: var(--border);
}

/* Excel Spreadsheet style for score input cells */
.excel-score-input {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  box-sizing: border-box;
  transition: all 0.1s ease;
}
.excel-score-input:not(:disabled):hover {
  border-color: #3b82f6;
  background-color: #f0fdf4 !important;
}
.excel-score-input:focus {
  outline: 2px solid #2563eb !important;
  outline-offset: -1px !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1px #93c5fd !important;
  background-color: #eff6ff !important;
  z-index: 5;
  position: relative;
}
.excel-score-input:disabled {
  background-color: #f8fafc !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed;
}

/* Design Curriculum table: fit columns to headers and scroll horizontally */
.design-curriculum-table-wrapper {
  overflow-x: scroll;
  max-width: 100%;
}

.design-curriculum-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.design-curriculum-table-wrapper::-webkit-scrollbar-thumb {
  background: #c8cdd4;
  border-radius: 4px;
}

.design-curriculum-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.design-curriculum-table th,
.design-curriculum-table td {
  max-width: none;
}

.design-curriculum-table td:nth-child(2) {
  white-space: normal;
}

/* Light blue background + grid borders on each curriculum row */
.design-curriculum-table thead th,
.design-curriculum-table tbody td {
  border: 1px solid var(--table-row-border) !important;
}

.design-curriculum-table tbody tr {
  background: var(--tag-bg);
}

.design-curriculum-table tbody tr:nth-child(even) {
  background: #d9ecfd;
}

.design-curriculum-table tbody tr:hover {
  background: #c5e3fc;
}

.design-curriculum-table tbody tr.row-disabled {
  background: var(--table-stripe);
}

.design-curriculum-table tbody tr.row-disabled:hover {
  background: #eef2f7;
}

/* Media Manager Styles */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-item {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card-bg);
}

.media-item.folder {
  background: #f0fdf4;
}

.media-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

.media-item.selected {
  border-color: var(--accent);
  background: #eff6ff;
}

.media-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  overflow: hidden;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-info {
  padding: 10px;
}

.media-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.media-delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(198, 40, 40, 0.9);
  color: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.media-item:hover .media-delete-btn {
  opacity: 1;
}

.media-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.media-details-preview {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
}

.media-details-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-details-info {
  flex: 1;
  min-width: 250px;
}

.detail-row {
  display: flex;
  margin-bottom: 10px;
  font-size: 14px;
}

.detail-row strong {
  width: 100px;
  color: var(--text-primary);
}

.detail-row span {
  flex: 1;
  color: var(--text-secondary);
}

.media-list .media-item {
  display: flex;
  align-items: center;
  padding: 10px;
  height: auto;
}

.media-list .media-preview {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.media-list .media-info {
  flex: 1;
  margin-left: 10px;
}

/* Custom Blue Border Overrides */
.form-control, .filter-select, .filter-input {
  border: 1px solid #90caf9 !important;
}
.form-control:focus, .filter-select:focus, .filter-input:focus {
  border-color: #1565c0 !important;
  box-shadow: 0 0 0 2px rgba(21,101,192,0.2) !important;
}
.card {
  border: 1px solid #90caf9 !important;
}
.table-bordered, .table-bordered th, .table-bordered td {
  border: 1px solid #90caf9 !important;
}

/* Custom shadow for cards */
.custom-shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

/* Define Schedule Page Styles */
.define-schedule-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background-color: #f1f5f9;
}

.define-schedule-section {
  background-color: #ffffff;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.define-schedule-section.space-y {
  margin-bottom: 16px;
}

.define-schedule-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 16px;
  color: #1e293b;
}

.define-schedule-title.large {
  font-size: 20px;
}

.define-schedule-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .define-schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.define-schedule-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475569;
}

.define-schedule-select-wrapper {
  position: relative;
}

.define-schedule-select {
  width: 100%;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px;
  background-color: #ffffff;
  outline: none;
  appearance: none;
  padding-right: 32px;
}

.define-schedule-select:focus {
  border-color: #0284c7;
}

.define-schedule-select-icons {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: 8px;
  pointer-events: none;
  color: #94a3b8;
  gap: 4px;
  font-size: 10px;
}

.define-schedule-select-icons .fa-xmark {
  margin-right: 4px;
  cursor: pointer;
  pointer-events: auto;
}

.define-schedule-select-icons .fa-xmark:hover {
  color: #475569;
}

.define-schedule-btn-search {
  width: 100%;
  max-width: 144px;
  background-color: #0284c7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}

.define-schedule-btn-search:hover {
  background-color: #0369a1;
}

.define-schedule-header-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

@media (min-width: 1024px) {
  .define-schedule-header-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.define-schedule-semester-group {
  display: inline-flex;
  border-radius: 4px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.define-schedule-semester-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid;
  cursor: pointer;
}

.define-schedule-semester-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.define-schedule-semester-btn:last-child {
  border-radius: 0 4px 4px 0;
  border-left: none;
}

.define-schedule-semester-btn.active {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.define-schedule-semester-btn.inactive {
  background-color: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}

.define-schedule-semester-btn.inactive:hover {
  background-color: #f8fafc;
}

.define-schedule-version-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.define-schedule-version-label {
  color: #64748b;
  font-weight: 500;
}

.define-schedule-version-select {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px;
  background-color: #ffffff;
  font-weight: 500;
  outline: none;
  color: #334155;
}

.define-schedule-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.define-schedule-btn {
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  cursor: pointer;
  font-size: 12px;
}

.define-schedule-btn-white {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.define-schedule-btn-white:hover {
  background-color: #f8fafc;
}

.define-schedule-btn-sky-700 {
  background-color: #0369a1;
  color: #ffffff;
}

.define-schedule-btn-sky-700:hover {
  background-color: #075985;
}

.define-schedule-btn-rose-500 {
  background-color: #f43f5e;
  color: #ffffff;
}

.define-schedule-btn-rose-500:hover {
  background-color: #e11d48;
}

.define-schedule-btn-sky-500 {
  background-color: #0ea5e9;
  color: #ffffff;
}

.define-schedule-btn-sky-500:hover {
  background-color: #0284c7;
}

.define-schedule-btn-sky-600 {
  background-color: #0284c7;
  color: #ffffff;
}

.define-schedule-btn-sky-600:hover {
  background-color: #0369a1;
}

.define-schedule-btn-add {
  background-color: #0369a1;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  cursor: pointer;
}

.define-schedule-btn-add:hover {
  background-color: #075985;
}

.define-schedule-table-container {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  max-height: 500px;
}

.define-schedule-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  color: #475569;
}

.define-schedule-table thead tr {
  background-color: #f8fafc;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  font-weight: bold;
}

.define-schedule-table th {
  padding: 12px;
  border-right: 1px solid #e2e8f0;
}

.define-schedule-table th.w-32 {
  width: 128px;
}

.define-schedule-table th.w-24 {
  width: 96px;
}

.define-schedule-table th.class-header {
  padding: 6px;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.define-schedule-table tbody {
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.define-schedule-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
}

.define-schedule-table td {
  padding: 12px;
  border-right: 1px solid #e2e8f0;
}

.define-schedule-table td.day-cell {
  padding: 16px;
  font-weight: 600;
  color: #1e293b;
  font-size: 16px;
}

.define-schedule-table td.session-cell {
  padding: 16px;
  font-weight: 500;
  color: #475569;
}

.define-schedule-table td.session-cell.afternoon {
  color: #94a3b8;
}

.define-schedule-table td.period-cell {
  padding: 12px;
  background-color: rgba(248, 250, 252, 0.5);
  font-weight: bold;
}

.define-schedule-table td.period-cell.afternoon {
  color: #94a3b8;
}

.define-schedule-table td.subject-cell {
  padding: 8px;
  text-align: left;
  padding-left: 16px;
}

.define-schedule-table td.subject-cell.afternoon {
  background-color: rgba(248, 250, 252, 0.2);
}

.define-schedule-table tr.afternoon-row {
  background-color: rgba(248, 250, 252, 0.3);
}

.define-schedule-subject-select-wrapper {
  position: relative;
  width: 100%;
  max-width: 448px;
}

.define-schedule-subject-select {
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  appearance: none;
  padding-right: 32px;
}

.define-schedule-subject-select-icons {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: 8px;
  pointer-events: none;
  color: #94a3b8;
  gap: 4px;
  font-size: 9px;
}

.define-schedule-subject-select-icons .fa-xmark {
  margin-right: 2px;
  cursor: pointer;
  pointer-events: auto;
}

.define-schedule-subject-select-icons .fa-xmark:hover {
  color: #475569;
}

.text-sky-600 {
  color: #0284c7;
}

.text-sky-500 {
  color: #0ea5e9;
}

/* Define Schedule Table Sticky Columns */
/* ── Schedule Table Sticky Scroll Container ── */
.schedule-table-wrap {
  max-height: calc(100vh - 320px);
  overflow: auto;
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.schedule-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.schedule-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.schedule-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.schedule-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ── Sticky THEAD rows (vertical scroll) ── */
.table-sticky-first thead tr:nth-child(1) {
  position: sticky;
  top: 0;
  z-index: 4;
}
.table-sticky-first thead tr:nth-child(2) {
  position: sticky;
  top: var(--first-row-h, 42px);
  z-index: 4;
}

/* ── Regular class headers in THEAD (no sticky positioning, lowest z-index) ── */
.table-sticky-first thead th:not(.sticky-col-day):not(.sticky-col-session):not(.sticky-col-period),
.table-sticky-first thead th.grade-level-header,
.table-sticky-first thead th.class-header {
  position: static !important;
  z-index: 0 !important;
}

/* Ensure grade-active headers also stay behind sticky columns */
.table-sticky-first thead .grade-level-header.grade-active {
  position: static !important;
  z-index: -1 !important;
  left: auto !important;
  background: var(--table-header) !important;
  box-shadow: none !important;
}

/* ── Sticky LEFT columns in THEAD (corner cells = highest z with solid background) ── */
.table-sticky-first thead .sticky-col-day {
  position: sticky !important;
  left: 0 !important;
  z-index: 100 !important;
  background: #f8fafc !important;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1) !important;
}
.table-sticky-first thead .sticky-col-session {
  position: sticky !important;
  left: 120px !important;
  z-index: 100 !important;
  background: #f8fafc !important;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1) !important;
}
.table-sticky-first thead .sticky-col-period {
  position: sticky !important;
  left: 240px !important;
  z-index: 100 !important;
  background: #f8fafc !important;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1) !important;
}

/* ── Sticky LEFT columns in TBODY ── */
.table-sticky-first tbody .sticky-col-day {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffffff;
}
.table-sticky-first tbody .sticky-col-session {
  position: sticky;
  left: 120px;
  z-index: 3;
  background: #ffffff;
}
.table-sticky-first tbody .sticky-col-session.afternoon {
  background: #f8fafc;
}
.table-sticky-first tbody .sticky-col-period {
  position: sticky;
  left: 240px;
  z-index: 3;
  background: white;
}

/* Sticky grade level header — only the .grade-active one becomes sticky */
.table-sticky-first thead .grade-level-header.grade-active {
  position: sticky !important;
  left: 320px !important;
  z-index: 6 !important;
  background: var(--table-header) !important;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1) !important;
}

/* ── Shadow indicators when scrolled ── */
.schedule-table-wrap.is-scrolled-x .sticky-col-day,
.schedule-table-wrap.is-scrolled-x .sticky-col-session,
.schedule-table-wrap.is-scrolled-x .sticky-col-period {
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
}
.schedule-table-wrap.is-scrolled-y thead tr:nth-child(2) {
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
}

.border-left {
  border-left: 1px solid var(--table-row-border) !important;
}

.bg-slate {
  background: var(--table-header) !important;
}

.min-w-200 {
  min-width: 120px;
}

.min-w-150 {
  min-width: 120px;
}

.text-center {
  text-align: center;
}

.fs-12 {
  font-size: 12px;
}

.font-bold {
  font-weight: bold;
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.py-1 {
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Define Schedule Styles */
.define-schedule-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.define-schedule-section {
  background: white;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.define-schedule-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 16px;
  color: #1e293b;
}

.define-schedule-title.large {
  font-size: 20px;
}

.define-schedule-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .define-schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.define-schedule-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.define-schedule-select-wrapper {
  position: relative;
}

.define-schedule-select {
  width: 100%;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px;
  background: white;
  outline: none;
  appearance: none;
  padding-right: 32px;
}

.define-schedule-select:focus {
  border-color: #0ea5e9;
}

.define-schedule-select-icons {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: 8px;
  pointer-events: none;
  gap: 4px;
  font-size: 10px;
  color: #94a3b8;
}

.define-schedule-select-icons .fa-xmark {
  margin-right: 4px;
  cursor: pointer;
  pointer-events: auto;
}

.define-schedule-select-icons .fa-xmark:hover {
  color: #64748b;
}

.define-schedule-btn-search {
  width: 100%;
  max-width: 144px;
  background: #0284c7;
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  padding: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.define-schedule-btn-search:hover {
  background: #0369a1;
}

.define-schedule-section.space-y {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.define-schedule-header-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
}

@media (min-width: 1024px) {
  .define-schedule-header-row {
    flex-direction: row;
    align-items: center;
  }
}

.define-schedule-semester-group {
  display: inline-flex;
  border-radius: 4px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.define-schedule-semester-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid;
  cursor: pointer;
}

.define-schedule-semester-btn.active {
  background: #0284c7;
  color: white;
  border-color: #0284c7;
}

.define-schedule-semester-btn.inactive {
  background: white;
  color: #475569;
  border-color: #cbd5e1;
  border-left: none;
}

.define-schedule-semester-btn.inactive:hover {
  background: #f8fafc;
}

.define-schedule-version-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.define-schedule-version-label {
  color: #64748b;
  font-weight: 500;
}

.define-schedule-version-select {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px;
  background: white;
  font-weight: 500;
  outline: none;
  color: #334155;
}

.define-schedule-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.define-schedule-btn {
  padding: 8px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.define-schedule-btn-white {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.define-schedule-btn-white:hover {
  background: #f8fafc;
}

.define-schedule-btn-sky-700 {
  background: #0369a1;
  color: white;
}

.define-schedule-btn-sky-700:hover {
  background: #075985;
}

.define-schedule-btn-rose-500 {
  background: #f43f5e;
  color: white;
}

.define-schedule-btn-rose-500:hover {
  background: #e11d48;
}

.define-schedule-btn-sky-500 {
  background: #0ea5e9;
  color: white;
}

.define-schedule-btn-sky-500:hover {
  background: #0284c7;
}

.define-schedule-btn-sky-600 {
  background: #0284c7;
  color: white;
}

.define-schedule-btn-sky-600:hover {
  background: #0369a1;
}

.define-schedule-btn-add {
  background: #0369a1;
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.define-schedule-btn-add:hover {
  background: #075985;
}

.define-schedule-table-container {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  max-height: 620px;
}

.table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.define-schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  color: #475569;
}

.define-schedule-table thead {
  background: var(--table-header);
}

.define-schedule-table thead tr {
  color: var(--text-primary);
  border-bottom: 1px solid var(--table-row-border);
  text-align: center;
  font-weight: bold;
}

.define-schedule-table th {
  padding: 12px;
  border-right: 1px solid var(--table-row-border);
}

.define-schedule-table th.w-32 {
  width: 128px;
}

.define-schedule-table th.w-24 {
  width: 96px;
}

.table-sticky-first th.grade-level-header {
  background: var(--table-header);
  text-align: center;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  border: 1px solid #90caf9 !important;
  white-space: nowrap;
  position: static !important;
  z-index: 0 !important;
}

.table-sticky-first th.class-header {
  background: var(--table-header);
  text-align: center;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
  border: 1px solid #90caf9 !important;
  position: static !important;
  z-index: 0 !important;
}

.define-schedule-table tbody {
  text-align: center;
}

.define-schedule-table tbody tr {
  border-top: 1px solid #e2e8f0;
}

.define-schedule-table tbody tr.afternoon-row {
  background: rgba(248, 250, 252, 0.3);
}

.define-schedule-table tbody tr.day-start-row {
  border-top: 2px solid #cbd5e1;
}

.define-schedule-table td {
  padding: 12px;
  border-right: 1px solid #e2e8f0;
}

.define-schedule-table td.day-cell {
  padding: 16px;
  font-weight: 600;
  color: #1e293b;
  font-size: 16px;
}

.define-schedule-table td.session-cell {
  padding: 16px;
  font-weight: 500;
  color: #475569;
}

.define-schedule-table td.session-cell.afternoon {
  color: #94a3b8;
}

.define-schedule-table td.period-cell {
  padding: 12px;
  background: rgba(248, 250, 252, 0.5);
  font-weight: bold;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.08);
}

.define-schedule-table th.w-24 {
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.08);
}

.define-schedule-table td.period-cell.afternoon {
  color: #94a3b8;
}

.define-schedule-table td.subject-cell {
  padding: 8px 16px;
  text-align: left;
}

.define-schedule-table td.subject-cell.afternoon {
  background: rgba(248, 250, 252, 0.2);
}

.define-schedule-subject-select-wrapper {
  position: relative;
  width: 100%;
  max-width: 220px;
  min-width: 160px;
}

.define-schedule-subject-select {
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px;
  background: white;
  color: #1e293b;
  outline: none;
  appearance: none;
  padding-right: 32px;
}

.define-schedule-subject-select-icons {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: 8px;
  pointer-events: none;
  gap: 4px;
  font-size: 9px;
  color: #94a3b8;
}

.define-schedule-subject-select-icons .fa-xmark {
  margin-right: 2px;
  cursor: pointer;
  pointer-events: auto;
}

.define-schedule-subject-select-icons .fa-xmark:hover {
  color: #64748b;
}

/* Permissions Modal Styles */
.permissions-container {
  max-height: 500px;
  overflow-y: auto;
}

.permissions-header {
  display: grid;
  grid-template-columns: 40px 1fr 200px;
  gap: 10px;
  padding: 10px;
  background: var(--accent-bg);
  border-radius: 5px;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 10;
}

.perm-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  text-align: center;
  font-size: 12px;
}

.permission-group {
  margin-bottom: 20px;
}

.permission-group-title {
  font-weight: bold;
  padding: 10px;
  background: var(--border);
  margin-bottom: 5px;
  border-radius: 3px;
}

.permission-item {
  display: grid;
  grid-template-columns: 40px 1fr 200px;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.permission-item:hover {
  background: var(--accent-bg);
}

.perm-name {
  font-size: 12px;
}

.perm-actions input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY RULES
   - All title / heading font sizes must be smaller than 14px (< 14px) -> 13.5px
   - All links, paragraphs, table cells, inputs, labels, and other text must be smaller than 13px (< 13px) -> 12px / 12.5px
   ========================================================================== */

/* Titles and Headings (< 14px) */
h1, h2, h3, h4, h5, h6,
.title, .page-header h2, .card-header, .card-header h2, .card-header h3, .card-header h4,
.modal-header h3, .modal-title, .form-section h3, .sidebar-logo h1,
.stat-info h4, .quick-access-info h4, .school-header-banner h3,
.permission-group-title, .perm-header, .table-title, .section-title, .box-title {
  font-size: 13.5px !important;
  font-weight: 600;
  line-height: 1.35;
}

/* Paragraphs, links, body text, inputs, buttons, tables, labels (< 13px) */
p, a, span, label, input, select, textarea, button, td, th, li,
.nav-item, .nav-sub-item, .breadcrumb, .breadcrumb a, .breadcrumb span,
.btn, .filter-select, .filter-input, .badge, .status-badge, .tab-item,
.info-banner, .group-option-name, .group-option-desc, .form-control, .form-select,
.form-label, .perm-name, .perm-actions, .stat-info p, .quick-access-info p,
.table-scroll td, .table-scroll th {
  font-size: 12px !important;
}

/* Typography utility classes (< 13px) */
.fs-10 { font-size: 10px !important; }
.fs-11 { font-size: 12px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 12.5px !important; }
.fs-14 { font-size: 12.5px !important; }
.fs-15, .fs-16, .fs-18, .fs-20, .fs-22, .fs-24, .fs-32, .fs-48 { font-size: 12.5px !important; }

/* Form Inputs & Controls Typography: Times New Roman for Latin/Digits, Khmer OS Battambang for Khmer */
input, select, textarea, button,
.form-control, .form-select, .filter-input, .filter-select,
.searchable-select-input, .topbar-select, .table-input,
.matrix-cell-input, .search-input, .control-search-input,
.bsr-custom-search-input, .exam-filter-search-input,
.exam-filter-search-box input, .exam-filter-subsearch input,
.search-box input, .search-wrapper input, .search-group input,
.search-bar input, .search-input-wrap input, .filter-search input,
.table-search input {
  font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Battambang', sans-serif !important;
  color-scheme: only light !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* Explicit default background & contrast for inputs */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not(.matrix-cell-input),
select,
textarea,
.form-control,
.form-select,
.filter-input,
.filter-select,
.searchable-select-input,
.topbar-select,
.table-input {
  background-color: #ffffff;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* Input Focus States */
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus,
.filter-input:focus,
.filter-select:focus,
.table-input:focus {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background-color: #ffffff !important;
}

/* Disabled and Readonly Inputs */
input:disabled,
input[readonly],
select:disabled,
textarea:disabled,
.form-control:disabled,
.form-control[readonly] {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  background-color: #f1f5f9 !important;
  opacity: 1 !important;
}

/* Explicit Khmer Font Controls & Inputs */
.khmer-font, input.khmer-font, textarea.khmer-font, select.khmer-font,
.input-kh, textarea.input-kh {
  font-family: 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Times New Roman', sans-serif !important;
}

/* Placeholders inherit high-contrast visible slate tone */
input::placeholder,
textarea::placeholder,
.filter-input::placeholder,
.form-control::placeholder,
.table-input::placeholder {
  font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Khmer OS', 'KhmerOS', 'Battambang', sans-serif !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

/* Browser Autofill Protection (Prevents Dark Inversion on Saved/Autofilled Credentials) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #0f172a !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  box-shadow: 0 0 0px 1000px #ffffff inset !important;
  transition: background-color 5000s ease-in-out 0s;
  color: #0f172a !important;
}

/* ── FontAwesome Icon Protection & Global Vibrant Orange Theme ──
   Applies color: orange across all .tsx files and components while keeping icon fonts intact. */
.fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands,
i[class*='fa-'],
svg.icon, i.icon {
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Free', 'Font Awesome 5 Brands', FontAwesome !important;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  color: var(--icon-orange, #f97316);
}

/* Card headers, page titles, tabs, toolbar search, inputs, dropdowns */
.card-header i,
.page-title i,
.header-title i,
.modal-title i,
.stat-icon i,
.dropdown-item i,
.tab-item i,
.tab-btn i,
.upload-area i,
.logo-preview i,
.search-icon i,
.filter-icon i,
.student-toolbar-search i {
  color: var(--icon-orange, #f97316);
}

/* Maintain legibility: icons inside filled solid buttons & badges stay white */
.btn-primary > i, button.btn-primary > i,
.btn-danger > i, button.btn-danger > i,
.btn-success > i, button.btn-success > i,
.btn-info > i, button.btn-info > i,
.btn-secondary > i, button.btn-secondary > i,
.btn-dark > i, button.btn-dark > i,
.bg-orange > i, button.bg-orange > i,
.btn-orange > i, button.btn-orange > i,
.badge-danger i, .badge-success i, .badge-primary i {
  color: #ffffff !important;
}

/* Contextual destructive / warning / success icon overrides */
.action-dropdown-item.danger i,
.dropdown-item.danger i,
.dropdown-item.text-danger i,
.student-row-context-menu .menu-action-danger i,
.btn-trash i,
.text-danger i,
.text-red i {
  color: #ef4444 !important;
}

.text-success i,
.text-green i {
  color: #10b981 !important;
}

/* ==========================================================================
   PAGE LOADER — Branded Full-Screen Loader with Logo
   ========================================================================== */

.page-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.page-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.page-loader-logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-loader-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #3b82f6;
  border-right-color: #3b82f6;
  animation: loaderSpin 0.9s linear infinite;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}
.page-loader-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.15);
  animation: loaderPulse 1.6s ease-in-out infinite;
}

.page-loader-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 50%;
  animation: logoBreath 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.page-loader-spinner-fallback {
  font-size: 40px;
  color: #3b82f6;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

.page-loader-school-name {
  font-size: 13px !important;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.03em;
  margin: 0;
  text-align: center;
  max-width: 240px;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
}

.page-loader-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.page-loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  display: inline-block;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.page-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.page-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.95); }
}
@keyframes logoBreath {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
  40%            { transform: translateY(-8px); opacity: 1; }
}

/* Legacy .page-loader fallback */
.page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
  color: #64748b;
  font-size: 13px;
}

/* ==========================================================================
   UNIVERSAL QUICK EDIT CLICKABLE ROWS & BADGES
   ========================================================================== */

tr.quick-edit-row,
tbody tr:has(.action-quick-edit-btn),
tbody tr:has(.action-cell-btn),
tbody tr:has(button[title*="Edit" i]),
tbody tr:has(button[title*="កែប្រែ"]),
tbody tr:has(button[title*="កែសម្រួល"]),
tbody tr:has(.fa-edit),
tbody tr:has(.fa-pencil),
tbody tr:has(.fa-pencil-alt),
tbody tr:has(.fa-pen),
tbody tr:has(.fa-pen-to-square),
tbody tr:has(.fa-user-edit) {
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

tr.quick-edit-row:hover,
tbody tr:has(.action-quick-edit-btn):hover,
tbody tr:has(.action-cell-btn):hover,
tbody tr:has(button[title*="Edit" i]):hover,
tbody tr:has(button[title*="កែប្រែ"]):hover,
tbody tr:has(button[title*="កែសម្រួល"]):hover,
tbody tr:has(.fa-edit):hover,
tbody tr:has(.fa-pencil):hover,
tbody tr:has(.fa-pencil-alt):hover,
tbody tr:has(.fa-pen):hover,
tbody tr:has(.fa-pen-to-square):hover,
tbody tr:has(.fa-user-edit):hover {
  background-color: #f0f7ff !important;
}

tr.quick-edit-row:hover > td:not(.no-hover-bg),
tbody tr:has(.action-quick-edit-btn):hover > td:not(.no-hover-bg),
tbody tr:has(.fa-edit):hover > td:not(.no-hover-bg),
tbody tr:has(.fa-pencil):hover > td:not(.no-hover-bg),
tbody tr:has(.fa-pen):hover > td:not(.no-hover-bg) {
  background-color: #f0f7ff !important;
}

/* Ensure no pencil icons appear in table data columns on hover */
.quick-edit-hint {
  display: none !important;
}

/* Quick Edit Button: compact pencil icon displayed in the "Action" column on hover */
.action-quick-edit-btn {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  transform: scale(0.85);
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  font-size: 10px !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
  background-color: #eff6ff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  flex-shrink: 0 !important;
}

tbody tr:hover .action-quick-edit-btn,
tr.quick-edit-row:hover .action-quick-edit-btn,
tbody tr:has(.action-cell-btn):hover .action-quick-edit-btn,
.action-quick-edit-btn:focus,
.action-quick-edit-btn:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) !important;
}

.action-quick-edit-btn:hover {
  background-color: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}

/* ==========================================================================
   DASHBOARD SYSTEM CONTROL CENTER (ADMIN / PRINCIPAL / STAFF)
   ========================================================================== */

.dashboard-control-center {
  margin-top: 24px;
}

.control-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.control-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-title-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.control-title-text h3 {
  font-size: 14px !important;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.control-title-text p {
  font-size: 12px !important;
  color: #64748b;
  margin: 0;
}

.control-search-box {
  position: relative;
  min-width: 260px;
  max-width: 360px;
  width: 100%;
}

.control-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  font-size: 12.5px !important;
  background: var(--bg-subtle, #f8fafc);
  color: #1e293b;
  transition: all 0.2s ease;
}

.control-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.control-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.control-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 4px;
}

.control-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  color: #475569;
  font-size: 12px !important;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.control-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.control-pill.active {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.control-section {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.control-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #f1f5f9);
}

.control-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.control-section-title h4 {
  font-size: 13.5px !important;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.control-section-badge {
  font-size: 12px !important;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.control-card {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 13px 15px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.control-card:hover {
  background: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-2.5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(59, 130, 246, 0.1);
}

.control-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.control-card:hover .control-card-icon {
  transform: scale(1.08);
}

.control-card-info {
  flex: 1;
  min-width: 0;
}

.control-card-title {
  font-size: 12.5px !important;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-card:hover .control-card-title {
  color: #2563eb;
}

.control-card-desc {
  font-size: 12px !important;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-card-arrow {
  font-size: 12px;
  color: #cbd5e1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.control-card:hover .control-card-arrow {
  color: #2563eb;
  transform: translateX(3px);
}

/* Color palettes for category badges and icon backgrounds */
.bg-icon-blue   { background: #eff6ff; color: #2563eb; }
.bg-icon-emerald{ background: #ecfdf5; color: #059669; }
.bg-icon-purple { background: #faf5ff; color: #7c3aed; }
.bg-icon-amber  { background: #fffbeb; color: #d97706; }
.bg-icon-rose   { background: #fff1f2; color: #e11d48; }
.bg-icon-indigo { background: #e0e7ff; color: #4338ca; }
.bg-icon-cyan   { background: #ecfeff; color: #0891b2; }
.bg-icon-teal   { background: #f0fdfa; color: #0d9488; }
.bg-icon-slate  { background: #f1f5f9; color: #475569; }
.bg-icon-orange { background: #fff7ed; color: #ea580c; }
.bg-icon-violet { background: #f5f3ff; color: #6d28d9; }

@media (max-width: 768px) {
  .control-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .control-search-box {
    max-width: 100%;
  }
  .control-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .control-card {
    padding: 11px 13px;
  }
}

/* ==========================================================================
   PAYMENT & TUITION MODULE STYLES (/payment-info & /payment-input)
   ========================================================================== */
.payment-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.payment-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.payment-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-kpi-card.border-invoiced {
  border-left: 4px solid #1e3a8a;
}

.payment-kpi-card.border-collected {
  border-left: 4px solid #10b981;
}

.payment-kpi-card.border-due {
  border-left: 4px solid #f59e0b;
}

.payment-kpi-card.border-actions {
  border-left: 4px solid #ef4444;
}

.payment-kpi-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.payment-kpi-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.payment-kpi-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Payment Status Badges */
.badge-payment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-payment-paid {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-payment-partial {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-payment-pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-payment-overdue {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Payment Sub-Navigation Tab Pills */
.payment-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.payment-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.payment-tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--accent);
  border-color: var(--accent);
}

.payment-tab-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3);
}

/* Billing Simulator Styles */
.billing-simulator-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.billing-summary-box {
  background: linear-gradient(135deg, #0f2439 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(15, 36, 57, 0.2);
}

.billing-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.billing-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.25);
  font-size: 16px;
  font-weight: 700;
}

/* Printable Payment Receipt Container */
.receipt-paper-wrapper {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
}

.receipt-paper {
  background: #ffffff;
  width: 100%;
  max-width: 650px;
  padding: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  color: #1e293b;
}

.receipt-header {
  text-align: center;
  border-bottom: 2px dashed #cbd5e1;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.receipt-school-name {
  font-size: 18px;
  font-weight: 700;
  color: #0f2439;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt-title {
  font-size: 16px;
  font-weight: 700;
  color: #1565c0;
  margin: 6px 0;
}

.receipt-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 16px;
}

.receipt-table th {
  background: #f1f5f9;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #cbd5e1;
}

.receipt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.receipt-summary-table {
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  font-size: 12.5px;
  margin-bottom: 24px;
}

.receipt-summary-table td {
  padding: 4px 8px;
}

.receipt-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: center;
  margin-top: 30px;
  padding-top: 15px;
}

.receipt-sign-line {
  margin-top: 45px;
  border-top: 1px dotted #94a3b8;
  font-size: 11.5px;
  color: #64748b;
  padding-top: 4px;
}

/* ==========================================================================
   REPORT MANAGEMENT MODULE STYLES
   ========================================================================== */
.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-kpi-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.report-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #cbd5e1;
}

.report-kpi-card.kpi-primary::before { background: linear-gradient(90deg, #1e3a8a, #3b82f6); }
.report-kpi-card.kpi-success::before { background: linear-gradient(90deg, #059669, #10b981); }
.report-kpi-card.kpi-warning::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.report-kpi-card.kpi-danger::before  { background: linear-gradient(90deg, #dc2626, #ef4444); }
.report-kpi-card.kpi-purple::before  { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }
.report-kpi-card.kpi-info::before    { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.report-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.report-kpi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.report-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.kpi-primary .report-kpi-icon { background: #eff6ff; color: #1e3a8a; }
.kpi-success .report-kpi-icon { background: #ecfdf5; color: #059669; }
.kpi-warning .report-kpi-icon { background: #fffbeb; color: #d97706; }
.kpi-danger  .report-kpi-icon { background: #fef2f2; color: #dc2626; }
.kpi-purple  .report-kpi-icon { background: #f5f3ff; color: #7c3aed; }
.kpi-info    .report-kpi-icon { background: #f0f9ff; color: #0284c7; }

.report-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color, #1e293b);
  line-height: 1.2;
}

.report-kpi-sub {
  font-size: 11.5px;
  color: var(--text-secondary, #64748b);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Report Dimension Pills Navigation */
.report-dimension-nav {
  display: inline-flex;
  background: var(--bg-secondary, #f1f5f9);
  padding: 4px;
  border-radius: 10px;
  gap: 3px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.report-dimension-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.report-dimension-btn:hover {
  color: var(--text-color, #1e293b);
  background: rgba(255, 255, 255, 0.6);
}

.report-dimension-btn.active {
  background: var(--primary, #1e3a8a);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(30, 58, 138, 0.25);
}

/* Report Badges & Grades */
.badge-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
}
.badge-grade-a { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-grade-b { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-grade-c { background: #fef9c3; color: #a16207; border: 1px solid #fef08a; }
.badge-grade-d { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-grade-f { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Rank Badges */
.badge-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12.5px;
  padding: 0 6px;
}
.badge-rank-1 { background: linear-gradient(135deg, #fef08a, #eab308); color: #713f12; box-shadow: 0 2px 4px rgba(234, 179, 8, 0.25); }
.badge-rank-2 { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #1e293b; }
.badge-rank-3 { background: linear-gradient(135deg, #fed7aa, #f97316); color: #7c2d12; }
.badge-rank-other { background: #f1f5f9; color: #64748b; }

/* Attendance Rate Badges */
.badge-rate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.badge-rate-high { background: #ecfdf5; color: #065f46; }
.badge-rate-mid  { background: #fffbeb; color: #92400e; }
.badge-rate-low  { background: #fef2f2; color: #991b1b; }

/* Discipline Badges */
.badge-disc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-disc-warn   { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.badge-disc-severe { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }
.badge-disc-info   { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }

/* Report Breakdown Grids */
.report-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.report-breakdown-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.report-breakdown-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color, #1e293b);
}

/* Printable Report Styles */
.report-print-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
}

.report-print-header {
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.report-print-header h1 {
  font-size: 20px;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0;
}

.report-print-header .report-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.report-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed #cbd5e1;
}

.report-sign-box {
  text-align: center;
  width: 180px;
}

.report-sign-box .sign-line {
  margin-top: 50px;
  border-top: 1px solid #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  padding-top: 4px;
}

@media print {
  body:has(.receipt-paper, .report-print-sheet) * {
    visibility: hidden;
  }
  .receipt-paper, .receipt-paper *,
  .report-print-sheet, .report-print-sheet *,
  .export-print-canvas, .export-print-canvas *,
  .sheet-container-class, .sheet-container-class *,
  .print-page-block, .print-page-block *,
  .certificate-page-block, .certificate-page-block *,
  .student-result-sheet-container, .student-result-sheet-container *,
  .tab-pane-student-scores-by-class, .tab-pane-student-scores-by-class *,
  .tab-pane-report-transcript, .tab-pane-report-transcript *,
  .tab-pane-tracking-book, .tab-pane-tracking-book *,
  .tab-pane-internship-record, .tab-pane-internship-record *,
  .tab-pane-consolidated-sheets, .tab-pane-consolidated-sheets *,
  .tab-pane-score-report, .tab-pane-score-report *,
  .tab-pane-student-certificate, .tab-pane-student-certificate *,
  .tab-pane-top-star, .tab-pane-top-star * {
    visibility: visible !important;
  }
  .receipt-paper,
  .report-print-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .no-print,
  .page-header-actions,
  .payment-tabs-bar,
  .management-tabs-container,
  .report-dimension-nav,
  .sidebar,
  .navbar,
  .btn {
    display: none !important;
  }
}

/* ==========================================================================
   SCORE ENTRY SPREADSHEET (Excel-Grade Responsive Score Input Table)
   ========================================================================== */
.input-score-table-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.input-score-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.input-score-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.input-score-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.input-score-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.input-score-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 12px;
  background: #ffffff;
}

.input-score-table thead th {
  padding: 2px 2px;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-body);
}

.input-score-table tbody td {
  padding: 1px 1px;
  white-space: nowrap;
  font-family: var(--font-body);
}

.input-score-table tbody tr:hover td {
  background-color: #f8fafc !important;
}

.input-score-table tbody tr:hover td.sticky-col-idx,
.input-score-table tbody tr:hover td.sticky-col-name {
  background-color: #f1f5f9 !important;
}

.input-score-table .excel-score-input,
.score-cell-input {
  width: 100%;
  max-width: 33px;
  height: 22px;
  min-height: 22px;
  padding: 0 1px;
  margin: 0 auto;
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  background-color: #ffffff;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.input-score-table .excel-score-input:hover:not(:disabled),
.score-cell-input:hover:not(:disabled) {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
  cursor: text;
}

.input-score-table .excel-score-input:focus:not(:disabled),
.score-cell-input:focus:not(:disabled) {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.35) !important;
  z-index: 2;
}

.input-score-table .excel-score-input:disabled,
.score-cell-input:disabled {
  background-color: #f8fafc !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed;
}

/* Open draft rows for Excel-like quick data entry tables (StudentInfo, TeacherProfile, Subjects, EmployeeAccount) */
.open-row-input,
.open-row-cell-input {
  width: 100%;
  max-width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  outline: none;
  text-align: left;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.open-row-input:hover:not(:disabled),
.open-row-cell-input:hover:not(:disabled) {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

.open-row-input:focus:not(:disabled),
.open-row-cell-input:focus:not(:disabled) {
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

select.open-row-input,
select.open-row-cell-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 26px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Mobile & Tablet optimizations for score input */
@media (max-width: 768px) {
  .input-score-table-wrap {
    max-height: calc(100vh - 180px);
  }
  .excel-score-input,
  .score-cell-input {
    height: 24px;
    font-size: 12px;
  }
}

/* -----------------------------------------------------------
   UNIVERSAL A4 DOCUMENT SHEET LAYOUT (As seen on InputScore)
   ----------------------------------------------------------- */
.a4-sheet-canvas {
  background: #f1f5f9;
  padding: 16px 12px 28px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.a4-score-sheet,
.a4-paper-sheet {
  max-width: 1280px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  padding: 20px 22px 18px;
  box-sizing: border-box;
}

.a4-score-sheet > .table-wrapper,
.a4-score-sheet > .table-responsive,
.a4-paper-sheet > .table-wrapper,
.a4-paper-sheet > .table-responsive,
.a4-sheet-canvas .table-wrapper,
.a4-sheet-canvas .table-responsive {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  overflow: auto;
  position: relative;
}

.a4-score-sheet > .table-footer,
.a4-paper-sheet > .table-footer,
.a4-sheet-canvas .table-footer {
  background: transparent;
  padding: 12px 4px 0 4px;
  border-top: 1px solid #e2e8f0;
  margin-top: 12px;
}

/* Fallback for any .card containing a .table-wrapper not yet wrapped by .a4-sheet-canvas */
.card:has(> .table-wrapper):not(:has(.a4-sheet-canvas)),
.card:has(> .filter-section + .table-wrapper):not(:has(.a4-sheet-canvas)),
.card:has(> .tabs + .table-wrapper):not(:has(.a4-sheet-canvas)) {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  box-shadow: none;
  padding-bottom: 24px;
}

.card:has(> .table-wrapper):not(:has(.a4-sheet-canvas)) > .table-wrapper,
.card:has(> .filter-section + .table-wrapper):not(:has(.a4-sheet-canvas)) > .table-wrapper,
.card:has(> .tabs + .table-wrapper):not(:has(.a4-sheet-canvas)) > .table-wrapper {
  max-width: 1280px;
  width: calc(100% - 32px);
  margin: 16px auto 0 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  padding: 16px 18px 0 18px;
  box-sizing: border-box;
}

.card:has(> .table-wrapper):not(:has(.a4-sheet-canvas)) > .table-wrapper:not(:has(+ .table-footer)),
.card:has(> .table-wrapper):not(:has(.a4-sheet-canvas)) > .table-wrapper:last-child {
  border-radius: 8px;
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.card:has(> .table-wrapper):not(:has(.a4-sheet-canvas)) > .table-footer {
  max-width: 1280px;
  width: calc(100% - 32px);
  margin: 0 auto 8px auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  padding: 12px 18px;
  box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────
   Phone Devices: 2px padding for score inputting
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .content-area.is-input-score-area,
  .content-area:has(.input-score-page),
  .portal-layout .content-area.is-input-score-area,
  .portal-layout .content-area:has(.input-score-page),
  .input-score-route .content-area {
    padding-left: 2px !important;
    padding-right: 2px !important;
    padding-top: 4px !important;
    box-sizing: border-box !important;
  }

  .input-score-page {
    padding-left: 2px !important;
    padding-right: 2px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .input-score-page .page-header {
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-bottom: 4px !important;
    gap: 6px !important;
  }

  .input-score-page .card {
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
  }

  .input-score-page .class-tabs-nav-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .input-score-page .carousel-filter-strip {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .input-score-page .a4-sheet-canvas {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 2px !important;
    padding-bottom: 10px !important;
    width: 100% !important;
    background: #ffffff !important;
  }

  .input-score-page .a4-score-sheet {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 2px !important;
    padding-bottom: 4px !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .input-score-page .a4-score-sheet > .table-wrapper,
  .input-score-page .input-score-table-wrap {
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    width: 100% !important;
  }

  .input-score-page .table-footer {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 6mm 8mm;
  }
  body {
    background: #ffffff !important;
    font-size: 10px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .sidebar, .app-sidebar, .app-header, .page-header, .card-header,
  .btn, button, .action-buttons, .no-print,
  .filter-section, .class-tabs-nav-wrapper {
    display: none !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .a4-sheet-canvas {
    padding: 0 !important;
    background: transparent !important;
    margin: 0 !important;
    display: block !important;
  }
  .a4-score-sheet,
  .a4-paper-sheet {
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  .table-wrapper {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
  }
}

/* ==========================================================================
   GLOBAL SEARCH INPUT TYPED VALUE COLOR: BLUE (#1d4ed8)
   Ensures any search value entered across all .tsx pages & dropdowns is blue.
   ========================================================================== */
input[type="search"],
input[name*="search" i],
input[id*="search" i],
input[class*="search" i],
input[placeholder*="search" i],
input[placeholder*="Search" i],
input[placeholder*="ស្វែងរក"],
input[placeholder*="Lookup" i],
input[aria-label*="search" i],
input[aria-label*="ស្វែងរក"],
.search-input,
.searchable-select-search-input,
.control-search-input,
.bsr-custom-search-input,
.exam-filter-search-input,
.exam-filter-search-box input,
.exam-filter-subsearch input,
.search-box input,
.search-wrapper input,
.search-group input,
.search-bar input,
.search-input-wrap input,
.filter-search input,
.table-search input {
  color: #1d4ed8 !important;
  font-weight: 600 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

/* Ensure placeholder text stays standard neutral muted grey and normal weight (NOT blue) */
input[type="search"]::placeholder,
input[name*="search" i]::placeholder,
input[id*="search" i]::placeholder,
input[class*="search" i]::placeholder,
input[placeholder*="search" i]::placeholder,
input[placeholder*="Search" i]::placeholder,
input[placeholder*="ស្វែងរក"]::placeholder,
input[placeholder*="Lookup" i]::placeholder,
input[aria-label*="search" i]::placeholder,
input[aria-label*="ស្វែងរក"]::placeholder,
.search-input::placeholder,
.searchable-select-search-input::placeholder,
.control-search-input::placeholder,
.bsr-custom-search-input::placeholder,
.exam-filter-search-input::placeholder,
.exam-filter-search-box input::placeholder,
.exam-filter-subsearch input::placeholder,
.search-box input::placeholder,
.search-wrapper input::placeholder,
.search-group input::placeholder,
.search-bar input::placeholder,
.search-input-wrap input::placeholder,
.filter-search input::placeholder,
.table-search input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

/* ==========================================================================
   UNIVERSAL TABLE QUICK EDIT (MULTI-ROW & MULTI-CELL SPREADSHEET EDITING)
   ========================================================================== */

th.action-th-cell,
th[data-action-header] {
  position: relative !important;
}

.th-action-btn-wrapper {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 5;
}

.th-action-quick-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.th-action-quick-edit-btn:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  transform: scale(1.05);
}

.th-quick-edit-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid #86efac;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-th-quick-save {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-th-quick-save:hover:not(:disabled) {
  background: #15803d;
}

.btn-th-quick-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-th-quick-save .changes-badge {
  background: #ffffff;
  color: #16a34a;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.btn-th-quick-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-th-quick-cancel:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Active Quick Edit Table Styling */
table.universal-quick-edit-active,
table.quick-edit-grid-active {
  box-shadow: 0 0 0 2px #3b82f6 !important;
  border-radius: 4px;
}

table.universal-quick-edit-active thead th.action-th-cell,
table.quick-edit-grid-active thead th.action-th-cell {
  background: #f0fdf4 !important;
  color: #166534 !important;
}

.universal-quick-cell-td {
  padding: 2px 4px !important;
  position: relative;
}

.universal-quick-cell-input {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 12.5px;
  font-family: inherit;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  transition: all 0.15s ease;
}

.universal-quick-cell-input:focus {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

.universal-quick-cell-td.cell-modified,
td.cell-modified {
  background-color: #ecfdf5 !important;
}

.universal-quick-cell-td.cell-modified .universal-quick-cell-input,
td.cell-modified input {
  border-color: #f59e0b !important;
  background-color: #fffbeb !important;
  color: #92400e !important;
  font-weight: 600;
}

/* Auto-Save Status Pill in Action Th */
.quick-auto-save-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
  cursor: default;
}

.quick-auto-save-pill.saved {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.quick-auto-save-pill.saving {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.quick-auto-save-pill.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.quick-auto-save-pill.error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  cursor: pointer;
}

.btn-th-quick-done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-th-quick-done:hover {
  background: #15803d;
}

.btn-th-quick-done:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cell Saving State */
.universal-quick-cell-td.cell-saving,
td.cell-saving {
  background-color: #eff6ff !important;
}

.universal-quick-cell-td.cell-saving .universal-quick-cell-input,
td.cell-saving input {
  border-color: #3b82f6 !important;
  background-color: #f8fafc !important;
  color: #1d4ed8 !important;
}

/* Cell Saved Flash Animation */
@keyframes cellSavedFlashAnim {
  0% {
    background-color: #bbf7d0;
  }
  100% {
    background-color: transparent;
  }
}

.universal-quick-cell-td.cell-saved,
td.cell-saved {
  animation: cellSavedFlashAnim 1.2s ease-out forwards;
}

/* ==========================================================================
   Exam Filter Panel & Dropdown Toolbar Styles (SchoolExam)
   ========================================================================== */
.exam-filter-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 50;
  overflow: visible;
}

.exam-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.exam-filter-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}

.exam-filter-search-box i.fa-search {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.exam-filter-search-box input {
  width: 100%;
  padding: 7px 30px 7px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #f8fafc;
  color: #1e293b;
  transition: all 0.15s ease;
}

.exam-filter-search-box input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.exam-filter-subsearch-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.12s;
}

.exam-filter-subsearch-clear:hover {
  color: #475569;
}

.exam-filter-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.exam-filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.exam-filter-dropdown-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.exam-filter-dropdown-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.exam-filter-dropdown-btn.has-value {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #f0f9ff;
  font-weight: 600;
}

.exam-filter-dropdown-btn i.fa-chevron-down {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.15s ease;
}

.exam-filter-dropdown-btn.active i.fa-chevron-down {
  transform: rotate(180deg);
}

.exam-filter-dropdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  background: #16a34a;
  color: #ffffff;
}

/* Dropdown Menu */
.exam-filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 1050;
  min-width: 260px;
  max-width: 340px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 0;
  overflow: hidden;
  animation: examFilterFadeIn 0.12s ease-out;
}

@keyframes examFilterFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exam-dropdown-search-wrap {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.exam-filter-subsearch {
  position: relative;
  display: flex;
  align-items: center;
}

.exam-filter-subsearch i.fa-search {
  position: absolute;
  left: 8px;
  color: #94a3b8;
  font-size: 11.5px;
  pointer-events: none;
}

.exam-filter-subsearch input {
  width: 100%;
  padding: 5px 26px 5px 26px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #1e293b;
}

.exam-filter-subsearch input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.exam-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.exam-dropdown-actions-left {
  font-weight: 500;
}

.exam-dropdown-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-filter-mini-action {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s;
}

.exam-filter-mini-action:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.exam-dropdown-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.exam-dropdown-list::-webkit-scrollbar {
  width: 5px;
}

.exam-dropdown-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.exam-filter-no-matches {
  padding: 12px 14px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.exam-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
  margin: 0;
}

.exam-dropdown-item:hover {
  background: #f1f5f9;
}

.exam-dropdown-item.selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 500;
}

.exam-dropdown-item input[type="checkbox"] {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  border-radius: 3px;
  margin: 0;
}

.exam-dropdown-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-dropdown-item-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
}

.exam-dropdown-item.selected .exam-dropdown-item-count {
  background: #bfdbfe;
  color: #1e40af;
}

.exam-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.exam-dropdown-footer-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: #16a34a;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s;
}

.exam-dropdown-footer-btn:hover {
  background: #15803d;
}

.exam-filter-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  margin-left: auto;
}

.exam-filter-clear-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Active Pills */
.exam-filter-active-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.exam-filter-active-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-right: 2px;
}

.exam-filter-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 2px 8px 2px 10px;
  font-weight: 500;
}

.exam-filter-pill-item button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  font-size: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: all 0.1s;
}

.exam-filter-pill-item button:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ==========================================================================
   DESIGN EXAM & SCORING BLUEPRINT MATRIX STYLES (public/assets/css/style.css)
   ========================================================================== */
.table-banner {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  color: #ffffff !important;
  text-align: center;
  font-weight: 700;
  padding: 10px 16px;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #1e3a8a;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  left: 0;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15);
}
.table-banner * {
  color: #ffffff !important;
}
.table-banner-mid {
  background: linear-gradient(135deg, #92400e 0%, #d97706 100%);
  border-bottom-color: #78350f;
  color: #ffffff !important;
}
.table-banner-semester {
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%);
  border-bottom-color: #312e81;
  color: #ffffff !important;
}
.table-banner-primary {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  border-bottom-color: #064e3b;
  color: #ffffff !important;
}
.scoring-table,
.midpro-table,
.semester-table,
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #ffffff;
}
.scoring-table th, .scoring-table td,
.midpro-table th, .midpro-table td,
.semester-table th, .semester-table td,
.matrix-table th, .matrix-table td {
  border: 1px solid #cbd5e1;
  padding: 5px 8px;
}
.scoring-table thead th,
.midpro-table thead th,
.semester-table thead th,
.matrix-table thead th {
  border: 1px solid #94a3b8;
  font-weight: 700;
}
.text-red-highlight {
  color: #dc2626 !important;
  font-weight: 700;
}
.text-blue-highlight {
  color: #1d4ed8 !important;
  font-weight: 700;
}
.matrix-cell-input {
  width: 100%;
  max-width: 100%;
  text-align: center;
  border: 1px solid transparent;
  background: transparent;
  color: #0f172a !important;
  color-scheme: only light !important;
  font-weight: 600;
  font-size: 12px;
  padding: 2px 3px;
  border-radius: 3px;
  transition: all 0.15s ease-in-out;
  box-sizing: border-box;
}
.matrix-cell-input.matrix-cell-code {
  min-width: 85px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: #0f172a !important;
}
.matrix-cell-input:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a !important;
}
.matrix-cell-input:focus {
  background: #fffbeb;
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  color: #0f172a !important;
}

/* Custom exam subject input styling */
.matrix-cell-input.custom-exam-input {
  background: #ffffff !important;
  border: 1px solid #93c5fd !important;
  color: #1e40af !important;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
}
.matrix-cell-input.custom-exam-input:focus {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
  color: #1e3a8a !important;
}

/* ── Hide number-input spinner arrows in all matrix cells ── */
.matrix-cell-input[type=number]::-webkit-inner-spin-button,
.matrix-cell-input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.matrix-cell-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Ensure inputs on design curriculum/exam tables never flip to white text in dark mode/night */
.design-exam-page input,
.a4-score-sheet input,
.design-curriculum-table input,
.score-design-matrix input {
  color-scheme: only light !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}



/* ==========================================================================
   UNIVERSAL BACKGROUND CONTRAST HARMONY RULES (resources/js/style.css)
   - If ANY background is DIFFERENT from white -> color: white (#ffffff)
   - If background IS white -> color: blue or black (#0f172a / #1e3a8a / #1d4ed8)
   ========================================================================== */

/* ── 1. NON-WHITE BACKGROUNDS -> TEXT COLOR WHITE ── */
.table-banner,
.table-banner-mid,
.table-banner-semester,
.table-banner-primary,
.table-banner *,
.table-banner-mid *,
.table-banner-semester *,
.table-banner-primary *,
.btn-primary,
.btn-primary *,
.btn-danger,
.btn-danger *,
.btn-success,
.btn-success *,
.btn-dark,
.btn-dark *,
.btn-info,
.btn-info *,
.btn-warning,
.btn-warning *,
.badge-dark,
.nav-pills .nav-link.active,
.pagination .page-item.active .page-link,
.sidebar,
.sidebar-header,
.sidebar-nav a.active,
.sidebar-nav a.active *,
.sidebar-nav a:hover,
.sidebar-nav a:hover * {
  color: #ffffff !important;
}

/* ALL IMPORT AND EXPORT BUTTONS: GREEN BACKGROUND WITH WHITE TEXT */
.export-center-btn,
button.export-center-btn,
.import-center-btn,
button.import-center-btn,
label.import-center-btn,
.btn-export,
.btn-import,
button:has(> i.fa-file-export),
button:has(> i.fa-file-import),
label.btn:has(> i.fa-file-import),
label.btn:has(> i.fa-file-export),
.page-header-actions button:has(i.fa-file-export),
.page-header-actions button:has(i.fa-file-import),
.page-header-actions label:has(i.fa-file-import),
.page-header-actions label:has(i.fa-file-export),
.import-dropdown > button.btn,
.export-dropdown > button.btn,
.import-dropdown > button,
.export-dropdown > button {
  background-color: #16a34a !important;
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.export-center-btn:hover,
button.export-center-btn:hover,
.import-center-btn:hover,
button.import-center-btn:hover,
label.import-center-btn:hover,
.btn-export:hover,
.btn-import:hover,
button:has(> i.fa-file-export):hover,
button:has(> i.fa-file-import):hover,
label.btn:has(> i.fa-file-import):hover,
label.btn:has(> i.fa-file-export):hover,
.page-header-actions button:has(i.fa-file-export):hover,
.page-header-actions button:has(i.fa-file-import):hover,
.page-header-actions label:has(i.fa-file-import):hover,
.page-header-actions label:has(i.fa-file-export):hover,
.import-dropdown > button.btn:hover,
.export-dropdown > button.btn:hover,
.import-dropdown > button:hover,
.export-dropdown > button:hover {
  background-color: #15803d !important;
  background: #15803d !important;
  border-color: #166534 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.export-center-btn *,
button.export-center-btn *,
.import-center-btn *,
button.import-center-btn *,
label.import-center-btn *,
.btn-export *,
.btn-import *,
button:has(> i.fa-file-export) *,
button:has(> i.fa-file-import) *,
label.btn:has(> i.fa-file-import) *,
label.btn:has(> i.fa-file-export) *,
.page-header-actions button:has(i.fa-file-export) *,
.page-header-actions button:has(i.fa-file-import) *,
.page-header-actions label:has(i.fa-file-import) *,
.page-header-actions label:has(i.fa-file-export) *,
.import-dropdown > button.btn *,
.export-dropdown > button.btn *,
.import-dropdown > button *,
.export-dropdown > button * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   IMPORT & EXPORT DROPDOWN MENU STYLES (CLEAR DARK TEXT ON WHITE DROPDOWN)
   ========================================================================== */
.import-center-dropdown-menu,
.export-center-dropdown-menu {
  background-color: #ffffff !important;
  background: #ffffff !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18) !important;
  border: 1px solid #cbd5e1 !important;
}

.import-center-dropdown-menu .import-dropdown-header,
.export-center-dropdown-menu .export-dropdown-header {
  color: #64748b !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.import-center-dropdown-menu .import-dropdown-header span,
.export-center-dropdown-menu .export-dropdown-header span {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

.import-center-dropdown-menu .import-hub-item,
.import-center-dropdown-menu button.import-hub-item,
.import-center-dropdown-menu .dropdown-item,
.import-center-dropdown-menu button.dropdown-item,
.export-center-dropdown-menu .dropdown-item,
.export-center-dropdown-menu button.dropdown-item {
  background-color: transparent !important;
  background: transparent !important;
  border: none !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  box-shadow: none !important;
}

.import-center-dropdown-menu .import-hub-item:hover,
.import-center-dropdown-menu button.import-hub-item:hover,
.import-center-dropdown-menu .dropdown-item:hover,
.import-center-dropdown-menu button.dropdown-item:hover,
.export-center-dropdown-menu .dropdown-item:hover,
.export-center-dropdown-menu button.dropdown-item:hover {
  background-color: #f0fdf4 !important;
  background: #f0fdf4 !important;
}

.import-center-dropdown-menu .import-hub-title,
.import-hub-title {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 600 !important;
}

.import-center-dropdown-menu .import-hub-desc,
.import-hub-desc {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

.import-center-dropdown-menu .import-hub-badge.import-badge-sample {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}

.import-center-dropdown-menu .import-hub-badge.import-badge-sample i {
  color: #15803d !important;
  -webkit-text-fill-color: #15803d !important;
}

.import-center-dropdown-menu .import-hub-badge.import-badge-upload {
  background-color: #e0f2fe !important;
  color: #0284c7 !important;
}

.import-center-dropdown-menu .import-hub-badge.import-badge-upload i {
  color: #0284c7 !important;
  -webkit-text-fill-color: #0284c7 !important;
}

/* ==========================================================================
   SOLID SATURATED BACKGROUNDS: BLUE, GREEN, RED, ORANGE (MUST BE COLOR WHITE)
   ========================================================================== */

/* ── 1. BLUE BACKGROUNDS ── */
.bg-blue,
.btn-blue,
button.bg-blue,
button.btn-blue,
a.bg-blue,
a.btn-blue,
span.bg-blue,
div.bg-blue,
.bg-primary:not(.bg-primary-light):not(.bg-primary-subtle),
button.btn-primary,
.btn-primary,
[class*="bg-blue"]:not(.bg-blue-50):not(.bg-blue-100):not(.badge-info),
[class*="bg-indigo"]:not(.bg-indigo-50):not(.bg-indigo-100),
[class*="bg-sky"]:not(.bg-sky-50):not(.bg-sky-100) {
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-blue:hover,
.btn-blue:hover,
button.bg-blue:hover,
button.btn-blue:hover,
a.bg-blue:hover,
a.btn-blue:hover,
button.btn-primary:hover,
.btn-primary:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 2. GREEN BACKGROUNDS ── */
.bg-green,
.btn-green,
button.bg-green,
button.btn-green,
a.bg-green,
a.btn-green,
span.bg-green,
div.bg-green,
.bg-success:not(.badge-success),
button.btn-success,
.btn-success,
[class*="bg-green"]:not(.bg-green-50):not(.bg-green-100):not(.badge-success),
[class*="bg-emerald"]:not(.bg-emerald-50):not(.bg-emerald-100) {
  background-color: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-green:hover,
.btn-green:hover,
button.bg-green:hover,
button.btn-green:hover,
a.bg-green:hover,
a.btn-green:hover,
button.btn-success:hover,
.btn-success:hover {
  background-color: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 3. RED BACKGROUNDS ── */
.bg-red,
.btn-red,
button.bg-red,
button.btn-red,
a.bg-red,
a.btn-red,
span.bg-red,
div.bg-red,
.bg-danger:not(.badge-danger):not(.bg-danger-light):not(.bg-danger-subtle):not([class*="-50"]):not([class*="-100"]),
button.btn-danger,
.btn-danger,
[class*="bg-red"]:not(.bg-red-50):not(.bg-red-100):not(.badge-danger),
[class*="bg-rose"]:not(.bg-rose-50):not(.bg-rose-100) {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-red:hover,
.btn-red:hover,
button.bg-red:hover,
button.btn-red:hover,
a.bg-red:hover,
a.btn-red:hover,
button.btn-danger:hover,
.btn-danger:hover {
  background-color: #b91c1c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 4. ORANGE BACKGROUNDS ── */
.bg-orange,
.btn-orange,
button.bg-orange,
button.btn-orange,
a.bg-orange,
a.btn-orange,
span.bg-orange,
div.bg-orange,
.bg-warning:not(.badge-warning),
button.btn-warning,
.btn-warning,
[class*="bg-orange"]:not(.bg-orange-50):not(.bg-orange-100):not(.badge-warning),
[class*="bg-amber"]:not(.bg-amber-50):not(.bg-amber-100):not(.badge-warning) {
  background-color: #ea580c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-orange:hover,
.btn-orange:hover,
button.bg-orange:hover,
button.btn-orange:hover,
a.bg-orange:hover,
a.btn-orange:hover,
button.btn-warning:hover,
.btn-warning:hover {
  background-color: #c2410c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 5. ALL CHILDREN/DESCENDANTS OF BLUE, GREEN, RED, ORANGE MUST BE WHITE ── */
.bg-blue *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-blue *:not(.badge):not(.badge *):not([class*="badge-"]),
button.bg-blue *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-blue *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-primary *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-primary *:not(.badge):not(.badge *):not([class*="badge-"]),
.bg-primary *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-blue"]:not(.bg-blue-50):not(.bg-blue-100):not(.badge-info) *:not(.badge):not(.badge *):not([class*="badge-"]),

.bg-green *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-green *:not(.badge):not(.badge *):not([class*="badge-"]),
button.bg-green *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-green *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-success *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-success *:not(.badge):not(.badge *):not([class*="badge-"]),
.bg-success *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-green"]:not(.bg-green-50):not(.bg-green-100):not(.badge-success) *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-emerald"]:not(.bg-emerald-50):not(.bg-emerald-100) *:not(.badge):not(.badge *):not([class*="badge-"]),

.bg-red *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-red *:not(.badge):not(.badge *):not([class*="badge-"]),
button.bg-red *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-red *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-danger *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-danger *:not(.badge):not(.badge *):not([class*="badge-"]),
.bg-danger *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-red"]:not(.bg-red-50):not(.bg-red-100):not(.badge-danger) *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-danger"]:not(.bg-danger-50):not(.bg-danger-100):not(.badge-danger) *:not(.badge):not(.badge *):not([class*="badge-"]),

.bg-orange *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-orange *:not(.badge):not(.badge *):not([class*="badge-"]),
button.bg-orange *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-orange *:not(.badge):not(.badge *):not([class*="badge-"]),
button.btn-warning *:not(.badge):not(.badge *):not([class*="badge-"]),
.btn-warning *:not(.badge):not(.badge *):not([class*="badge-"]),
.bg-warning *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-orange"]:not(.bg-orange-50):not(.bg-orange-100):not(.badge-warning) *:not(.badge):not(.badge *):not([class*="badge-"]),
[class*="bg-amber"]:not(.bg-amber-50):not(.bg-amber-100):not(.badge-warning) *:not(.badge):not(.badge *):not([class*="badge-"]),

.bg-dark,
.bg-dark *:not(.badge):not(.badge *),
.bg-slate-800,
.bg-slate-900 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Direct override: #2563eb background turned to green with white color */
[style*="background-color: #2563eb"],
[style*="background: #2563eb"] {
  background-color: #16a34a !important;
  background: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 6. INLINE BACKGROUND STYLES: BLUE, GREEN, RED, ORANGE (MUST BE COLOR WHITE) ── */
[style*="background-color: #2563eb"],
[style*="background-color: #1d4ed8"],
[style*="background-color: #3b82f6"],
[style*="background-color: #0284c7"],
[style*="background-color: #0369a1"],
[style*="background: #2563eb"],
[style*="background: #1d4ed8"],
[style*="background: #3b82f6"],
[style*="background-color: blue"],

[style*="background-color: #16a34a"],
[style*="background-color: #15803d"],
[style*="background-color: #166534"],
[style*="background-color: #10b981"],
[style*="background-color: #059669"],
[style*="background: #16a34a"],
[style*="background: #15803d"],
[style*="background: #10b981"],
[style*="background: #059669"],
[style*="background-color: green"],

[style*="background-color: #dc2626"],
[style*="background-color: #b91c1c"],
[style*="background-color: #ef4444"],
[style*="background: #dc2626"],
[style*="background: #b91c1c"],
[style*="background: #ef4444"],
[style*="background-color: red"],

[style*="background-color: #ea580c"],
[style*="background-color: #f97316"],
[style*="background-color: #c2410c"],
[style*="background-color: #f59e0b"],
[style*="background-color: #d97706"],
[style*="background: #ea580c"],
[style*="background: #f97316"],
[style*="background: #f59e0b"],
[style*="background-color: orange"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

[style*="background-color: #2563eb"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #1d4ed8"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #3b82f6"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #0284c7"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #0369a1"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #2563eb"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #1d4ed8"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #3b82f6"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: blue"] *:not(.badge):not(.badge *):not([class*="badge-"]),

[style*="background-color: #16a34a"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #15803d"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #166534"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #10b981"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #059669"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #16a34a"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #15803d"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #10b981"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #059669"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: green"] *:not(.badge):not(.badge *):not([class*="badge-"]),

[style*="background-color: #dc2626"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #b91c1c"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #ef4444"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #dc2626"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #b91c1c"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #ef4444"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: red"] *:not(.badge):not(.badge *):not([class*="badge-"]),

[style*="background-color: #ea580c"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #f97316"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #c2410c"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #f59e0b"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: #d97706"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #ea580c"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #f97316"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background: #f59e0b"] *:not(.badge):not(.badge *):not([class*="badge-"]),
[style*="background-color: orange"] *:not(.badge):not(.badge *):not([class*="badge-"]) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* EXPLICIT WHITE & LIGHT BUTTON PROTECTION: MUST HAVE DARK READABLE TEXT (ONLY FOR GENUINELY WHITE/LIGHT SURFACES) */
.btn-outline:not(.active):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-cancel):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Trash" i]):not([title*="ធុងសំរាម"]):not([title*="Cancel" i]):not([title*="បោះបង់"]):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(:has(i.fa-times)):not(:has(.fa-times)):not(.btn-en):not(.btn-excel):not(.btn-excel-class):not(.btn-pdf):not(.btn-pdf-class):not(.btn-print):not(.btn-print-class):not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background-color: #0"]):not([style*="background: #d"]):not([style*="background-color: #d"]):not([style*="background: #2"]):not([style*="background-color: #2"]):not(.modal-footer *):not(.modal-footer button),
button.btn-outline:not(.active):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-cancel):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Trash" i]):not([title*="ធុងសំរាម"]):not([title*="Cancel" i]):not([title*="បោះបង់"]):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(:has(i.fa-times)):not(:has(.fa-times)):not(.btn-en):not(.btn-excel):not(.btn-excel-class):not(.btn-pdf):not(.btn-pdf-class):not(.btn-print):not(.btn-print-class):not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background-color: #0"]):not([style*="background: #d"]):not([style*="background-color: #d"]):not([style*="background: #2"]):not([style*="background-color: #2"]):not(.modal-footer *):not(.modal-footer button),
.btn-light,
button.btn-light,
.btn-white,
button.btn-white,
button[style*="background: #fff"],
button[style*="background:#fff"],
button[style*="background: white"],
button[style*="background-color: #fff"],
button[style*="background-color:#fff"],
button[style*="background-color: white"],
button[style*="background: #ffffff"],
button[style*="background:#ffffff"],
button[style*="background-color: #ffffff"],
button[style*="background-color:#ffffff"],
.btn[style*="background: #fff"],
.btn[style*="background:#fff"],
.btn[style*="background: white"],
.btn[style*="background-color: #fff"],
.btn[style*="background-color:#fff"],
.btn[style*="background-color: white"] {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

.btn-outline:not(.active):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-cancel):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Trash" i]):not([title*="ធុងសំរាម"]):not([title*="Cancel" i]):not([title*="បោះបង់"]):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(:has(i.fa-times)):not(:has(.fa-times)):not(.btn-en):not(.btn-excel):not(.btn-excel-class):not(.btn-pdf):not(.btn-pdf-class):not(.btn-print):not(.btn-print-class):not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background-color: #0"]):not([style*="background: #d"]):not([style*="background-color: #d"]):not([style*="background: #2"]):not([style*="background-color: #2"]):not(.modal-footer *):not(.modal-footer button) *,
button.btn-outline:not(.active):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-cancel):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Trash" i]):not([title*="ធុងសំរាម"]):not([title*="Cancel" i]):not([title*="បោះបង់"]):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(:has(i.fa-times)):not(:has(.fa-times)):not(.btn-en):not(.btn-excel):not(.btn-excel-class):not(.btn-pdf):not(.btn-pdf-class):not(.btn-print):not(.btn-print-class):not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background-color: #0"]):not([style*="background-color: #d"]):not([style*="background-color: #d"]):not([style*="background: #2"]):not([style*="background-color: #2"]):not(.modal-footer *):not(.modal-footer button) *,
.btn-light *,
button.btn-light *,
.btn-white *,
button.btn-white *,
button[style*="background: #fff"] *,
button[style*="background:#fff"] *,
button[style*="background: white"] *,
button[style*="background-color: #fff"] *,
button[style*="background-color:#fff"] *,
button[style*="background-color: white"] *,
button[style*="background: #ffffff"] *,
button[style*="background:#ffffff"] *,
button[style*="background-color: #ffffff"] *,
button[style*="background-color:#ffffff"] *,
.btn[style*="background: #fff"] *,
.btn[style*="background:#fff"] *,
.btn[style*="background: white"] *,
.btn[style*="background-color: #fff"] *,
.btn[style*="background-color:#fff"] *,
.btn[style*="background-color: white"] * {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

/* ==========================================================================
   DEDICATED BUTTONS: PRINT, EXCEL, PDF (AND BY CLASS VARIANTS) -> WHITE COLOR
   ========================================================================== */
/* 1. EXCEL & EXCEL BY CLASS BUTTONS */
.btn-excel:not(.dropdown-item):not(.import-hub-item),
.btn-excel-class:not(.dropdown-item):not(.import-hub-item),
button.btn-excel:not(.dropdown-item):not(.import-hub-item),
button.btn-excel-class:not(.dropdown-item):not(.import-hub-item),
a.btn-excel:not(.dropdown-item):not(.import-hub-item),
a.btn-excel-class:not(.dropdown-item):not(.import-hub-item),
button:has(> i.fa-file-excel):not(.dropdown-item):not(.import-hub-item),
button:has(i.fa-file-excel):not(.dropdown-item):not(.import-hub-item),
button:has(.fa-file-excel):not(.dropdown-item):not(.import-hub-item),
a:has(i.fa-file-excel):not(.dropdown-item):not(.import-hub-item),
button[title*="Excel" i]:not(.dropdown-item):not(.import-hub-item),
button[title*="Excel by Class" i]:not(.dropdown-item):not(.import-hub-item),
button[title*="Excel តាមថ្នាក់"]:not(.dropdown-item):not(.import-hub-item),
button[style*="#16a34a"]:not(.dropdown-item):not(.import-hub-item),
button[style*="#059669"]:not(.dropdown-item):not(.import-hub-item),
button[style*="rgb(22, 163, 74)"]:not(.dropdown-item):not(.import-hub-item),
button[style*="rgb(5, 150, 105)"]:not(.dropdown-item):not(.import-hub-item) {
  background-color: #16a34a !important;
  border: 1px solid #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-excel:not(.dropdown-item):not(.import-hub-item):hover,
.btn-excel-class:not(.dropdown-item):not(.import-hub-item):hover,
button.btn-excel:not(.dropdown-item):not(.import-hub-item):hover,
button.btn-excel-class:not(.dropdown-item):not(.import-hub-item):hover,
button:has(i.fa-file-excel):not(.dropdown-item):not(.import-hub-item):hover,
button[title*="Excel" i]:not(.dropdown-item):not(.import-hub-item):hover {
  background-color: #15803d !important;
  border-color: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-excel:not(.dropdown-item):not(.import-hub-item) *,
.btn-excel-class:not(.dropdown-item):not(.import-hub-item) *,
button.btn-excel:not(.dropdown-item):not(.import-hub-item) *,
button.btn-excel-class:not(.dropdown-item):not(.import-hub-item) *,
a.btn-excel:not(.dropdown-item):not(.import-hub-item) *,
a.btn-excel-class:not(.dropdown-item):not(.import-hub-item) *,
button:has(i.fa-file-excel):not(.dropdown-item):not(.import-hub-item) *,
button:has(.fa-file-excel):not(.dropdown-item):not(.import-hub-item) *,
a:has(i.fa-file-excel):not(.dropdown-item):not(.import-hub-item) *,
button[title*="Excel" i]:not(.dropdown-item):not(.import-hub-item) *,
button[title*="Excel by Class" i]:not(.dropdown-item):not(.import-hub-item) *,
button[title*="Excel តាមថ្នាក់"]:not(.dropdown-item):not(.import-hub-item) *,
button[style*="#16a34a"]:not(.dropdown-item):not(.import-hub-item) *,
button[style*="#059669"]:not(.dropdown-item):not(.import-hub-item) *,
button[style*="rgb(22, 163, 74)"]:not(.dropdown-item):not(.import-hub-item) *,
button[style*="rgb(5, 150, 105)"]:not(.dropdown-item):not(.import-hub-item) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 2. PDF & PDF BY CLASS BUTTONS */
.btn-pdf,
.btn-pdf-class,
button.btn-pdf,
button.btn-pdf-class,
a.btn-pdf,
a.btn-pdf-class,
button:has(> i.fa-file-pdf),
button:has(i.fa-file-pdf),
button:has(.fa-file-pdf),
a:has(i.fa-file-pdf),
button[title*="PDF" i],
button[title*="PDF by Class" i],
button[title*="PDF តាមថ្នាក់"],
button[style*="#dc2626"],
button[style*="#ef4444"],
button[style*="rgb(220, 38, 38)"],
button[style*="rgb(239, 68, 68)"] {
  background-color: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-pdf:hover,
.btn-pdf-class:hover,
button.btn-pdf:hover,
button.btn-pdf-class:hover,
button:has(i.fa-file-pdf):hover,
button[title*="PDF" i]:hover {
  background-color: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-pdf *,
.btn-pdf-class *,
button.btn-pdf *,
button.btn-pdf-class *,
a.btn-pdf *,
a.btn-pdf-class *,
button:has(i.fa-file-pdf) *,
button:has(.fa-file-pdf) *,
a:has(i.fa-file-pdf) *,
button[title*="PDF" i] *,
button[title*="PDF by Class" i] *,
button[title*="PDF តាមថ្នាក់"] *,
button[style*="#dc2626"] *,
button[style*="#ef4444"] *,
button[style*="rgb(220, 38, 38)"] *,
button[style*="rgb(239, 68, 68)"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 3. PRINT / PRINTER & PRINT BY CLASS BUTTONS */
.btn-print,
.btn-print-class,
button.btn-print,
button.btn-print-class,
a.btn-print,
a.btn-print-class,
button:has(> i.fa-print),
button:has(i.fa-print),
button:has(.fa-print),
a:has(i.fa-print),
button[title*="Print" i],
button[title*="Printer" i],
button[title*="Print by Class" i],
button[title*="បោះពុម្ព"],
button[title*="បោះពុម្ពតាមថ្នាក់"],
button[style*="#0284c7"],
button[style*="#2563eb"],
button[style*="#1e3a8a"]:has(i.fa-print),
button[style*="rgb(2, 132, 199)"] {
  background-color: #0284c7 !important;
  border: 1px solid #0284c7 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-print:hover,
.btn-print-class:hover,
button.btn-print:hover,
button.btn-print-class:hover,
button:has(i.fa-print):hover,
button[title*="Print" i]:hover {
  background-color: #0369a1 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-print *,
.btn-print-class *,
button.btn-print *,
button.btn-print-class *,
a.btn-print *,
a.btn-print-class *,
button:has(i.fa-print) *,
button:has(.fa-print) *,
a:has(i.fa-print) *,
button[title*="Print" i] *,
button[title*="Printer" i] *,
button[title*="Print by Class" i] *,
button[title*="បោះពុម្ព"] *,
button[title*="បោះពុម្ពតាមថ្នាក់"] *,
button[style*="#0284c7"] *,
button[style*="#2563eb"] *,
button[style*="#1e3a8a"]:has(i.fa-print) *,
button[style*="rgb(2, 132, 199)"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 3.1 ICON-ONLY BUTTON SIZING & ALIGNMENT HARMONY */
.btn-print,
.btn-print-class,
.btn-excel,
.btn-excel-class,
.btn-pdf,
.btn-pdf-class {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
}
.btn-print.btn-sm,
.btn-print-class.btn-sm,
.btn-excel.btn-sm,
.btn-excel-class.btn-sm,
.btn-pdf.btn-sm,
.btn-pdf-class.btn-sm {
  min-width: 32px;
  height: 30px;
  padding: 0 9px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
}

/* 4. EN BUTTON */
.btn-en.active,
button.btn-en.active,
.btn-en.btn-primary,
button.btn-en.btn-primary,
.modal-lang-tab-btn.active,
button[data-lang="en"].active,
button[style*="#1e3a8a"],
button[style*="rgb(30, 58, 138)"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-en.active *,
button.btn-en.active *,
.btn-en.btn-primary *,
button.btn-en.btn-primary *,
.modal-lang-tab-btn.active *,
button[data-lang="en"].active *,
button[style*="#1e3a8a"] *,
button[style*="rgb(30, 58, 138)"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 5. CLOSE BUTTON */
.btn-close-modal,
button.btn-close-modal,
.btn-close-action,
button.btn-close-action,
.modal-footer button.btn-secondary,
.modal-footer .btn-secondary,
button[data-action="close"],
button:has(> i.fa-times),
button:has(i.fa-times) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.btn-close-modal *,
button.btn-close-modal *,
.btn-close-action *,
button.btn-close-action *,
.modal-footer button.btn-secondary *,
.modal-footer .btn-secondary *,
button[data-action="close"] *,
button:has(> i.fa-times) *,
button:has(i.fa-times) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   LIGHT BACKGROUNDS & BADGES CONTRAST RULES
   - Badges, pills, tags, chips with light/pastel backgrounds must ALWAYS
     display high-contrast colored text (never white).
   - Resolves issues with gender badges (Male = light blue, Female = light pink)
     and status badges being unreadable.
   ========================================================================== */

/* Universal badge foundation */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1.25;
}

/* Badges with inline or computed custom color respect their color */
.badge[style*="color"],
span.badge[style*="color"] {
  -webkit-text-fill-color: currentColor !important;
}

.badge > * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

/* 1. GENDER: Female / Danger (Soft Pink Background -> Deep Rose/Magenta Text) */
.badge-danger,
.badge.badge-danger,
span.badge.badge-danger,
span.badge-danger {
  background-color: #fdf2f8 !important;
  background: #fdf2f8 !important;
  color: #be185d !important;
  -webkit-text-fill-color: #be185d !important;
  border: 1px solid #fbcfe8 !important;
}

/* 2. GENDER: Male / Info (Soft Sky Blue Background -> Deep Royal Blue Text) */
.badge-info,
.badge.badge-info,
span.badge.badge-info,
span.badge-info {
  background-color: #eff6ff !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

/* 3. STATUS: Success / Approved / Active (Soft Green Background -> Deep Emerald Text) */
.badge-success,
.badge.badge-success,
span.badge.badge-success,
span.badge-success,
.badge-approved,
.badge.badge-approved {
  background-color: #f0fdf4 !important;
  background: #f0fdf4 !important;
  color: #15803d !important;
  -webkit-text-fill-color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

/* 4. STATUS: Warning / Pending / Late (Soft Amber Background -> Deep Amber/Orange Text) */
.badge-warning,
.badge.badge-warning,
span.badge.badge-warning,
span.badge-warning {
  background-color: #fffbeb !important;
  background: #fffbeb !important;
  color: #b45309 !important;
  -webkit-text-fill-color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.badge-pending,
.badge.badge-pending {
  background-color: #fff3e0 !important;
  background: #fff3e0 !important;
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
  border: 1px solid #fed7aa !important;
}

/* 5. STATUS: Rejected / Absent (Soft Rose Background -> Deep Red Text) */
.badge-rejected,
.badge.badge-rejected {
  background-color: #ffebee !important;
  background: #ffebee !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

/* 6. Primary / Graduated / Academic Level Badge (Soft Indigo Background -> Deep Indigo Text) */
.badge-primary,
.badge.badge-primary,
span.badge.badge-primary,
span.badge-primary {
  background-color: #e0e7ff !important;
  background: #e0e7ff !important;
  color: #3730a3 !important;
  -webkit-text-fill-color: #3730a3 !important;
  border: 1px solid #c7d2fe !important;
}

/* 7. Outline / Neutral Tag Badges */
.badge-tag,
.badge-outline,
.badge.badge-outline,
.badge-secondary,
.badge.badge-secondary {
  background-color: #f8fafc !important;
  background: #f8fafc !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

/* 8. Component Status Badges (Teacher/Student Dashboard) */
.badge-status-green {
  background-color: #dcfce7 !important;
  background: #dcfce7 !important;
  color: #15803d !important;
  -webkit-text-fill-color: #15803d !important;
  border: 1px solid #86efac !important;
}

.badge-status-yellow {
  background-color: #fef9c3 !important;
  background: #fef9c3 !important;
  color: #a16207 !important;
  -webkit-text-fill-color: #a16207 !important;
  border: 1px solid #fde047 !important;
}

.badge-status-red {
  background-color: #fee2e2 !important;
  background: #fee2e2 !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

.badge-status-orange {
  background-color: #ffedd5 !important;
  background: #ffedd5 !important;
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
  border: 1px solid #fdba74 !important;
}

/* 9. Payment Status Badges */
.badge-payment-paid {
  background-color: #ecfdf5 !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  -webkit-text-fill-color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

.badge-payment-partial {
  background-color: #eff6ff !important;
  background: #eff6ff !important;
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
  border: 1px solid #bfdbfe !important;
}

.badge-payment-pending {
  background-color: #fffbeb !important;
  background: #fffbeb !important;
  color: #92400e !important;
  -webkit-text-fill-color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.badge-payment-overdue {
  background-color: #fef2f2 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

/* 10. Grade Badges */
.badge-grade-a {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  -webkit-text-fill-color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}
.badge-grade-b {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  -webkit-text-fill-color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}
.badge-grade-c {
  background-color: #fef9c3 !important;
  color: #a16207 !important;
  -webkit-text-fill-color: #a16207 !important;
  border: 1px solid #fef08a !important;
}
.badge-grade-d {
  background-color: #ffedd5 !important;
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
  border: 1px solid #fed7aa !important;
}
.badge-grade-f {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

/* 11. Rate & Discipline Badges */
.badge-rate-high {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  -webkit-text-fill-color: #065f46 !important;
}
.badge-rate-mid {
  background-color: #fffbeb !important;
  color: #92400e !important;
  -webkit-text-fill-color: #92400e !important;
}
.badge-rate-low {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}

.badge-disc-warn {
  background-color: #fff7ed !important;
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
  border: 1px solid #ffedd5 !important;
}
.badge-disc-severe {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
  border: 1px solid #fee2e2 !important;
}
.badge-disc-info {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border: 1px solid #dbeafe !important;
}

/* 12. Solid Dark Badges (Keep white text) */
.badge-dark,
.badge.badge-dark {
  background-color: #1e293b !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.badge-accent,
.badge.badge-accent {
  background-color: var(--accent, #4f46e5) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 2. WHITE BACKGROUNDS -> TEXT COLOR BLUE OR BLACK ── */
/* Base surfaces with white background */
.card,
.card-body,
.card-header,
.card-footer,
.modal-content,
.modal-body,
.modal-header:not([class*="bg-"]):not([style*="background: #1"]):not([style*="background: #0"]):not(.bg-primary),
.modal-footer:not([class*="bg-"]):not([style*="background: #1"]):not([style*="background: #0"]),
.bg-white,
.a4-sheet-canvas,
.a4-score-sheet,
.design-curriculum-table-wrapper,
.table-wrapper {
  background-color: #ffffff;
  color: #0f172a;
}

/* Headings on white surfaces: blue (Only when NOT inside a dark container or header) */
.bg-white h1:not(.text-white):not([class*="text-white"]),
.bg-white h2:not(.text-white):not([class*="text-white"]),
.bg-white h3:not(.text-white):not([class*="text-white"]),
.bg-white h4:not(.text-white):not([class*="text-white"]),
.card h1:not(.text-white):not([class*="text-white"]),
.card h2:not(.text-white):not([class*="text-white"]),
.card h3:not(.text-white):not([class*="text-white"]),
.card h4:not(.text-white):not([class*="text-white"]),
.modal-content h1:not(.text-white):not([class*="text-white"]),
.modal-content h2:not(.text-white):not([class*="text-white"]),
.modal-content h3:not(.text-white):not([class*="text-white"]),
.modal-content h4:not(.text-white):not([class*="text-white"]),
.a4-score-sheet h1:not(.text-white):not([class*="text-white"]),
.a4-score-sheet h2:not(.text-white):not([class*="text-white"]),
.a4-score-sheet h3:not(.text-white):not([class*="text-white"]) {
  color: #1e3a8a;
}

/* Paragraphs, labels, spans on white surfaces: dark slate (EXCLUDE dark backgrounds, buttons, and explicit white text) */
.bg-white p:not(.text-white):not([class*="text-white"]),
.bg-white label:not(.text-white):not([class*="text-white"]),
.bg-white span:not(.badge):not(.text-white):not([class*="text-white"]):not(.bg-dark):not(.bg-primary):not(button *):not(.btn *),
.card p:not(.text-white):not([class*="text-white"]),
.card label:not(.text-white):not([class*="text-white"]),
.card span:not(.badge):not(.text-white):not([class*="text-white"]):not(.bg-dark):not(.bg-primary):not(button *):not(.btn *),
.modal-content p:not(.text-white):not([class*="text-white"]),
.modal-content label:not(.text-white):not([class*="text-white"]),
.modal-content span:not(.badge):not(.text-white):not([class*="text-white"]):not(.bg-dark):not(.bg-primary):not(button *):not(.btn *),
.a4-score-sheet p:not(.text-white):not([class*="text-white"]),
.a4-score-sheet label:not(.text-white):not([class*="text-white"]),
.a4-score-sheet span:not(.badge):not(.text-white):not([class*="text-white"]):not(.bg-dark):not(.bg-primary):not(button *):not(.btn *) {
  color: #0f172a;
}

/* Interactive inputs, selects, textareas with white background */
input:not([type="submit"]):not([type="button"]):not(.btn):not(.btn *),
select,
textarea,
.form-control,
.filter-input,
.filter-select,
.table-input,
.matrix-cell-input,
.searchable-select-input {
  background-color: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* White search inputs use crisp blue */
input[type="search"],
.search-input,
.searchable-select-input {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

/* Outline and white buttons on white background use blue text (excluding cancel, trash, warning, danger) */
.btn-outline:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):not(.btn-cancel):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-danger):not(.btn-success):not(.btn-primary):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Cancel" i]):not([title*="Trash" i]):not([title*="បោះបង់"]):not([title*="ធុងសំរាម"]):not(:has(i.fa-times)):not(:has(.fa-times)):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(.modal-footer *):not(.modal-footer button),
.btn-outline:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):not(.btn-cancel):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-danger):not(.btn-success):not(.btn-primary):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Cancel" i]):not([title*="Trash" i]):not([title*="បោះបង់"]):not([title*="ធុងសំរាម"]):not(:has(i.fa-times)):not(:has(.fa-times)):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(.modal-footer *):not(.modal-footer button) *,
.btn-white:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)),
.btn-white:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)) *,
.btn-light:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)),
.btn-light:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)) * {
  background-color: #ffffff !important;
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  border-color: #cbd5e1 !important;
}

.btn-outline:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):not(.btn-cancel):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-danger):not(.btn-success):not(.btn-primary):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Cancel" i]):not([title*="Trash" i]):not([title*="បោះបង់"]):not([title*="ធុងសំរាម"]):not(:has(i.fa-times)):not(:has(.fa-times)):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(.modal-footer *):not(.modal-footer button):hover,
.btn-outline:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):not(.btn-cancel):not(.btn-warning):not(.btn-trash):not(.btn-amber):not(.btn-danger):not(.btn-success):not(.btn-primary):not([data-action="cancel"]):not([data-action="close"]):not([data-action="trash"]):not([title*="Cancel" i]):not([title*="Trash" i]):not([title*="បោះបង់"]):not([title*="ធុងសំរាម"]):not(:has(i.fa-times)):not(:has(.fa-times)):not(:has(i.fa-trash-alt)):not(:has(.fa-trash-alt)):not(.modal-footer *):not(.modal-footer button):hover *,
.btn-white:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):hover,
.btn-white:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):hover *,
.btn-light:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):hover,
.btn-light:not(:has(i.fa-file-import)):not(:has(i.fa-file-export)):not(:has(i.fa-arrow-circle-up)):not(:has(i.fa-graduation-cap)):hover * {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

/* Dedicated high-contrast styling for Set as Default Star buttons and Default badges */
.btn-default-star {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-default-star:hover {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
  color: #d97706 !important;
}

.btn-default-star.active {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
  color: #d97706 !important;
}

.btn-default-star.active i,
.btn-default-star.active svg {
  color: #d97706 !important;
}

.badge-is-default {
  background-color: #fffbeb !important;
  background: #fffbeb !important;
  color: #b45309 !important;
  -webkit-text-fill-color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-weight: 600 !important;
}

.badge-is-default i,
.badge-is-default svg {
  color: #d97706 !important;
}

/* Tables, cells, rows with white background (Only non-dark rows) */
table.table-bordered,
table.scoring-table,
table.midpro-table,
table.semester-table,
table.matrix-table,
table.design-curriculum-table {
  background-color: #ffffff;
  color: #0f172a;
}

table.table-bordered tr:not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background: #2"]):not([style*="background: #3"]):not([style*="background: #4"]):not(.bg-dark):not(.bg-primary) td:not([style*="color: #fff"]):not([style*="color:#fff"]),
table.scoring-table tr:not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background: #2"]):not([style*="background: #3"]):not([style*="background: #4"]):not(.bg-dark):not(.bg-primary) td:not([style*="color: #fff"]):not([style*="color:#fff"]),
table.midpro-table tr:not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background: #2"]):not([style*="background: #3"]):not([style*="background: #4"]):not(.bg-dark):not(.bg-primary) td:not([style*="color: #fff"]):not([style*="color:#fff"]),
table.semester-table tr:not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background: #2"]):not([style*="background: #3"]):not([style*="background: #4"]):not(.bg-dark):not(.bg-primary) td:not([style*="color: #fff"]):not([style*="color:#fff"]),
table.matrix-table tr:not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background: #2"]):not([style*="background: #3"]):not([style*="background: #4"]):not(.bg-dark):not(.bg-primary) td:not([style*="color: #fff"]):not([style*="color:#fff"]),
table.design-curriculum-table tr:not([style*="background: #1"]):not([style*="background-color: #1"]):not([style*="background: #0"]):not([style*="background: #2"]):not([style*="background: #3"]):not([style*="background: #4"]):not(.bg-dark):not(.bg-primary) td:not([style*="color: #fff"]):not([style*="color:#fff"]) {
  color: #0f172a;
}

/* ==========================================================================
   UNIVERSAL DARK BACKGROUND CONTRAST GUARANTEE
   - Any dark background (navy, dark blue, slate, dark indigo) MUST have white text.
   - Prevents black text on dark surfaces across cards, modals, tables, and buttons.
   ========================================================================== */

/* 1. Elements with dark background styles */
[style*="background: #1e"],
[style*="background-color: #1e"],
[style*="background:#1e"],
[style*="background-color:#1e"],
[style*="background: #0f"],
[style*="background-color: #0f"],
[style*="background:#0f"],
[style*="background-color:#0f"],
[style*="background: #11"],
[style*="background-color: #11"],
[style*="background: #1f"],
[style*="background-color: #1f"],
[style*="background: #312e81"],
[style*="background: #3730a3"],
[style*="background: #4f46e5"],
[style*="background: #2563eb"],
[style*="background: #1d4ed8"],
[style*="background: #1565c0"],
[style*="background: #166534"],
[style*="background: #15803d"],
[style*="background: #991b1b"],
[style*="background: #b91c1c"],
[style*="background: #dc2626"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 2. Text elements inside dark backgrounds (except inputs, selects, pastel badges) */
[style*="background: #1e"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background-color: #1e"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background:#1e"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background-color:#1e"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background: #0f"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background-color: #0f"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background:#0f"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background-color:#0f"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background: #11"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *),
[style*="background: #1f"] *:not(.badge):not(.badge *):not(input):not(select):not(textarea):not(option):not(.dropdown-menu *):not(.searchable-select-dropdown *) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 3. Table Rows, Headers, and Cells with dark background */
tr[style*="background: #1e"] td,
tr[style*="background: #1e"] th,
tr[style*="background-color: #1e"] td,
tr[style*="background-color: #1e"] th,
tr[style*="background:#1e"] td,
tr[style*="background:#1e"] th,
tr[style*="background-color:#1e"] td,
tr[style*="background-color:#1e"] th,
tr[style*="background: #0f"] td,
tr[style*="background: #0f"] th,
tr[style*="background: #11"] td,
tr[style*="background: #11"] th,
tr[style*="background: #1f"] td,
tr[style*="background: #1f"] th,
tr[style*="background: #312e81"] td,
tr[style*="background: #312e81"] th,
tr[style*="background: #4f46e5"] td,
tr[style*="background: #4f46e5"] th,
tr[style*="background: #2563eb"] td,
tr[style*="background: #2563eb"] th,
thead[style*="background: #1e"] th,
thead[style*="background: #1e"] td,
thead[style*="background-color: #1e"] th,
thead[style*="background-color: #1e"] td,
thead[style*="background:#1e"] th,
thead[style*="background:#1e"] td,
thead[style*="background-color:#1e"] th,
thead[style*="background-color:#1e"] td,
thead[style*="background: #0f"] th,
thead[style*="background: #11"] th,
thead[style*="background: #1f"] th,
thead.bg-dark th,
thead.bg-primary th {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 4. Explicit white text classes (STRICT: Never match background-color or border-color) */
.text-white,
[class*="text-white"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.text-white > i,
.text-white > span:not([class*="text-"]):not([style*="color"]):not(.badge):not(.badge *),
[class*="text-white"] > i,
[class*="text-white"] > span:not([class*="text-"]):not([style*="color"]):not(.badge):not(.badge *) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Schedule cell content must ALWAYS display crisp dark readable text on light backgrounds across all views */
.schedule-cell-content,
.schedule-cell-content *:not(.draft-badge):not(.draft-badge *):not(.coteacher-badge):not(.coteacher-badge *):not(.room-name):not(.room-name *):not(.class-name):not(.class-name *) {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
.schedule-cell-content .subject-code,
.schedule-cell-content .subject-name {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 800 !important;
}
.schedule-cell-content .class-name {
  color: #0369a1 !important;
  -webkit-text-fill-color: #0369a1 !important;
  font-weight: 700 !important;
}
.schedule-cell-content .coteacher-badge,
.schedule-cell-content .coteacher-badge * {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background-color: #eff6ff !important;
}
.schedule-cell-content .room-name,
.schedule-cell-content .room-name * {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  font-weight: 600 !important;
}
.schedule-cell-content .draft-badge,
.schedule-cell-content .draft-badge * {
  color: #b45309 !important;
  -webkit-text-fill-color: #b45309 !important;
  background-color: #fef3c7 !important;
}
.schedule-cell-empty,
.schedule-cell-empty * {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  font-weight: 600 !important;
}

/* Holiday timetable cells */
.holiday-slot-cell,
.holiday-slot-cell * {
  color: #9f1239 !important;
  -webkit-text-fill-color: #9f1239 !important;
}
.holiday-slot-cell .holiday-badge-text {
  color: #e11d48 !important;
  -webkit-text-fill-color: #e11d48 !important;
}

/* Teacher Card header badges & navigation buttons */
.teacher-assigned-badge,
.teacher-assigned-badge * {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}
.teacher-id-badge,
.teacher-id-badge * {
  color: #0369a1 !important;
  -webkit-text-fill-color: #0369a1 !important;
}
.searchable-select-trigger,
.searchable-select-trigger * {
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
}

/* White dropdown menus */
.dropdown-menu,
.searchable-select-dropdown,
.searchable-select-options,
.searchable-select-option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

.searchable-select-option:hover,
.searchable-select-option.selected {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

/* Exam Subject custom dropdown item styling */
.searchable-select-option[data-value="custom"],
.searchable-select-option .custom-option-label {
  font-weight: 500;
}

.searchable-select-option .custom-badge {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Dropdown footer custom input styling — strictly below dropdown options */
.searchable-select-footer {
  background-color: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 8px 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.searchable-select-footer .custom-exam-input {
  width: 100% !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border: 1px solid #93c5fd !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  box-sizing: border-box !important;
}

.searchable-select-footer .custom-exam-input:focus {
  background-color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
  outline: none !important;
}

/* ==========================================================================
   UNIVERSAL ACTION BUTTONS: PRIMARY, SAVE, CANCEL, DELETE, ORANGE, INFO, SECONDARY
   (Excluding action dropdowns & dropdown menu items)
   ========================================================================== */

/* ── 0. PRIMARY & BLUE & ADD NEW: BACKGROUND BLUE WITH WHITE COLOR ── */
.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[data-action="add"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[data-action="create"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Add" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Create" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="បង្កើតថ្មី"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-plus):not(.btn-success):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> .fa-plus):not(.btn-success):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #2563eb !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-plus):not(.btn-success):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> .fa-plus):not(.btn-success):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #1d4ed8 !important;
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(29, 78, 216, 0.35) !important;
  transform: translateY(-1px);
}

.btn-primary:not(.action-dropdown-item):not(.dropdown-item):active,
.btn-blue:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-primary:not(.action-dropdown-item):not(.dropdown-item):active {
  background-color: #1e40af !important;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25) !important;
}

/* ── 1. SAVE & UPDATE: BACKGROUND GREEN WITH WHITE COLOR ── */
.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-success:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-approve:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.coeff-btn-save,
button.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[data-action="save"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[data-action="update"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Save" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Update" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="រក្សាទុក"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="កែប្រែ"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="កែសម្រួល"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-save):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> .fa-save):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-floppy-disk):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #16a34a !important;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #15803d !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-success:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-approve:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.coeff-btn-save:hover,
button.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[data-action="save"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[data-action="update"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="Save" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="Update" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="រក្សាទុក"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="កែប្រែ"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="កែសម្រួល"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-save):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> .fa-save):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-floppy-disk):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #15803d !important;
  background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
  border-color: #166534 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(21, 128, 61, 0.35) !important;
  transform: translateY(-1px);
}

.btn-save:not(.action-dropdown-item):not(.dropdown-item):active,
.btn-update:not(.action-dropdown-item):not(.dropdown-item):active,
.btn-success:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-save:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-update:not(.action-dropdown-item):not(.dropdown-item):active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(21, 128, 61, 0.25) !important;
}

/* ── 2. CANCEL & TRASH: BACKGROUND WARNING WITH WHITE COLOR ── */
.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-amber:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-outline.btn-cancel,
.btn-cancel.btn-outline,
.btn.btn-outline.btn-cancel,
.btn.btn-cancel.btn-outline,
button.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-outline.btn-cancel,
button.btn-cancel.btn-outline,
a.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-outline.btn-cancel,
a.btn-cancel.btn-outline,
button[data-action="cancel"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[data-action="trash"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Cancel" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Trash" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="បោះបង់"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="ធុងសំរាម"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-times):not(.modal-close):not(.btn-danger):not(.btn-delete):not(.toast-close):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> .fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(i.fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(.fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-trash):not(.btn-danger):not(.btn-delete):not([title*="Delete" i]):not([title*="លុប"]):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> .fa-trash):not(.btn-danger):not(.btn-delete):not([title*="Delete" i]):not([title*="លុប"]):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #f59e0b !important;
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-outline.btn-cancel:hover,
.btn-cancel.btn-outline:hover,
.btn.btn-outline.btn-cancel:hover,
.btn.btn-cancel.btn-outline:hover,
button.btn-outline.btn-cancel:hover,
button.btn-cancel.btn-outline:hover,
button.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[data-action="cancel"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[data-action="trash"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="Cancel" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="Trash" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="បោះបង់"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="ធុងសំរាម"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-times):not(.modal-close):not(.btn-danger):not(.btn-delete):not(.toast-close):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> .fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(i.fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(.fa-trash-alt):not(.btn-danger):not(.btn-delete):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-trash):not(.btn-danger):not(.btn-delete):not([title*="Delete" i]):not([title*="លុប"]):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> .fa-trash):not(.btn-danger):not(.btn-delete):not([title*="Delete" i]):not([title*="លុប"]):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #d97706 !important;
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.35) !important;
  transform: translateY(-1px);
}

.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):active,
.btn-trash:not(.action-dropdown-item):not(.dropdown-item):active,
.btn-warning:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-trash:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-warning:not(.action-dropdown-item):not(.dropdown-item):active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.25) !important;
}

/* ── 3. DELETE: BACKGROUND RED WITH WHITE COLOR ── */
.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-danger-outline:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.btn-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-danger-outline:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[data-action="delete"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="Delete" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button[title*="លុប"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-delete:has(> i.fa-trash):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-danger:has(> i.fa-trash):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> i.fa-trash-can):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button:has(> .fa-trash-can):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #dc2626 !important;
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-danger-outline:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.btn-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-danger-outline:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
a.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[data-action="delete"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="Delete" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button[title*="លុប"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-delete:has(> i.fa-trash):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-danger:has(> i.fa-trash):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> i.fa-trash-can):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button:has(> .fa-trash-can):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #b91c1c !important;
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%) !important;
  border-color: #7f1d1d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.35) !important;
  transform: translateY(-1px);
}

.btn-delete:not(.action-dropdown-item):not(.dropdown-item):active,
.btn-danger:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-delete:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-danger:not(.action-dropdown-item):not(.dropdown-item):active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.25) !important;
}

/* ── 4. ORANGE BUTTONS: BACKGROUND VIVID ORANGE WITH WHITE COLOR ── */
.btn-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #ea580c !important;
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #c2410c !important;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #c2410c !important;
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%) !important;
  border-color: #9a3412 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(194, 65, 12, 0.35) !important;
  transform: translateY(-1px);
}

.btn-orange:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-orange:not(.action-dropdown-item):not(.dropdown-item):active {
  background-color: #9a3412 !important;
  transform: translateY(0);
}

/* ── 5. INFO & SKY BUTTONS: BACKGROUND SKY BLUE WITH WHITE COLOR ── */
.btn-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
a.btn-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #0284c7 !important;
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #0369a1 !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #0369a1 !important;
  background: linear-gradient(135deg, #075985 0%, #0369a1 100%) !important;
  border-color: #075985 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(3, 105, 161, 0.35) !important;
  transform: translateY(-1px);
}

.btn-info:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-info:not(.action-dropdown-item):not(.dropdown-item):active {
  background-color: #075985 !important;
  transform: translateY(0);
}

/* ── 6. SECONDARY BUTTONS: BACKGROUND SLATE WITH WHITE COLOR ── */
.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
.bg-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]),
button.bg-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) {
  background-color: #64748b !important;
  background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #475569 !important;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
.bg-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover,
button.bg-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]):hover {
  background-color: #475569 !important;
  background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
  border-color: #334155 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(71, 85, 105, 0.35) !important;
  transform: translateY(-1px);
}

.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):active,
button.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):active {
  background-color: #334155 !important;
  transform: translateY(0);
}

/* Ensure all child icons, text nodes, and spans inside action buttons inherit white (excluding dropdown items) */
.btn-primary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-blue:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-save:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-update:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-cancel:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-outline.btn-cancel *,
.btn-cancel.btn-outline *,
button.btn-outline.btn-cancel *,
button.btn-cancel.btn-outline *,
.btn.btn-outline.btn-cancel *,
.btn.btn-cancel.btn-outline *,
.btn-trash:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-delete:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-green:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-warning:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-danger-outline:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-red:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-danger:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-orange:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-info:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.btn-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
.bg-secondary:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button[title*="Save" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button[title*="Update" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button[title*="Cancel" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button[title*="Trash" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button[title*="ធុងសំរាម"]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button[title*="Delete" i]:not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button:has(> i.fa-save):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button:has(> i.fa-trash):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button:has(> i.fa-trash-alt):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button:has(i.fa-trash-alt):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) *,
button:has(.fa-trash-alt):not(.action-dropdown-item):not(.dropdown-item):not([data-no-action-style="true"]) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   STRICT DROPDOWN ACTIONS RESET: NO SOLID BACKGROUND ON DROPDOWN ITEMS (EDIT, DELETE, ETC.)
   ========================================================================== */
.action-dropdown-menu .action-dropdown-item,
.action-dropdown-menu button,
.dropdown-menu .dropdown-item,
.dropdown-menu button,
.action-dropdown-item,
.dropdown-item,
button.action-dropdown-item,
button.dropdown-item,
[data-no-action-style="true"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 0 !important;
}

/* Edit / Default item in dropdown: regular text & subtle icon */
.action-dropdown-menu .action-dropdown-item:not(.danger),
.action-dropdown-menu button:not(.danger),
.dropdown-menu .dropdown-item:not(.danger):not(.text-danger),
.dropdown-menu button:not(.danger):not(.text-danger),
.action-dropdown-item:not(.danger),
.dropdown-item:not(.danger):not(.text-danger) {
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
}

.action-dropdown-menu .action-dropdown-item:not(.danger) i,
.action-dropdown-menu button:not(.danger) i,
.dropdown-menu .dropdown-item:not(.danger):not(.text-danger) i,
.dropdown-menu button:not(.danger):not(.text-danger) i,
.action-dropdown-item:not(.danger) i,
.dropdown-item:not(.danger):not(.text-danger) i {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

.action-dropdown-menu .action-dropdown-item:not(.danger) span,
.action-dropdown-menu button:not(.danger) span,
.dropdown-menu .dropdown-item:not(.danger):not(.text-danger) span,
.dropdown-menu button:not(.danger):not(.text-danger) span,
.action-dropdown-item:not(.danger) span,
.dropdown-item:not(.danger):not(.text-danger) span {
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
}

.action-dropdown-menu .action-dropdown-item:not(.danger):hover,
.action-dropdown-menu button:not(.danger):hover,
.dropdown-menu .dropdown-item:not(.danger):not(.text-danger):hover,
.dropdown-menu button:not(.danger):not(.text-danger):hover,
.action-dropdown-item:not(.danger):hover,
.dropdown-item:not(.danger):not(.text-danger):hover {
  background: #f1f5f9 !important;
  background-color: #f1f5f9 !important;
  background-image: none !important;
  color: var(--accent, #1565c0) !important;
  -webkit-text-fill-color: var(--accent, #1565c0) !important;
  box-shadow: none !important;
  transform: none !important;
}

.action-dropdown-menu .action-dropdown-item:not(.danger):hover i,
.action-dropdown-menu button:not(.danger):hover i,
.dropdown-menu .dropdown-item:not(.danger):not(.text-danger):hover i,
.dropdown-menu button:not(.danger):not(.text-danger):hover i,
.action-dropdown-item:not(.danger):hover i,
.dropdown-item:not(.danger):not(.text-danger):hover i {
  color: var(--accent, #1565c0) !important;
  -webkit-text-fill-color: var(--accent, #1565c0) !important;
}

/* Delete item in dropdown: pure transparent background, crisp red text and icon */
.action-dropdown-menu .action-dropdown-item.danger,
.action-dropdown-menu button.danger,
.dropdown-menu .dropdown-item.danger,
.dropdown-menu .dropdown-item.text-danger,
.dropdown-menu button.danger,
.dropdown-menu button.text-danger,
.action-dropdown-item.danger,
.dropdown-item.danger,
.dropdown-item.text-danger {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
}

.action-dropdown-menu .action-dropdown-item.danger i,
.action-dropdown-menu button.danger i,
.dropdown-menu .dropdown-item.danger i,
.dropdown-menu .dropdown-item.text-danger i,
.dropdown-menu button.danger i,
.dropdown-menu button.text-danger i,
.action-dropdown-item.danger i,
.dropdown-item.danger i,
.dropdown-item.text-danger i {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
}

.action-dropdown-menu .action-dropdown-item.danger span,
.action-dropdown-menu button.danger span,
.dropdown-menu .dropdown-item.danger span,
.dropdown-menu .dropdown-item.text-danger span,
.dropdown-menu button.danger span,
.dropdown-menu button.text-danger span,
.action-dropdown-item.danger span,
.dropdown-item.danger span,
.dropdown-item.text-danger span {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
}

.action-dropdown-menu .action-dropdown-item.danger:hover,
.action-dropdown-menu button.danger:hover,
.dropdown-menu .dropdown-item.danger:hover,
.dropdown-menu .dropdown-item.text-danger:hover,
.dropdown-menu button.danger:hover,
.dropdown-menu button.text-danger:hover,
.action-dropdown-item.danger:hover,
.dropdown-item.danger:hover,
.dropdown-item.text-danger:hover {
  background: #fef2f2 !important;
  background-color: #fef2f2 !important;
  background-image: none !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
  box-shadow: none !important;
  transform: none !important;
}

.action-dropdown-menu .action-dropdown-item.danger:hover i,
.action-dropdown-menu button.danger:hover i,
.dropdown-menu .dropdown-item.danger:hover i,
.dropdown-menu .dropdown-item.text-danger:hover i,
.dropdown-menu button.danger:hover i,
.dropdown-menu button.text-danger:hover i,
.action-dropdown-item.danger:hover i,
.dropdown-item.danger:hover i,
.dropdown-item.text-danger:hover i {
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}

/* ==========================================================================
   EXPORT CENTER TYPOGRAPHY & FONT RULES
   en = Times_New_Roman.ttf
   kh = KhmerOS_battambang.ttf
   kh main title = KhmerOS_muollight.ttf
   symbol = Tacteing.TTF
   ========================================================================== */

.tacteing-font,
.export-tacteing,
.symbol,
.tacteing,
[data-font="tacteing"],
[class*="tacteing"] {
  font-family: 'Tacteing', 'Khmer OS Muol Light', serif !important;
}

.export-title-kh,
.export-center-modal .export-title-kh,
.export-center-preview .export-title-kh,
.student-export-center .export-title-kh,
.export-center-preview h1,
.export-center-preview h2,
.export-center-preview h3,
.export-center-preview .doc-title,
.export-center-preview .motto-kh {
  font-family: 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Moul', 'Times New Roman', serif !important;
}

.export-body-kh,
.export-center-modal,
.export-center-preview,
.student-export-center,
.export-center-preview table td,
.export-center-preview table th,
.export-center-preview p,
.export-center-preview span,
.export-center-preview div {
  font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', sans-serif !important;
}

.export-center-preview table th {
  font-family: 'Khmer OS Muol Light', 'Times New Roman', serif !important;
  font-weight: 700 !important;
}

.export-text-en,
[data-font="times"],
.times-font {
  font-family: 'Times New Roman', serif !important;
}

/* ==========================================================================
   EXAM ROOM PRINT ACTION BUTTONS: DESK SLIPS, SEATING SHEET, RESULTS SHEET
   ========================================================================== */

/* ── Desk Slips Button: Royal Indigo / Violet Theme ── */
.btn-desk-slips,
button.btn-desk-slips {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #4338ca !important;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease-in-out !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.btn-desk-slips:hover,
button.btn-desk-slips:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%) !important;
  background-color: #4338ca !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35) !important;
  transform: translateY(-1px);
}

.btn-desk-slips *,
button.btn-desk-slips * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── Seating Sheet Button: Executive Classic Blue Theme ── */
.btn-seating-sheet,
button.btn-seating-sheet {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  background-color: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #14532d !important;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease-in-out !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.btn-seating-sheet:hover,
button.btn-seating-sheet:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
  background-color: #1e40af !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.35) !important;
  transform: translateY(-1px);
}

.btn-seating-sheet *,
button.btn-seating-sheet * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── Results Sheet Button: Prestigious Emerald Green Theme ── */
.btn-results-sheet,
button.btn-results-sheet {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  background-color: #047857 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #065f46 !important;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease-in-out !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.btn-results-sheet:hover,
button.btn-results-sheet:hover {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  background-color: #065f46 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.35) !important;
  transform: translateY(-1px);
}

.btn-results-sheet *,
button.btn-results-sheet * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   EXAM ROOM PRINT DOCUMENTS: DESK SLIPS, SEATING SHEET, RESULTS SHEET
   ========================================================================== */

/* ── 1. Desk Slips Document (Cards Layout) ── */
.exam-desk-slips-doc {
  padding: 10px;
  font-family: 'Khmer OS Battambang', 'Times New Roman', sans-serif;
  color: #1e293b;
}

.desk-slip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.desk-slip-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 155px;
  page-break-inside: avoid;
}

.desk-slip-header {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
  color: #ffffff;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.desk-slip-header-title {
  font-size: 11pt;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: 0.02em;
}

.desk-slip-table-badge {
  background: #ffffff;
  color: #312e81 !important;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 14pt;
  font-weight: 900;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
}

.desk-slip-body {
  padding: 10px 14px;
  font-size: 10.5pt;
  line-height: 1.5;
  background: #fcfcfd;
}

.desk-slip-name-kh {
  font-size: 12pt;
  font-weight: 700;
  color: #0f172a;
}

.desk-slip-name-en {
  font-size: 10.5pt;
  color: #475569;
  font-weight: 600;
}

.desk-slip-meta-row {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 9.5pt;
  color: #334155;
}

.desk-slip-footer {
  padding: 5px 12px;
  background: #f8fafc;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8pt;
  color: #64748b;
}

/* ── 2. Candidate Seating & Attendance Sheet ── */
.exam-seating-sheet-doc {
  padding: 20px;
  font-family: 'Khmer OS Battambang', 'Times New Roman', sans-serif;
  color: #0f172a;
}

.seating-sheet-header-banner {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.seating-sheet-title {
  color: #1e3a8a;
  font-size: 14pt;
  font-weight: 800;
  margin: 6px 0 4px 0;
  font-family: 'Khmer OS Muol Light', serif;
}

.seating-sheet-subtitle {
  font-size: 10.5pt;
  color: #334155;
}

.seating-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
}

.seating-sheet-table th {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8;
  padding: 7px 6px;
  font-weight: 700;
  text-align: center;
  font-family: 'Khmer OS Muol Light', 'Times New Roman', serif;
}

.seating-sheet-table td {
  border: 1px solid #cbd5e1;
  padding: 6px;
}

.seating-sheet-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.seating-sheet-table tbody tr:hover {
  background-color: #f1f5f9;
}

.seating-sheet-table .table-num-cell {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-weight: 800;
  text-align: center;
}

/* ── 3. Room Results & Ranking Sheet ── */
.exam-results-sheet-doc {
  padding: 20px;
  font-family: 'Khmer OS Battambang', 'Times New Roman', sans-serif;
  color: #0f172a;
}

.results-sheet-header-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.results-sheet-title {
  color: #065f46;
  font-size: 14pt;
  font-weight: 800;
  margin: 6px 0 4px 0;
  font-family: 'Khmer OS Muol Light', serif;
}

.results-sheet-stats-bar {
  display: inline-flex;
  gap: 16px;
  background: #ffffff;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #86efac;
  font-size: 9.5pt;
  font-weight: 600;
  color: #065f46;
  margin-top: 8px;
}

.results-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
}

.results-sheet-table th {
  background: #065f46 !important;
  color: #ffffff !important;
  border: 1px solid #047857;
  padding: 6px 4px;
  font-weight: 700;
  text-align: center;
  font-family: 'Khmer OS Muol Light', 'Times New Roman', serif;
}

.results-sheet-table td {
  border: 1px solid #cbd5e1;
  padding: 5px 4px;
}

.results-sheet-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.results-sheet-table .col-total {
  background: #f0fdf4 !important;
  color: #065f46 !important;
  font-weight: 700;
  text-align: center;
}

.results-sheet-table .col-avg {
  background: #eff6ff !important;
  color: #1e40af !important;
  font-weight: 700;
  text-align: center;
}

.results-sheet-table .col-rank {
  background: #fefce8 !important;
  color: #854d0e !important;
  font-weight: 800;
  text-align: center;
}

.results-sheet-table .badge-pass {
  background: #dcfce7 !important;
  color: #15803d !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}

.results-sheet-table .badge-fail {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}

/* ── 4. Exam Room Multi-Page Print Break Rules (1 Room Per Page) ── */
.exam-room-print-page {
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
  break-inside: avoid;
  display: block;
  box-sizing: border-box;
  width: 100%;
}

.exam-room-print-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

@media print {
  @page {
    margin: 6mm 8mm;
  }
  .exam-room-print-page {
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-bottom: 0 !important;
  }
  .exam-room-print-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .exam-seating-sheet-doc,
  .exam-results-sheet-doc,
  .exam-desk-slips-doc {
    padding: 0 !important;
    width: 100% !important;
  }
  .seating-sheet-table tr,
  .results-sheet-table tr,
  .desk-slip-card {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* ==========================================================================
   MASTER DESIGN SYSTEM: PROFESSIONAL BUTTONS, TABS, CANCEL & SAVE CONTROLS
   ========================================================================== */

/* ── 1. Universal Contrast Protection for Buttons with Solid Backgrounds ── */
.export-center-btn,
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-desk-slips,
.btn-seating-sheet,
.btn-results-sheet,
.bg-blue,
.bg-green,
.bg-red,
.bg-orange,
.bg-info,
.bg-secondary,
.btn-blue,
.btn-green,
.btn-red,
.btn-orange,
.btn-info,
.btn-secondary,
button.btn-primary,
button.btn-success,
button.btn-danger,
button.btn-warning,
button.btn-orange,
button.btn-info,
button.btn-secondary,
button.btn-desk-slips,
button.btn-seating-sheet,
button.btn-results-sheet,
button.bg-blue,
button.bg-green,
button.bg-red,
button.bg-orange,
button[style*="background: #2563eb"],
button[style*="background-color: #2563eb"],
button[style*="background: #3b82f6"],
button[style*="background-color: #3b82f6"],
button[style*="background: #16a34a"],
button[style*="background-color: #16a34a"],
button[style*="background: #10b981"],
button[style*="background-color: #10b981"],
button[style*="background: #dc2626"],
button[style*="background-color: #dc2626"],
button[style*="background: #ef4444"],
button[style*="background-color: #ef4444"],
button[style*="background-color: rgb(37, 99, 235)"],
button[style*="background-color: rgb(37,99,235)"],
button[style*="background: rgb(37, 99, 235)"],
button[style*="background: rgb(37,99,235)"],
button[style*="rgb(37, 99, 235)"],
button[style*="rgb(37,99,235)"],
button[style*="background-color: rgb(22, 163, 74)"],
button[style*="background-color: rgb(22,163,74)"],
button[style*="background: rgb(22, 163, 74)"],
button[style*="background: rgb(22,163,74)"],
button[style*="rgb(22, 163, 74)"],
button[style*="rgb(22,163,74)"],
button[style*="background-color: rgb(220, 38, 38)"],
button[style*="background-color: rgb(220,38,38)"],
button[style*="background: rgb(220, 38, 38)"],
button[style*="background: rgb(220,38,38)"],
button[style*="rgb(220, 38, 38)"],
button[style*="rgb(220,38,38)"],
button[style*="background-color: rgb(15, 23, 42)"],
button[style*="background-color: rgb(15,23,42)"],
button[style*="background: rgb(15, 23, 42)"],
button[style*="background: rgb(15,23,42)"],
.btn[style*="background: #2563eb"],
.btn[style*="background-color: #2563eb"],
.btn[style*="background: #3b82f6"],
.btn[style*="background-color: #3b82f6"],
.btn[style*="background: #16a34a"],
.btn[style*="background-color: #16a34a"],
.btn[style*="background: #10b981"],
.btn[style*="background-color: #10b981"],
.btn[style*="background: #dc2626"],
.btn[style*="background-color: #dc2626"],
.btn[style*="background: #ef4444"],
.btn[style*="background-color: #ef4444"],
.btn[style*="rgb(37, 99, 235)"],
.btn[style*="rgb(37,99,235)"],
.btn[style*="rgb(22, 163, 74)"],
.btn[style*="rgb(22,163,74)"],
.btn[style*="rgb(220, 38, 38)"],
.btn[style*="rgb(220,38,38)"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.export-center-btn *,
.btn-primary *,
.btn-success *,
.btn-danger *,
.btn-warning *,
.btn-desk-slips *,
.btn-seating-sheet *,
.btn-results-sheet *,
.bg-blue *,
.bg-green *,
.bg-red *,
.bg-orange *,
.btn-blue *,
.btn-green *,
.btn-red *,
.btn-orange *,
.btn-info *,
.btn-secondary *,
.bg-info *,
.bg-secondary *,
button.btn-primary *,
button.btn-success *,
button.btn-danger *,
button.btn-warning *,
button.btn-orange *,
button.btn-info *,
button.btn-secondary *,
button.btn-desk-slips *,
button.btn-seating-sheet *,
button.btn-results-sheet *,
button.bg-blue *,
button.bg-green *,
button.bg-red *,
button.bg-orange *,
button.bg-info *,
button.bg-secondary *,
button[style*="background: #2563eb"] *,
button[style*="background-color: #2563eb"] *,
button[style*="background: #3b82f6"] *,
button[style*="background-color: #3b82f6"] *,
button[style*="background: #16a34a"] *,
button[style*="background-color: #16a34a"] *,
button[style*="background: #10b981"] *,
button[style*="background-color: #10b981"] *,
button[style*="background: #dc2626"] *,
button[style*="background-color: #dc2626"] *,
button[style*="background: #ef4444"] *,
button[style*="background-color: #ef4444"] *,
button[style*="background-color: rgb(37, 99, 235)"] *,
button[style*="background-color: rgb(37,99,235)"] *,
button[style*="background: rgb(37, 99, 235)"] *,
button[style*="background: rgb(37,99,235)"] *,
button[style*="rgb(37, 99, 235)"] *,
button[style*="rgb(37,99,235)"] *,
button[style*="background-color: rgb(22, 163, 74)"] *,
button[style*="background-color: rgb(22,163,74)"] *,
button[style*="background: rgb(22, 163, 74)"] *,
button[style*="background: rgb(22,163,74)"] *,
button[style*="rgb(22, 163, 74)"] *,
button[style*="rgb(22,163,74)"] *,
button[style*="background-color: rgb(220, 38, 38)"] *,
button[style*="background-color: rgb(220,38,38)"] *,
button[style*="background: rgb(220, 38, 38)"] *,
button[style*="background: rgb(220,38,38)"] *,
button[style*="rgb(220, 38, 38)"] *,
button[style*="rgb(220,38,38)"] *,
button[style*="background-color: rgb(15, 23, 42)"] *,
button[style*="background-color: rgb(15,23,42)"] *,
button[style*="background: rgb(15, 23, 42)"] *,
button[style*="background: rgb(15,23,42)"] *,
.btn[style*="background: #2563eb"] *,
.btn[style*="background-color: #2563eb"] *,
.btn[style*="background: #3b82f6"] *,
.btn[style*="background-color: #3b82f6"] *,
.btn[style*="background: #16a34a"] *,
.btn[style*="background-color: #16a34a"] *,
.btn[style*="background: #10b981"] *,
.btn[style*="background-color: #10b981"] *,
.btn[style*="background: #dc2626"] *,
.btn[style*="background-color: #dc2626"] *,
.btn[style*="background: #ef4444"] *,
.btn[style*="background-color: #ef4444"] *,
.btn[style*="rgb(37, 99, 235)"] *,
.btn[style*="rgb(37,99,235)"] *,
.btn[style*="rgb(22, 163, 74)"] *,
.btn[style*="rgb(22,163,74)"] *,
.btn[style*="rgb(220, 38, 38)"] *,
.btn[style*="rgb(220,38,38)"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 2. Universal Tab List & Active States ── */
/* ── 2. Universal Tab List & Active States (Guaranteed High Contrast, Zero White-on-White) ── */
.tab-list,
.tab-group,
.tabs,
.export-tabs,
.modal-lang-tabs,
.management-tabs-container,
.nav-tabs,
.nav-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Base Tab Elements */
.tab-btn,
.tab-item,
.export-tab,
.export-tab-btn,
.workflow-tab-btn,
.mgmt-tab-btn,
.payment-tab-btn,
.modal-lang-tab-btn,
.import-filter-tab-btn,
.coeff-view-tab,
.tab-list > button,
.tab-list > a,
.tabs > button,
.tabs > a,
.tabs > .tab-item,
.export-tabs > button,
.modal-lang-tabs > button,
[role="tablist"] > button,
[role="tablist"] > [role="tab"],
[role="tab"],
.nav-tabs .nav-link,
.nav-pills .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
  text-decoration: none;
}

/* Inactive / Default Tab Text Contrast (Guaranteed Dark, Never White) */
.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active),
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active),
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.import-filter-tab-btn:not(.is-active):not(.is-active-error),
.coeff-view-tab:not(.active),
.tab-list > button:not(.active):not([aria-selected="true"]),
.tab-list > a:not(.active):not([aria-selected="true"]),
.tabs > button:not(.active):not([aria-selected="true"]),
.tabs > a:not(.active):not([aria-selected="true"]),
.tabs > .tab-item:not(.active):not([aria-selected="true"]),
.export-tabs > button:not(.active):not([aria-selected="true"]),
[role="tablist"] > button:not(.active):not([aria-selected="true"]),
[role="tablist"] > [role="tab"]:not(.active):not([aria-selected="true"]),
[role="tab"]:not(.active):not([aria-selected="true"]),
.nav-tabs .nav-link:not(.active),
.nav-pills .nav-link:not(.active),
.filemanager--tabs button:not(.active) {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active) *,
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active) *,
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.import-filter-tab-btn:not(.is-active):not(.is-active-error) *,
.coeff-view-tab:not(.active) *,
.tab-list > button:not(.active):not([aria-selected="true"]) *,
.tab-list > a:not(.active):not([aria-selected="true"]) *,
.tabs > button:not(.active):not([aria-selected="true"]) *,
.tabs > a:not(.active):not([aria-selected="true"]) *,
.tabs > .tab-item:not(.active):not([aria-selected="true"]) *,
.export-tabs > button:not(.active):not([aria-selected="true"]) *,
[role="tablist"] > button:not(.active):not([aria-selected="true"]) *,
[role="tablist"] > [role="tab"]:not(.active):not([aria-selected="true"]) *,
[role="tab"]:not(.active):not([aria-selected="true"]) *,
.nav-tabs .nav-link:not(.active) *,
.nav-pills .nav-link:not(.active) *,
.filemanager--tabs button:not(.active) * {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

/* Inactive Tab Hover: High-Contrast Slate Background + Deep Dark Readable Text (NEVER White on White) */
.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.modal-lang-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.import-filter-tab-btn:not(.is-active):not(.is-active-error):hover,
.coeff-view-tab:not(.active):hover,
.tab-list > button:not(.active):not([aria-selected="true"]):hover,
.tab-list > a:not(.active):not([aria-selected="true"]):hover,
.tabs > button:not(.active):not([aria-selected="true"]):hover,
.tabs > a:not(.active):not([aria-selected="true"]):hover,
.tabs > .tab-item:not(.active):not([aria-selected="true"]):hover,
.export-tabs > button:not(.active):not([aria-selected="true"]):hover,
.modal-lang-tabs > button:not(.active):not([aria-selected="true"]):hover,
[role="tablist"] > button:not(.active):not([aria-selected="true"]):hover,
[role="tablist"] > [role="tab"]:not(.active):not([aria-selected="true"]):hover,
[role="tab"]:not(.active):not([aria-selected="true"]):hover,
.nav-tabs .nav-link:not(.active):hover,
.nav-pills .nav-link:not(.active):hover,
.filemanager--tabs button:not(.active):hover {
  background-color: #e2e8f0 !important;
  background: #e2e8f0 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.modal-lang-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.import-filter-tab-btn:not(.is-active):not(.is-active-error):hover *,
.coeff-view-tab:not(.active):hover *,
.tab-list > button:not(.active):not([aria-selected="true"]):hover *,
.tab-list > a:not(.active):not([aria-selected="true"]):hover *,
.tabs > button:not(.active):not([aria-selected="true"]):hover *,
.tabs > a:not(.active):not([aria-selected="true"]):hover *,
.tabs > .tab-item:not(.active):not([aria-selected="true"]):hover *,
.export-tabs > button:not(.active):not([aria-selected="true"]):hover *,
.modal-lang-tabs > button:not(.active):not([aria-selected="true"]):hover *,
[role="tablist"] > button:not(.active):not([aria-selected="true"]):hover *,
[role="tablist"] > [role="tab"]:not(.active):not([aria-selected="true"]):hover *,
[role="tab"]:not(.active):not([aria-selected="true"]):hover *,
.nav-tabs .nav-link:not(.active):hover *,
.nav-pills .nav-link:not(.active):hover *,
.filemanager--tabs button:not(.active):hover * {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* Active Tabs: Solid Green with Crisp Pure White Text */
.tab-btn.active,
.tab-item.active,
.export-tab.active,
.export-tab-btn.active,
.workflow-tab-btn.active,
.mgmt-tab-btn.active,
.payment-tab-btn.active,
.modal-lang-tab-btn.active,
.import-filter-tab-btn.is-active,
.coeff-view-tab.active,
.tab-btn[aria-selected="true"],
.tab-item[aria-selected="true"],
.tab-list > button.active,
.tab-list > button[aria-selected="true"],
.tabs > button.active,
.tabs > button[aria-selected="true"],
.tabs > .tab-item.active,
.export-tabs > button.active,
.modal-lang-tabs > button.active,
[role="tablist"] > button.active,
[role="tablist"] > [role="tab"].active,
[role="tab"][aria-selected="true"],
.nav-tabs .nav-link.active,
.nav-pills .nav-link.active,
.filemanager--tabs li.active button {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  background-color: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #15803d !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3) !important;
}

.tab-btn.active *,
.tab-item.active *,
.export-tab.active *,
.export-tab-btn.active *,
.workflow-tab-btn.active *,
.mgmt-tab-btn.active *,
.payment-tab-btn.active *,
.modal-lang-tab-btn.active *,
.import-filter-tab-btn.is-active *,
.coeff-view-tab.active *,
.tab-btn[aria-selected="true"] *,
.tab-item[aria-selected="true"] *,
.tab-list > button.active *,
.tab-list > button[aria-selected="true"] *,
.tabs > button.active *,
.tabs > button[aria-selected="true"] *,
.tabs > .tab-item.active *,
.export-tabs > button.active *,
.modal-lang-tabs > button.active *,
[role="tablist"] > button.active *,
[role="tablist"] > [role="tab"].active *,
[role="tab"][aria-selected="true"] *,
.nav-tabs .nav-link.active *,
.nav-pills .nav-link.active *,
.filemanager--tabs li.active button * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Active Tab Hover: Retain Solid State with White Text */
.tab-btn.active:hover,
.tab-item.active:hover,
.export-tab.active:hover,
.export-tab-btn.active:hover,
.workflow-tab-btn.active:hover,
.mgmt-tab-btn.active:hover,
.payment-tab-btn.active:hover,
.modal-lang-tab-btn.active:hover,
.import-filter-tab-btn.is-active:hover,
.coeff-view-tab.active:hover,
.tab-btn[aria-selected="true"]:hover,
.tab-item[aria-selected="true"]:hover,
.tab-list > button.active:hover,
.tabs > button.active:hover,
.tabs > .tab-item.active:hover,
.export-tabs > button.active:hover,
.modal-lang-tabs > button.active:hover,
[role="tablist"] > button.active:hover,
[role="tablist"] > [role="tab"].active:hover,
[role="tab"][aria-selected="true"]:hover,
.nav-tabs .nav-link.active:hover,
.nav-pills .nav-link.active:hover,
.filemanager--tabs li.active button:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
  background-color: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.4) !important;
}

.tab-btn.active:hover *,
.tab-item.active:hover *,
.export-tab.active:hover *,
.export-tab-btn.active:hover *,
.workflow-tab-btn.active:hover *,
.mgmt-tab-btn.active:hover *,
.payment-tab-btn.active:hover *,
.modal-lang-tab-btn.active:hover *,
.import-filter-tab-btn.is-active:hover *,
.coeff-view-tab.active:hover *,
.tab-btn[aria-selected="true"]:hover *,
.tab-item[aria-selected="true"]:hover *,
.tab-list > button.active:hover *,
.tabs > button.active:hover *,
.tabs > .tab-item.active:hover *,
.export-tabs > button.active:hover *,
.modal-lang-tabs > button.active:hover *,
[role="tablist"] > button.active:hover *,
[role="tablist"] > [role="tab"].active:hover *,
[role="tab"][aria-selected="true"]:hover *,
.nav-tabs .nav-link.active:hover *,
.nav-pills .nav-link.active:hover *,
.filemanager--tabs li.active button:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 2.1 Exam Curriculum Action Buttons (Take All / Skip All Exams) -> Gradient Green & Pure White Text ── */
.btn-take-all-exams,
.btn-skip-all-exams,
.btn-term-toggle-all,
button.btn-take-all-exams,
button.btn-skip-all-exams,
button.btn-term-toggle-all,
button[data-action="take-all-exams"],
button[data-action="skip-all-exams"],
button[data-action="term-toggle-all"],
button[title*="Skip All Exams" i],
button[title*="Take All Exams" i],
button[title*="រំលងទាំងអស់"],
button[title*="ប្រឡងទាំងអស់"] {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  background-color: #16a34a !important;
  border: 1px solid #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-take-all-exams *,
.btn-skip-all-exams *,
.btn-term-toggle-all *,
button.btn-take-all-exams *,
button.btn-skip-all-exams *,
button.btn-term-toggle-all *,
button[data-action="take-all-exams"] *,
button[data-action="skip-all-exams"] *,
button[data-action="term-toggle-all"] *,
button[title*="Skip All Exams" i] *,
button[title*="Take All Exams" i] *,
button[title*="រំលងទាំងអស់"] *,
button[title*="ប្រឡងទាំងអស់"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-take-all-exams:hover,
.btn-skip-all-exams:hover,
.btn-term-toggle-all:hover,
button.btn-take-all-exams:hover,
button.btn-skip-all-exams:hover,
button.btn-term-toggle-all:hover,
button[data-action="take-all-exams"]:hover,
button[data-action="skip-all-exams"]:hover,
button[data-action="term-toggle-all"]:hover,
button[title*="Skip All Exams" i]:hover,
button[title*="Take All Exams" i]:hover,
button[title*="រំលងទាំងអស់"]:hover,
button[title*="ប្រឡងទាំងអស់"]:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
  background-color: #15803d !important;
  border-color: #166534 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35) !important;
  transform: translateY(-1px);
}

.btn-take-all-exams:hover *,
.btn-skip-all-exams:hover *,
.btn-term-toggle-all:hover *,
button.btn-take-all-exams:hover *,
button.btn-skip-all-exams:hover *,
button.btn-term-toggle-all:hover *,
button[data-action="take-all-exams"]:hover *,
button[data-action="skip-all-exams"]:hover *,
button[data-action="term-toggle-all"]:hover *,
button[title*="Skip All Exams" i]:hover *,
button[title*="Take All Exams" i]:hover *,
button[title*="រំលងទាំងអស់"]:hover *,
button[title*="ប្រឡងទាំងអស់"]:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 2.2 Batch, Auto Generate, Visible & Auto Action Buttons & Badges -> Pure White Text & Icons ── */
.btn-batch,
.btn-auto-generate,
.btn-auto,
.btn-visibility,
.btn-visible,
.btn-hidden,
.badge-publish-status,
.draft-badge,
button.btn-batch,
button.btn-auto-generate,
button.btn-auto,
button.btn-visibility,
button.btn-visible,
button.btn-hidden,
button[data-action="batch"],
button[data-action="auto-generate"],
button[data-action="auto"],
button[data-action="visibility"],
button[title*="Auto Generate" i],
button[title*="បង្កើតស្វ័យប្រវត្តិ"],
button[title*="Batch" i],
button[title*="ចាត់តាំងច្រើន"],
button[title*="ចាត់តាំងដោយផ្ទាល់"],
button[title*="Visible" i],
button[style*="background: #0d9488"],
button[style*="background-color: #0d9488"],
button[style*="background: #4f46e5"],
button[style*="background-color: #4f46e5"],
button[style*="background: #10b981"],
button[style*="background-color: #10b981"],
button[style*="background: #059669"],
button[style*="background-color: #059669"],
button[style*="#4338ca"],
button[style*="#0f766e"],
.btn[style*="background: #0d9488"],
.btn[style*="background-color: #0d9488"],
.btn[style*="background: #4f46e5"],
.btn[style*="background-color: #4f46e5"],
.btn[style*="background: #10b981"],
.btn[style*="background-color: #10b981"],
.btn[style*="background: #059669"],
.btn[style*="background-color: #059669"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-batch *,
.btn-auto-generate *,
.btn-auto *,
.btn-visibility *,
.btn-visible *,
.btn-hidden *,
.badge-publish-status *,
.draft-badge *,
button.btn-batch *,
button.btn-auto-generate *,
button.btn-auto *,
button.btn-visibility *,
button.btn-visible *,
button.btn-hidden *,
button[data-action="batch"] *,
button[data-action="auto-generate"] *,
button[data-action="auto"] *,
button[data-action="visibility"] *,
button[title*="Auto Generate" i] *,
button[title*="បង្កើតស្វ័យប្រវត្តិ"] *,
button[title*="Batch" i] *,
button[title*="ចាត់តាំងច្រើន"] *,
button[title*="ចាត់តាំងដោយផ្ទាល់"] *,
button[title*="Visible" i] *,
button[style*="background: #0d9488"] *,
button[style*="background-color: #0d9488"] *,
button[style*="background: #4f46e5"] *,
button[style*="background-color: #4f46e5"] *,
button[style*="background: #10b981"] *,
button[style*="background-color: #10b981"] *,
button[style*="background: #059669"] *,
button[style*="background-color: #059669"] *,
button[style*="#4338ca"] *,
button[style*="#0f766e"] *,
.btn[style*="background: #0d9488"] *,
.btn[style*="background-color: #0d9488"] *,
.btn[style*="background: #4f46e5"] *,
.btn[style*="background-color: #4f46e5"] *,
.btn[style*="background: #10b981"] *,
.btn[style*="background-color: #10b981"] *,
.btn[style*="background: #059669"] *,
.btn[style*="background-color: #059669"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-batch:hover,
.btn-auto-generate:hover,
.btn-auto:hover,
.btn-visibility:hover,
.btn-visible:hover,
.btn-hidden:hover,
button.btn-batch:hover,
button.btn-auto-generate:hover,
button.btn-auto:hover,
button.btn-visibility:hover,
button.btn-visible:hover,
button.btn-hidden:hover,
button[data-action="batch"]:hover,
button[data-action="auto-generate"]:hover,
button[data-action="auto"]:hover,
button[data-action="visibility"]:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 0.95;
}

.btn-batch:hover *,
.btn-auto-generate:hover *,
.btn-auto:hover *,
.btn-visibility:hover *,
.btn-visible:hover *,
.btn-hidden:hover *,
button.btn-batch:hover *,
button.btn-auto-generate:hover *,
button.btn-auto:hover *,
button.btn-visibility:hover *,
button.btn-visible:hover *,
button.btn-hidden:hover *,
button[data-action="batch"]:hover *,
button[data-action="auto-generate"]:hover *,
button[data-action="auto"]:hover *,
button[data-action="visibility"]:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ── 3. Standardized Cancel & Save Controls ── */
.btn-cancel,
button.btn-cancel,
a.btn-cancel,
.btn-outline.btn-cancel,
.btn-cancel.btn-outline,
button.btn-outline.btn-cancel,
button.btn-cancel.btn-outline,
.btn.btn-outline.btn-cancel,
.btn.btn-cancel.btn-outline,
.modal-footer button.btn-outline,
.modal-footer .btn-outline,
.modal-footer button.btn-secondary,
.modal-footer .btn-secondary,
.modal-footer button.btn-cancel,
.modal-footer .btn-cancel,
.modal-footer-right button.btn-outline,
.modal-footer-right .btn-outline,
.modal-footer-right button.btn-secondary,
.modal-footer-right .btn-secondary,
.modal-footer-right button.btn-cancel,
.modal-footer-right .btn-cancel,
button[data-action="cancel"],
button[data-action="close"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  background-color: #f59e0b !important;
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-cancel *,
button.btn-cancel *,
a.btn-cancel *,
.btn-outline.btn-cancel *,
.btn-cancel.btn-outline *,
button.btn-outline.btn-cancel *,
button.btn-cancel.btn-outline *,
.btn.btn-outline.btn-cancel *,
.btn.btn-cancel.btn-outline *,
.modal-footer button.btn-outline *,
.modal-footer .btn-outline *,
.modal-footer button.btn-secondary *,
.modal-footer .btn-secondary *,
.modal-footer button.btn-cancel *,
.modal-footer .btn-cancel *,
.modal-footer-right button.btn-outline *,
.modal-footer-right .btn-outline *,
.modal-footer-right button.btn-secondary *,
.modal-footer-right .btn-secondary *,
.modal-footer-right button.btn-cancel *,
.modal-footer-right .btn-cancel *,
button[data-action="cancel"] *,
button[data-action="close"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: transparent !important;
}

.btn-cancel:hover,
button.btn-cancel:hover,
a.btn-cancel:hover,
.btn-outline.btn-cancel:hover,
.btn-cancel.btn-outline:hover,
button.btn-outline.btn-cancel:hover,
button.btn-cancel.btn-outline:hover,
.btn.btn-outline.btn-cancel:hover,
.btn.btn-cancel.btn-outline:hover,
.modal-footer button.btn-outline:hover,
.modal-footer .btn-outline:hover,
.modal-footer button.btn-secondary:hover,
.modal-footer .btn-secondary:hover,
.modal-footer button.btn-cancel:hover,
.modal-footer .btn-cancel:hover,
.modal-footer-right button.btn-outline:hover,
.modal-footer-right .btn-outline:hover,
.modal-footer-right button.btn-secondary:hover,
.modal-footer-right .btn-secondary:hover,
.modal-footer-right button.btn-cancel:hover,
.modal-footer-right .btn-cancel:hover,
button[data-action="cancel"]:hover,
button[data-action="close"]:hover {
  background-color: #d97706 !important;
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.35) !important;
  transform: translateY(-1px);
}

.btn-save,
button.btn-save,
a.btn-save,
button[data-action="save"],
button[data-action="update"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #15803d !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-save *,
button.btn-save *,
a.btn-save *,
button[data-action="save"] *,
button[data-action="update"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-save:hover,
button.btn-save:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   CHAMKARIT MODERN SCHOOL - EXCEL IMPORT SYSTEM (MIXED FROM IMPORT.CSS)
   ========================================================================== */

/* ── 1. Import Center Dropdown & Button ──────────────────────────────────── */
.import-dropdown {
  position: relative;
  display: inline-block;
}

.import-dropdown.is-open {
  z-index: 2147483647 !important;
}

.import-center-btn {
  background-color: #059669 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 700 !important;
  padding: 7px 16px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.28) !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
}

.import-center-btn:hover {
  background-color: #047857 !important;
  border-color: #065f46 !important;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.38) !important;
  transform: translateY(-1px);
}

.import-center-btn:active {
  transform: translateY(0);
}

.import-center-dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2147483647;
  min-width: 330px;
  max-width: 400px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 8px 0;
  margin-top: 6px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  animation: importFadeIn 0.18s ease-out;
}

@keyframes importFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.import-dropdown-header {
  padding: 6px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}

.import-hub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent !important;
  border: none !important;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.import-hub-item:hover {
  background-color: #f0fdf4 !important;
}

.import-hub-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.import-hub-item:hover .import-hub-badge {
  transform: scale(1.08);
}

.import-badge-sample {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}

.import-badge-sample i {
  color: #15803d !important;
  -webkit-text-fill-color: #15803d !important;
}

.import-badge-upload {
  background-color: #e0f2fe !important;
  color: #0284c7 !important;
}

.import-badge-upload i {
  color: #0284c7 !important;
  -webkit-text-fill-color: #0284c7 !important;
}

.import-hub-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  line-height: 1.25;
}

.import-hub-desc {
  font-size: 11px;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  margin-top: 2px;
  line-height: 1.3;
}

/* ── 2. Searchable Filter Dropdown with Checkbox Lists ────────────────────── */
.import-filter-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.import-filter-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.import-filter-search-box {
  position: relative;
  margin-bottom: 8px;
}

.import-filter-search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  color: #0f172a !important;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.import-filter-search-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.import-filter-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
}

.import-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
}

.import-filter-link {
  color: #059669;
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.import-filter-link:hover {
  color: #047857;
}

.import-checkbox-list {
  max-height: 170px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  padding: 4px;
}

.import-checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
}

.import-checkbox-item:hover {
  background-color: #f1f5f9;
}

.import-checkbox-item.is-selected {
  background-color: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}

.import-checkbox-item input[type="checkbox"] {
  accent-color: #059669;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  cursor: pointer;
}

.import-checkbox-label {
  display: flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
}

.import-checkbox-badge {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 500;
}

.import-checkbox-item.is-selected .import-checkbox-badge {
  background: #a7f3d0;
  color: #065f46;
}

/* ── 3. Drag & Drop File Upload Zone ─────────────────────────────────────── */
.import-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  margin-bottom: 16px;
  position: relative;
}

.import-dropzone:hover,
.import-dropzone.is-dragover {
  border-color: #059669;
  background-color: #ecfdf5;
}

.import-dropzone-icon {
  font-size: 38px;
  color: #059669;
  margin-bottom: 10px;
  display: inline-block;
  animation: importBounce 2s infinite ease-in-out;
}

@keyframes importBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.import-dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.import-dropzone-subtitle {
  font-size: 12px;
  color: #64748b;
}

.import-dropzone-filechip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #10b981;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
  margin-top: 8px;
  font-size: 12px;
  color: #065f46;
  font-weight: 600;
}

/* ── 4. Live Data Preview Table ─────────────────────────────────────────── */
.import-preview-wrapper {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.import-preview-header {
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.import-preview-counts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.import-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
}

.import-pill-total {
  background: #f1f5f9;
  color: #334155;
}

.import-pill-valid {
  background: #dcfce7;
  color: #15803d;
}

.import-pill-warning {
  background: #fef3c7;
  color: #b45309;
}

.import-pill-invalid {
  background: #fee2e2;
  color: #b91c1c;
}

.import-table-container {
  max-height: 280px;
  overflow-x: auto;
  overflow-y: auto;
}

.import-preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  text-align: left;
}

.import-preview-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  padding: 9px 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
  font-size: 11.5px;
}

.import-preview-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  white-space: nowrap;
  font-size: 12px;
}

/* Sticky First and Second Columns */
.import-preview-table th.sticky-col-1,
.import-preview-table td.sticky-col-1 {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  text-align: center;
}

.import-preview-table th.sticky-col-1 {
  background: #f8fafc;
  z-index: 4;
}

.import-preview-table th.sticky-col-2,
.import-preview-table td.sticky-col-2 {
  position: sticky;
  left: 45px;
  z-index: 3;
  background: #ffffff;
  border-right: 2px solid #cbd5e1;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04);
}

.import-preview-table th.sticky-col-2 {
  background: #f8fafc;
  z-index: 4;
}

.import-preview-table tr:hover td {
  background-color: #f8fafc;
}

.import-preview-table tr:hover td.sticky-col-1,
.import-preview-table tr:hover td.sticky-col-2 {
  background-color: #f1f5f9;
}

.import-preview-table tr.has-error td {
  background-color: #fff1f2;
}

.import-preview-table tr.has-error td.sticky-col-1,
.import-preview-table tr.has-error td.sticky-col-2 {
  background-color: #ffe4e6;
}

.import-preview-table tr.has-warning td {
  background-color: #fffbeb;
}

/* Column Mapping Card */
.import-mapping-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.import-mapping-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.import-mapping-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.import-mapping-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 500;
}

.import-mapping-tag.is-missing {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.import-mapping-tag.is-extra {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* Preview Toolbar */
.import-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.import-preview-search {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  background: #ffffff;
  width: 240px;
  max-width: 100%;
}

.import-preview-search input {
  border: none;
  outline: none;
  font-size: 12px;
  color: #0f172a;
  width: 100%;
  background: transparent;
}

.import-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.import-filter-tab-btn {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.12s ease;
}

.import-filter-tab-btn:hover {
  background: #f1f5f9;
}

.import-filter-tab-btn.is-active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.import-filter-tab-btn.is-active-error {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* ── 5. Duplicate Handling Options ──────────────────────────────────────── */
.import-strategy-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.import-strategy-card {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 10px 12px;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: all 0.15s ease;
}

.import-strategy-card:hover {
  border-color: #059669;
  background: #f0fdf4;
}

.import-strategy-card.is-active {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.import-strategy-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.import-strategy-desc {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

/* ── 6. Progress Indicator & Notifications ───────────────────────────────── */
.import-progress-container {
  margin: 14px 0;
}

.import-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.import-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.import-result-summary {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
}

.import-result-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.import-result-list {
  margin-top: 8px;
  padding-left: 18px;
  font-size: 11.5px;
  color: #b91c1c;
}

/* ==========================================================================
   UNIVERSAL TRASH BUTTON COLOR: PURE WHITE TEXT & ICON
   (Guarantees white text and white icon on Trash buttons everywhere including /class-type)
   ========================================================================== */
.btn-trash,
button.btn-trash,
a.btn-trash,
button[data-action="trash"],
button[title*="Trash" i],
button[title*="ធុងសំរាម"],
button:has(> i.fa-trash-alt),
button:has(i.fa-trash-alt),
button:has(.fa-trash-alt),
.page-header-actions button:has(i.fa-trash-alt),
.page-header-actions button:has(.fa-trash-alt),
.page-header-actions button.btn-outline:has(i.fa-trash-alt) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-trash *,
button.btn-trash *,
a.btn-trash *,
button[data-action="trash"] *,
button[title*="Trash" i] *,
button[title*="ធុងសំរាម"] *,
button:has(> i.fa-trash-alt) *,
button:has(i.fa-trash-alt) *,
.page-header-actions button:has(.fa-trash-alt) *,
.page-header-actions button.btn-outline:has(i.fa-trash-alt) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: transparent !important;
}

/* ==========================================================================
   MODERN EMPLOYEE ACCOUNT & ROLE MANAGEMENT SYSTEM
   ========================================================================== */

/* KPI Header Ribbon */
.emp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.emp-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.emp-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.emp-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.emp-kpi-blue { background: #eff6ff; color: #1d4ed8; }
.emp-kpi-green { background: #f0fdf4; color: #15803d; }
.emp-kpi-amber { background: #fffbeb; color: #b45309; }
.emp-kpi-purple { background: #faf5ff; color: #7e22ce; }

.emp-kpi-content {
  flex: 1;
  min-width: 0;
}

.emp-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.emp-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.emp-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Modern Role Navigation Tabs Bar */
.emp-role-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.emp-role-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
  scrollbar-width: thin;
}

.emp-role-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}

.emp-role-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.emp-role-pill.active {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.emp-role-pill.active * {
  color: #ffffff !important;
}

.emp-pill-badge {
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.emp-role-pill.active .emp-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Role Banner / Active Role Summary */
.emp-role-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.emp-role-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emp-role-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #1e3a8a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.emp-role-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.emp-role-banner-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* Distinct Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.role-badge i {
  font-size: 10.5px;
}

.role-badge-superadmin {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  color: #ffffff !important;
  border: 1px solid #4338ca;
}
.role-badge-principal {
  background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);
  color: #ffffff !important;
  border: 1px solid #7e22ce;
}
.role-badge-teacher {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff !important;
  border: 1px solid #0284c7;
}
.role-badge-homeroom {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  border: 1px solid #059669;
}
.role-badge-headteacher {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  color: #ffffff !important;
  border: 1px solid #0891b2;
}
.role-badge-hr {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff !important;
  border: 1px solid #d97706;
}
.role-badge-accounting {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  color: #ffffff !important;
  border: 1px solid #15803d;
}
.role-badge-discipline {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff !important;
  border: 1px solid #dc2626;
}
.role-badge-library {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  color: #ffffff !important;
  border: 1px solid #b45309;
}
.role-badge-default {
  background: #f1f5f9;
  color: #334155 !important;
  border: 1px solid #cbd5e1;
}

.role-badge * {
  color: inherit !important;
  background-color: transparent !important;
}

/* Avatar Initials */
.emp-avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* Floating Batch Action Bar */
.emp-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 1050;
  animation: empSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes empSlideUp {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.emp-floating-count {
  font-weight: 700;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Role Card (Group By Role View) */
.emp-role-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
}

.emp-role-card-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1.5px solid #e2e8f0;
}

.emp-role-card-header.header-teacher { background: linear-gradient(to right, #f0f9ff, #e0f2fe); border-left: 4px solid #0284c7; }
.emp-role-card-header.header-principal { background: linear-gradient(to right, #faf5ff, #f3e8ff); border-left: 4px solid #7e22ce; }
.emp-role-card-header.header-admin { background: linear-gradient(to right, #eef2ff, #e0e7ff); border-left: 4px solid #4338ca; }
.emp-role-card-header.header-homeroom { background: linear-gradient(to right, #f0fdf4, #dcfce7); border-left: 4px solid #059669; }
.emp-role-card-header.header-hr { background: linear-gradient(to right, #fffbeb, #fef3c7); border-left: 4px solid #d97706; }
.emp-role-card-header.header-default { background: linear-gradient(to right, #f8fafc, #f1f5f9); border-left: 4px solid #64748b; }











/* ==========================================================================
   EXTRACTED STYLES FROM TSX COMPONENTS & PAGES
   ========================================================================== */

/* --- Extracted from ConfigTabs.tsx (resources/js/components/ConfigTabs.tsx) --- */
.config-tabs {
          display: flex;
          border-bottom: 2px solid var(--border);
          gap: 0;
          background: #fff;
          padding: 0 10px;
          overflow-x: auto;
          scrollbar-width: none;
        }
        .config-tabs::-webkit-scrollbar {
          display: none;
        }
        .tab-item {
          padding: 12px 20px;
          cursor: pointer;
          font-weight: 600;
          color: var(--text-secondary);
          position: relative;
          transition: all 0.2s;
          white-space: nowrap;
          border-bottom: 2px solid transparent;
          margin-bottom: -2px;
        }
        .tab-item:hover {
          color: var(--primary);
          background: rgba(0,0,0,0.02);
        }
        .tab-item.active {
          color: var(--primary);
          border-bottom: 2px solid var(--primary);
        }

/* --- Extracted from EventAlertBanner.tsx (resources/js/components/EventAlertBanner.tsx) --- */
@keyframes slideDown {
          from { opacity: 0; transform: translateY(-8px); }
          to { opacity: 1; transform: translateY(0); }
        }

/* --- Extracted from ExportModal.tsx (resources/js/components/ExportModal.tsx) --- */
@font-face {
          font-family: 'Khmer OS Battambang';
          src: url('/assets/fonts/KhmerOS_battambang.ttf') format('truetype');
          font-display: swap;
        }
        @font-face {
          font-family: 'Khmer OS Muol Light';
          src: url('/assets/fonts/KhmerOS_muollight.ttf') format('truetype');
          font-display: swap;
        }
        @font-face {
          font-family: 'Times New Roman';
          src: local('Times New Roman'), local('Times'), url('/assets/fonts/Times_New_Roman.ttf') format('truetype');
          font-display: swap;
        }
        @page {
          margin: 0 !important;
        }

        .export-designer {
          display: flex;
          gap: 0;
          height: 580px;
          overflow: hidden;
        }

        /* ─── Left Panel ─── */
        .export-settings-panel {
          width: 390px;
          flex-shrink: 0;
          display: flex;
          flex-direction: column;
          border-right: 1px solid #e5e7eb;
          overflow: hidden;
        }

        .export-tabs {
          display: flex;
          border-bottom: 2px solid #e5e7eb;
          flex-shrink: 0;
          background: #f9fafb;
        }

        .export-tab {
          flex: 1;
          padding: 9px 4px;
          border: none;
          background: transparent;
          font-size: 10px;
          color: #6b7280;
          cursor: pointer;
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 3px;
          border-bottom: 2px solid transparent;
          margin-bottom: -2px;
          transition: all 0.15s;
          font-weight: 500;
        }
        .export-tab i { font-size: 13px; }
        .export-tab:hover { color: #374151; background: #f3f4f6; }
        .export-tab.active {
          color: #1e40af;
          border-bottom-color: #1e40af;
          background: #fff;
          font-weight: 700;
        }

        .export-tab-content {
          flex: 1;
          overflow-y: auto;
          padding: 14px;
        }

        .tab-section { display: flex; flex-direction: column; gap: 16px; }
        .setting-group { display: flex; flex-direction: column; gap: 5px; }

        .setting-label {
          font-size: 12px;
          font-weight: 700;
          color: #374151;
          text-transform: uppercase;
          letter-spacing: 0.06em;
          margin-bottom: 2px;
        }
        .setting-label.mb-0 { margin-bottom: 0; }

        .setting-row-2col {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 10px;
        }

        /* Format cards */
        .format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
        .format-card {
          display: flex; flex-direction: column; align-items: center; gap: 4px;
          padding: 10px 6px 8px; border: 2px solid #e5e7eb; border-radius: 10px;
          background: #fff; cursor: pointer; transition: all 0.2s;
        }
        .format-card:hover {
          border-color: var(--fmt-color, #3b82f6); background: #f8fafc;
          transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .format-card.active {
          border-color: var(--fmt-color, #3b82f6);
          background: color-mix(in srgb, var(--fmt-color, #3b82f6) 8%, white);
          box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
        .fmt-name { font-size: 12px; font-weight: 700; color: #374151; }
        .fmt-ext  { font-size: 9px; color: #9ca3af; }

        /* Toggles */
        .toggle-list { display: flex; flex-direction: column; gap: 8px; }
        .toggle-item { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
        .toggle-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: #1e40af; }
        .toggle-label { font-size: 12px; color: #374151; display: flex; align-items: center; gap: 6px; }
        .toggle-label i { font-size: 12px; color: #9ca3af; }

        /* Color swatches */
        .color-theme-grid { display: flex; flex-wrap: wrap; gap: 6px; }
        .color-swatch {
          width: 28px; height: 28px; border-radius: 6px; border: 2px solid transparent;
          cursor: pointer; position: relative; transition: all 0.15s;
          display: flex; align-items: flex-end; justify-content: flex-end; padding: 3px;
        }
        .color-swatch:hover { transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
        .color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px #374151; transform: scale(1.1); }
        .swatch-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.6); }

        /* Column selection */
        .column-grid {
          display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
          max-height: 380px; overflow-y: auto; padding-right: 2px;
        }
        .column-card {
          display: flex; align-items: center; gap: 8px; padding: 8px 10px;
          border: 1.5px solid #e5e7eb; border-radius: 8px; cursor: pointer;
          transition: all 0.15s; user-select: none;
        }
        .column-card:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.07); }
        .column-card.active { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

        /* ─── Layout Tab ─── */
        .layout-hint {
          font-size: 12px;
          color: #94a3b8;
          margin: 0 0 10px;
          line-height: 1.5;
          padding: 6px 8px;
          background: #f8faff;
          border-radius: 6px;
          border-left: 3px solid #a5b4fc;
        }

        .layout-block-list {
          display: flex;
          flex-direction: column;
          gap: 4px;
        }

        .layout-block-row {
          display: flex;
          align-items: center;
          gap: 5px;
          padding: 6px 8px;
          border: 1.5px solid #e5e7eb;
          border-radius: 8px;
          background: #fff;
          transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
          cursor: default;
          user-select: none;
        }
        .layout-block-row:hover {
          border-color: #c7d2fe;
          background: #fafaff;
          box-shadow: 0 1px 5px rgba(99,102,241,0.08);
        }
        .layout-block-row.block-hidden {
          opacity: 0.42;
          background: #f9fafb;
        }
        .layout-block-row.block-dragging {
          opacity: 0.35;
          border-style: dashed;
          border-color: #6366f1;
          background: #eef2ff;
          box-shadow: none;
        }
        .layout-block-row.block-drop-target {
          border-color: #6366f1;
          background: #eef2ff;
          box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
        }

        /* Drag handle */
        .block-drag-handle {
          color: #cbd5e1;
          cursor: grab;
          font-size: 12px;
          padding: 0 1px;
          flex-shrink: 0;
          line-height: 1;
          transition: color 0.15s;
        }
        .block-drag-handle:hover { color: #6366f1; }
        .layout-block-row:active .block-drag-handle { cursor: grabbing; }

        /* Visibility button */
        .block-vis-btn {
          width: 24px; height: 24px;
          border: none; border-radius: 5px;
          background: transparent; cursor: pointer;
          display: flex; align-items: center; justify-content: center;
          font-size: 12px; flex-shrink: 0; transition: all 0.15s;
          padding: 0;
        }
        .block-vis-btn.vis-on  { color: #3b82f6; }
        .block-vis-btn.vis-on:hover  { background: #dbeafe; color: #1e40af; }
        .block-vis-btn.vis-off { color: #cbd5e1; }
        .block-vis-btn.vis-off:hover { background: #f3f4f6; color: #6b7280; }

        /* Type badge */
        .block-type-badge {
          font-size: 8.5px; font-weight: 700;
          padding: 2px 5px; border-radius: 4px;
          letter-spacing: 0.04em; text-transform: uppercase;
          flex-shrink: 0; white-space: nowrap;
        }
        .block-type-header     { background: #dbeafe; color: #1e40af; }
        .block-type-freetext   { background: #dcfce7; color: #15803d; }
        .block-type-table      { background: #fef3c7; color: #b45309; }
        .block-type-date       { background: #fae8ff; color: #7e22ce; }
        .block-type-signatures { background: #fee2e2; color: #991b1b; }
        .block-type-pagenumber { background: #e0f2fe; color: #075985; }
        .block-type-divider    { background: #f1f5f9; color: #64748b; }

        /* Content area */
        .block-content-area {
          flex: 1;
          min-width: 0;
          display: flex;
          align-items: center;
        }

        .block-text-input {
          width: 100%;
          padding: 3px 7px;
          font-size: 12px;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          color: #374151;
          background: #f9fafb;
          transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
          outline: none;
        }
        .block-text-input:focus {
          border-color: #6366f1;
          background: #fff;
          box-shadow: 0 0 0 2px rgba(99,102,241,0.12);
        }
        .block-text-input::placeholder { color: #c4b5fd; }

        .block-info-text {
          font-size: 10px;
          color: #94a3b8;
          font-style: italic;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          max-width: 100%;
        }

        /* Align buttons */
        .block-align-btns { display: flex; gap: 2px; flex-shrink: 0; }
        .block-align-btn {
          width: 21px; height: 21px;
          border: 1px solid; border-radius: 3px;
          cursor: pointer;
          display: flex; align-items: center; justify-content: center;
          font-size: 9px;
          transition: all 0.1s;
          padding: 0;
        }

        /* Move buttons */
        .block-move-btns { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
        .block-move-btn {
          width: 18px; height: 13px;
          font-size: 7px;
          border: 1px solid #e5e7eb;
          border-radius: 3px;
          background: #f9fafb;
          color: #9ca3af;
          cursor: pointer;
          display: flex; align-items: center; justify-content: center;
          padding: 0; line-height: 1;
          transition: all 0.1s;
        }
        .block-move-btn:hover:not(:disabled) { background: #6366f1; color: #fff; border-color: #6366f1; }
        .block-move-btn:disabled { opacity: 0.2; cursor: default; }

        /* Delete button */
        .block-delete-btn {
          background: none; border: none;
          color: #fca5a5; cursor: pointer;
          font-size: 12px; padding: 0 2px;
          flex-shrink: 0; transition: color 0.15s; line-height: 1;
        }
        .block-delete-btn:hover { color: #ef4444; }

        /* Add block buttons */
        .add-block-btn {
          flex: 1; padding: 7px 8px;
          font-size: 12px; border-radius: 7px;
          border: 1.5px dashed;
          background: transparent;
          cursor: pointer;
          display: flex; align-items: center; justify-content: center; gap: 5px;
          transition: all 0.15s; font-weight: 500;
        }
        .add-block-btn:hover { filter: brightness(0.95); }
        .add-divider-btn {
          flex: 0 0 auto;
          border-color: #d1d5db;
          color: #6b7280;
          background: #f9fafb !important;
        }
        .add-divider-btn:hover { background: #f3f4f6 !important; }

        /* ─── Right Panel ─── */
        .export-preview-panel {
          flex: 1;
          display: flex;
          flex-direction: column;
          overflow: hidden;
          background: #f1f5f9;
        }

        .preview-header {
          display: flex; justify-content: space-between; align-items: center;
          padding: 10px 16px; background: #fff;
          border-bottom: 1px solid #e5e7eb;
          font-size: 12px; font-weight: 700; color: #374151;
          flex-shrink: 0;
        }

        .preview-canvas {
          flex: 1;
          overflow: auto;
          padding: 20px 16px;
          display: flex;
          flex-direction: column;
          gap: 12px;
          scrollbar-width: thin;
          scrollbar-color: #94a3b8 transparent;
        }
        .preview-canvas::-webkit-scrollbar { width: 8px; height: 8px; }
        .preview-canvas::-webkit-scrollbar-track { background: transparent; }
        .preview-canvas::-webkit-scrollbar-thumb {
          background-color: #94a3b8; border-radius: 4px;
          border: 2px solid transparent; background-clip: content-box;
        }
        .preview-canvas::-webkit-scrollbar-corner { background: transparent; }

/* --- Extracted from Header.tsx (resources/js/components/Header.tsx) --- */
.topbar-controls {
          display: flex;
          align-items: center;
          gap: 8px;
          min-width: 0;
          max-width: 100%;
          justify-content: flex-end;
          flex: 1;
        }
        .topbar-scroll-area {
          display: flex;
          align-items: center;
          gap: 10px;
          overflow-x: auto;
          scrollbar-width: none;
          -ms-overflow-style: none;
          scroll-behavior: smooth;
          padding: 2px 2px;
          min-width: 0;
        }
        .topbar-scroll-area::-webkit-scrollbar {
          display: none;
        }
        .topbar-nav-btn {
          background: #f8fafc;
          border: 1px solid #cbd5e1;
          color: #475569;
          border-radius: 50%;
          width: 26px;
          height: 26px;
          min-width: 26px;
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          font-size: 10px;
          transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
          flex-shrink: 0;
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }
        .topbar-nav-btn:hover:not(:disabled) {
          background: #e2e8f0;
          color: #0f172a;
          border-color: #94a3b8;
          transform: scale(1.08);
        }
        .topbar-nav-btn:disabled, .topbar-nav-btn.disabled {
          opacity: 0.25;
          cursor: default;
          pointer-events: none;
          box-shadow: none;
        }
        .topbar-item {
          display: flex;
          align-items: center;
          gap: 8px;
          flex-shrink: 0;
        }
        .topbar-label {
          font-size: 14px;
          font-weight: 600;
          color: var(--text-h);
          white-space: nowrap;
        }
        .user-dropdown-card {
          position: absolute;
          right: 0;
          top: 100%;
          margin-top: 8px;
          background: var(--bg);
          border: 1px solid var(--border);
          border-radius: 8px;
          box-shadow: var(--shadow);
          min-width: 200px;
          z-index: 100;
          padding: 12px;
          display: flex;
          flex-direction: column;
          gap: 8px;
        }
        .user-dropdown-header {
          display: flex;
          flex-direction: column;
          gap: 2px;
          font-size: 13px;
        }
        .user-dropdown-header strong {
          color: var(--text-h);
        }
        .user-dropdown-header span {
          color: var(--text);
          font-size: 12px;
        }
        .role-badge {
          align-self: flex-start;
          font-size: 10px;
          font-weight: 700;
          background: var(--accent-bg);
          color: var(--accent);
          padding: 2px 6px;
          border-radius: 4px;
          margin-top: 4px;
        }
        .divider-h {
          height: 1px;
          background: var(--border);
          margin: 4px 0;
        }
        .dropdown-action-btn {
          display: flex;
          align-items: center;
          gap: 8px;
          width: 100%;
          border: none;
          background: transparent;
          color: #ef4444;
          font-weight: 600;
          font-size: 14px;
          padding: 8px;
          border-radius: 4px;
          cursor: pointer;
          transition: background-color 0.2s;
        }
        .dropdown-action-btn:hover {
          background: rgba(239, 68, 68, 0.05);
        }
        .topbar-select {
          font-size: 13.5px;
          border-radius: 6px;
        }
        .topbar-select option {
          font-size: 14px;
          padding: 6px 10px;
        }
        .topbar-lang-btn,
        .topbar-lang-select,
        .topbar-year-select {
          font-size: 13.5px !important;
          font-weight: 600;
        }
        .topbar-lang-btn:hover {
          border-color: #94a3b8 !important;
          background: #f8fafc !important;
        }
        .lang-dropdown-menu {
          animation: dropdownFadeIn 0.12s ease-out;
        }
        .lang-dropdown-menu li.dropdown-item:hover {
          background: #f1f5f9 !important;
        }
        .topbar-lang-select option,
        .topbar-year-select option {
          font-size: 14px !important;
          padding: 6px 10px;
        }
        @media (max-width: 768px) {
          .topbar {
            padding: 0 10px !important;
          }
          .breadcrumb {
            display: none !important;
          }
          .topbar-controls {
            width: 100%;
          }
          .topbar-select,
          .topbar-lang-btn {
            font-size: 13.5px !important;
            padding: 5px 8px;
          }
          .topbar-select option {
            font-size: 14px !important;
            padding: 6px 10px;
          }
          .topbar-lang-btn,
          .topbar-lang-select,
          .topbar-year-select {
            font-size: 13.5px !important;
          }
          .topbar-lang-select option,
          .topbar-year-select option {
            font-size: 14px !important;
            padding: 6px 10px;
          }
        }

/* --- Extracted from ManagementTabs.tsx (resources/js/components/ManagementTabs.tsx) --- */
.management-tabs-container {
          background: #ffffff;
          border-bottom: 2px solid var(--border, #e2e8f0);
          margin-top: -8px;
          margin-bottom: 18px;
          border-radius: 8px 8px 0 0;
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        }
        .management-tabs-scroll {
          display: flex;
          align-items: center;
          gap: 4px;
          padding: 4px 8px 0 8px;
          overflow-x: auto;
          white-space: nowrap;
          scrollbar-width: none;
        }
        .management-tabs-scroll::-webkit-scrollbar {
          display: none;
        }
        .mgmt-tab-btn {
          display: inline-flex;
          align-items: center;
          gap: 8px;
          padding: 10px 18px;
          font-size: 13.5px;
          font-weight: 600;
          color: var(--text-secondary, #64748b);
          background: transparent;
          border: none;
          border-bottom: 2px solid transparent;
          margin-bottom: -2px;
          cursor: pointer;
          transition: all 0.2s ease-in-out;
          border-radius: 6px 6px 0 0;
          outline: none;
        }
        .mgmt-tab-btn .tab-icon {
          font-size: 14px;
          color: #94a3b8;
          transition: color 0.2s ease-in-out;
        }
        .mgmt-tab-btn:hover {
          color: var(--primary, #1e3a8a);
          background: rgba(30, 58, 138, 0.04);
        }
        .mgmt-tab-btn:hover .tab-icon {
          color: var(--primary, #1e3a8a);
        }
        .mgmt-tab-btn.active {
          color: var(--primary, #1e3a8a);
          border-bottom: 2px solid var(--primary, #1e3a8a);
          background: rgba(30, 58, 138, 0.06);
          font-weight: 700;
        }
        .mgmt-tab-btn.active .tab-icon {
          color: var(--primary, #1e3a8a);
        }
        @media (max-width: 768px) {
          .mgmt-tab-btn {
            padding: 8px 12px;
            font-size: 12.5px;
          }
        }

/* --- Extracted from MediaPickerModal.tsx (resources/js/components/MediaPickerModal.tsx) --- */
.filemanager {
          display: flex;
          height: 100%;
          background: #f5f5f5;
        }
        
        .filemanager--sidebar {
          width: 200px;
          background: #fff;
          border-right: 1px solid #e5e7eb;
          overflow-y: auto;
        }
        
        .filemanager--tabs ul {
          list-style: none;
          padding: 0;
          margin: 0;
        }
        
        .filemanager--tabs li {
          border-bottom: 1px solid #f0f0f0;
        }
        
        .filemanager--tabs button {
          width: 100%;
          padding: 12px 16px;
          text-align: left;
          background: none;
          border: none;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 14px;
          color: #6b7280;
        }
        
        .filemanager--tabs li.active button {
          background: #eff6ff;
          color: #3b82f6;
          border-left: 3px solid #3b82f6;
        }
        
        .filemanager--tabs button:hover {
          background: #f9fafb;
        }
        
        .filemanager--main {
          flex: 1;
          display: flex;
          flex-direction: column;
          overflow: hidden;
        }
        
        .filemanager--breadcrumbs {
          padding: 10px 16px;
          background: #fff;
          border-bottom: 1px solid #e5e7eb;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        
        .filemanager--breadcrumbs button {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
          font-size: 13px;
          color: #6b7280;
        }
        
        .filemanager--breadcrumbs button:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .filemanager--breadcrumbs .separator {
          color: #9ca3af;
        }
        
        .filemanager--content {
          flex: 1;
          display: flex;
          flex-direction: row;
          overflow: hidden;
          height: 100%;
          width: 100%;
        }
        
        .filemanager--files {
          flex: 0 0 70%;
          width: 70%;
          max-width: 70%;
          overflow-y: auto;
          padding: 16px;
        }
        
        .filemanager--info {
          flex: 0 0 30%;
          width: 30%;
          max-width: 30%;
          background: #fff;
          border-left: 1px solid #e5e7eb;
          overflow-y: auto;
        }
        
        .modal-overlay {
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: rgba(0, 0, 0, 0.5);
          display: flex;
          align-items: center;
          justify-content: center;
          z-index: 2000010;
        }
        
        .modal-content {
          background: #fff;
          border-radius: 8px;
          max-width: 500px;
          width: 90%;
          max-height: 90vh;
          overflow-y: auto;
        }
        
        .modal-md {
          max-width: 700px;
        }
        
        .modal-header {
          padding: 16px 20px;
          border-bottom: 1px solid #e5e7eb;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        
        .modal-header h3 {
          margin: 0;
          font-size: 18px;
          color: #1f2937;
        }
        
        .modal-header button {
          background: none;
          border: none;
          font-size: 18px;
          cursor: pointer;
          color: #6b7280;
        }
        
        .modal-body {
          padding: 20px;
        }
        
        .media-action-btn-new {
          width: 100%;
          padding: 8px 12px;
          background: #fff;
          border: 1px solid #e2e8f0;
          border-radius: 6px;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 13px;
          font-weight: 500;
          color: #334155;
          transition: all 0.15s;
        }
        
        .media-action-btn-new:hover {
          background: #f8fafc;
          border-color: #cbd5e1;
        }
        
        .media-action-btn-new:disabled {
          opacity: 0.5;
          cursor: not-allowed;
        }
        
        .media-details-container {
          display: flex;
          flex-direction: column;
          gap: 20px;
        }
        
        .media-details-preview {
          width: 100%;
          aspect-ratio: 1;
          background: #f9fafb;
          border-radius: 8px;
          display: flex;
          align-items: center;
          justify-content: center;
          overflow: hidden;
        }
        
        .media-details-preview img {
          max-width: 100%;
          max-height: 100%;
          object-fit: contain;
        }
        
        .media-details-info {
          display: grid;
          gap: 12px;
        }
        
        .media-details-label {
          font-size: 12px;
          font-weight: 600;
          color: #9ca3af;
          text-transform: uppercase;
        }
        
        .media-details-value {
          font-size: 14px;
          color: #374151;
          word-break: break-all;
        }
        
        .media-details-value.path {
          font-family: monospace;
          font-size: 12px;
          color: #6b7280;
        }
        
        .media-details-footer {
          display: flex;
          justify-content: flex-end;
          margin-top: 20px;
        }
        
        .btn-media-close {
          padding: 8px 24px;
          background: #6b7280;
          color: white;
          border: none;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .btn-media-close:hover {
          background: #4b5563;
        }
        
        .header-upload-btn {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
          font-size: 14px;
          color: #6b7280;
          display: flex;
          align-items: center;
          gap: 4px;
        }
        
        .header-upload-btn:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .view.icon {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .view.icon.active {
          background: #eff6ff;
          border-color: #3b82f6;
          color: #3b82f6;
        }
        
        .primary {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .primary:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .danger {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .danger:hover {
          background: #fef2f2;
          border-color: #ef4444;
        }
        
        .toggle {
          opacity: 0.8;
        }

/* --- Extracted from StudentDashboardView.tsx (resources/js/components/StudentDashboardView.tsx) --- */
.student-portal-container {
          display: flex;
          flex-direction: column;
          gap: 20px;
        }

        /* Top Hero Card */
        .student-hero-card {
          background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
          color: #ffffff;
          border-radius: 16px;
          padding: 24px;
          display: flex;
          flex-direction: column;
          gap: 20px;
          box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
        }

        @media (min-width: 900px) {
          .student-hero-card {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
          }
        }

        .student-hero-profile {
          display: flex;
          align-items: center;
          gap: 20px;
        }

        .student-avatar-wrap {
          position: relative;
          width: 80px;
          height: 80px;
          flex-shrink: 0;
        }

        .student-avatar-img {
          width: 80px;
          height: 80px;
          border-radius: 50%;
          object-fit: cover;
          border: 3px solid rgba(255, 255, 255, 0.3);
        }

        .student-avatar-placeholder {
          width: 80px;
          height: 80px;
          border-radius: 50%;
          background: rgba(255, 255, 255, 0.15);
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 32px;
          color: #93c5fd;
          border: 3px solid rgba(255, 255, 255, 0.25);
        }

        .student-status-badge {
          position: absolute;
          bottom: -4px;
          right: -4px;
          background: #10b981;
          color: white;
          font-size: 12px;
          font-weight: 600;
          padding: 2px 6px;
          border-radius: 10px;
          display: flex;
          align-items: center;
          gap: 3px;
        }

        .student-profile-info {
          display: flex;
          flex-direction: column;
          gap: 6px;
        }

        .student-title-row {
          display: flex;
          align-items: center;
          gap: 12px;
          flex-wrap: wrap;
        }

        .student-name {
          font-size: 24px;
          font-weight: 700;
          margin: 0;
          color: #ffffff;
        }

        .student-code-badge {
          background: rgba(255, 255, 255, 0.15);
          padding: 4px 10px;
          border-radius: 20px;
          font-size: 12px;
          font-weight: 600;
          color: #bae6fd;
        }

        .student-subtitle {
          margin: 0;
          color: #cbd5e1;
          font-size: 13px;
          display: flex;
          gap: 16px;
          flex-wrap: wrap;
        }

        .student-subtitle span {
          display: flex;
          align-items: center;
          gap: 5px;
        }

        /* KPI Bubbles */
        .student-quick-kpis {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 12px;
        }

        @media (min-width: 600px) {
          .student-quick-kpis {
            grid-template-columns: repeat(4, 1fr);
          }
        }

        .kpi-bubble {
          background: rgba(255, 255, 255, 0.08);
          border: 1px solid rgba(255, 255, 255, 0.12);
          border-radius: 12px;
          padding: 12px 16px;
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
        }

        .kpi-label {
          font-size: 12px;
          text-transform: uppercase;
          letter-spacing: 0.5px;
          color: #94a3b8;
          margin-bottom: 2px;
        }

        .kpi-value {
          font-size: 20px;
          font-weight: 700;
        }

        .kpi-sub {
          font-size: 12px;
          color: #cbd5e1;
        }

        .text-purple { color: #c084fc; }
        .text-orange { color: #fb923c; }

        /* Navigation Icon Grid */
        .portal-grid-nav {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
          gap: 15px;
        }

        .portal-nav-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 12px;
          padding: 16px;
          display: flex;
          align-items: center;
          gap: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
          text-align: left;
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        .portal-nav-card:hover {
          transform: translateY(-2px);
          box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
          border-color: #cbd5e1;
        }

        .portal-nav-card.active {
          border-color: #3b82f6;
          background: #eff6ff;
          box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        }

        .nav-icon-box {
          width: 48px;
          height: 48px;
          border-radius: 12px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 20px;
          color: #ffffff;
          flex-shrink: 0;
        }

        .bg-blue { background: linear-gradient(135deg, #16a34a, #15803d); }
        .bg-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
        .bg-emerald { background: linear-gradient(135deg, #10b981, #059669); }
        .bg-sky { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
        .bg-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
        .bg-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .bg-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }

        .nav-card-text h4 {
          margin: 0 0 4px 0;
          font-size: 14px;
          font-weight: 600;
          color: #1e293b;
        }

        .nav-card-text p {
          margin: 0;
          font-size: 12px;
          color: #64748b;
          line-height: 1.3;
        }

        /* Content Cards */
        .content-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 14px;
          padding: 20px;
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        }

        .card-header-flex {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 16px;
        }

        .card-title {
          margin: 0;
          font-size: 16px;
          font-weight: 700;
          color: #1e293b;
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .card-sub {
          margin: 4px 0 0 0;
          font-size: 12px;
          color: #64748b;
        }

        .link-btn {
          background: none;
          border: none;
          color: #2563eb;
          font-weight: 600;
          font-size: 13px;
          cursor: pointer;
          padding: 0;
        }

        .link-btn:hover {
          text-decoration: underline;
        }

        /* Filters */
        .filter-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 12px;
          padding: 16px;
        }

        .filter-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
          gap: 14px;
        }

        .filter-group label {
          display: block;
          font-size: 12px;
          font-weight: 600;
          color: #475569;
          margin-bottom: 6px;
        }

        .form-control {
          width: 100%;
          padding: 8px 12px;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          font-size: 13px;
          background: #f8fafc;
        }

        /* Tables & Badges */
        .data-table, .mini-table {
          width: 100%;
          border-collapse: collapse;
          font-size: 13px;
        }

        .data-table th, .mini-table th {
          background: #f1f5f9;
          color: #475569;
          padding: 10px 12px;
          text-align: left;
          font-weight: 600;
          border-bottom: 1px solid #e2e8f0;
        }

        .data-table td, .mini-table td {
          padding: 10px 12px;
          border-bottom: 1px solid #f1f5f9;
          color: #334155;
        }

        .score-summary-pill {
          background: #eff6ff;
          border: 1px solid #bfdbfe;
          color: #1e40af;
          padding: 6px 14px;
          border-radius: 20px;
          font-size: 13px;
          display: flex;
          gap: 6px;
          align-items: center;
        }

        .score-val {
          font-weight: 700;
          color: #1e293b;
        }

        .grade-badge {
          display: inline-block;
          padding: 2px 8px;
          border-radius: 6px;
          color: #ffffff;
          font-weight: 700;
          font-size: 12px;
          text-align: center;
        }

        .badge-tag {
          background: #e2e8f0;
          color: #475569;
          padding: 2px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 500;
        }

        .badge-status-green {
          background: #dcfce7;
          color: #15803d;
          padding: 3px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 600;
        }

        .badge-status-yellow {
          background: #fef9c3;
          color: #854d0e;
          padding: 3px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 600;
        }

        .badge-status-red {
          background: #fee2e2;
          color: #b91c1c;
          padding: 3px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 600;
        }

        .badge-status-orange {
          background: #ffedd5;
          color: #c2410c;
          padding: 3px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 600;
        }

        /* Today Classes List */
        .today-classes-list {
          display: flex;
          flex-direction: column;
          gap: 10px;
        }

        .today-class-item {
          display: flex;
          align-items: center;
          gap: 14px;
          padding: 10px 14px;
          background: #f8fafc;
          border-radius: 8px;
          border-left: 4px solid #3b82f6;
        }

        .period-badge {
          display: flex;
          flex-direction: column;
          align-items: center;
          background: #e2e8f0;
          border-radius: 6px;
          padding: 4px 8px;
          min-width: 45px;
        }

        .period-num {
          font-weight: 700;
          font-size: 13px;
          color: #1e293b;
        }

        .period-session {
          font-size: 9px;
          color: #64748b;
          text-transform: uppercase;
        }

        .class-detail h4 {
          margin: 0 0 2px 0;
          font-size: 14px;
          color: #1e293b;
        }

        .class-detail p {
          margin: 0;
          font-size: 12px;
          color: #64748b;
        }

        /* Attendance Stats Row */
        .att-stats-row {
          display: grid;
          grid-template-columns: repeat(4, 1fr);
          gap: 10px;
        }

        .att-box {
          border-radius: 8px;
          padding: 10px;
          text-align: center;
          display: flex;
          flex-direction: column;
        }

        .att-box.green { background: #f0fdf4; color: #166534; }
        .att-box.yellow { background: #fefce8; color: #854d0e; }
        .att-box.red { background: #fef2f2; color: #991b1b; }
        .att-box.orange { background: #fff7ed; color: #9a3412; }

        .att-box .num { font-size: 18px; font-weight: 700; }
        .att-box .lbl { font-size: 12px; }

        .att-metric-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 12px;
          padding: 16px;
          display: flex;
          align-items: center;
          gap: 14px;
        }

        .att-metric-card.border-green { border-top: 4px solid #10b981; }
        .att-metric-card.border-yellow { border-top: 4px solid #f59e0b; }
        .att-metric-card.border-red { border-top: 4px solid #ef4444; }
        .att-metric-card.border-orange { border-top: 4px solid #f97316; }

        .metric-icon {
          width: 42px;
          height: 42px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 18px;
        }

        .metric-icon.green { background: #dcfce7; color: #15803d; }
        .metric-icon.yellow { background: #fef9c3; color: #a16207; }
        .metric-icon.red { background: #fee2e2; color: #b91c1c; }
        .metric-icon.orange { background: #ffedd5; color: #c2410c; }

        .metric-info h3 { margin: 0; font-size: 20px; font-weight: 700; color: #1e293b; }
        .metric-info p { margin: 2px 0 0 0; font-size: 12px; color: #64748b; }

        .progress-track {
          height: 8px;
          background: #e2e8f0;
          border-radius: 4px;
          overflow: hidden;
          margin-top: 4px;
        }

        .progress-fill {
          height: 100%;
          border-radius: 4px;
          transition: width 0.3s ease;
        }

        .progress-label {
          display: flex;
          justify-content: space-between;
          font-size: 12px;
          color: #475569;
        }

        /* Timetable Grid */
        .timetable-grid-wrap {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
          gap: 12px;
        }

        .timetable-day-col {
          background: #f8fafc;
          border: 1px solid #e2e8f0;
          border-radius: 10px;
          overflow: hidden;
        }

        .timetable-day-col.today-col {
          border-color: #3b82f6;
          box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
        }

        .day-header {
          background: #e2e8f0;
          padding: 10px;
          text-align: center;
          font-weight: 700;
          font-size: 13px;
          color: #334155;
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 6px;
        }

        .today-col .day-header {
          background: #3b82f6;
          color: #ffffff;
        }

        .today-chip {
          background: #ffffff;
          color: #2563eb;
          font-size: 10px;
          padding: 1px 5px;
          border-radius: 8px;
          font-weight: 700;
        }

        .day-slots {
          padding: 10px;
          display: flex;
          flex-direction: column;
          gap: 8px;
        }

        .slot-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 6px;
          padding: 8px 10px;
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        }

        .slot-time {
          font-size: 10px;
          font-weight: 600;
          color: #64748b;
          margin-bottom: 2px;
        }

        .slot-subject {
          font-size: 13px;
          font-weight: 700;
          color: #1e293b;
        }

        .slot-teacher, .slot-room {
          font-size: 12px;
          color: #64748b;
          margin-top: 2px;
          display: flex;
          align-items: center;
          gap: 4px;
        }

        .slot-empty {
          text-align: center;
          padding: 15px 0;
          font-size: 12px;
          color: #94a3b8;
          font-style: italic;
        }

        /* History Cards Grid */
        .history-cards-grid {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
          gap: 15px;
        }

        .history-year-card {
          background: #f8fafc;
          border: 1px solid #e2e8f0;
          border-radius: 10px;
          padding: 14px;
        }

        .history-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 10px;
          padding-bottom: 8px;
          border-bottom: 1px solid #e2e8f0;
        }

        .history-header h4 {
          margin: 0;
          font-size: 13px;
          font-weight: 700;
          color: #1e293b;
        }

        .history-avg-badge {
          background: #dbeafe;
          color: #1e40af;
          font-weight: 700;
          font-size: 12px;
          padding: 2px 8px;
          border-radius: 10px;
        }

        .history-body {
          display: flex;
          flex-direction: column;
          gap: 6px;
          font-size: 12px;
          color: #64748b;
        }

        .history-stat {
          display: flex;
          justify-content: space-between;
        }

        .history-stat strong {
          color: #1e293b;
        }

        /* Profile Details Grid */
        .profile-details-grid {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 14px;
        }

        .detail-item {
          display: flex;
          flex-direction: column;
          gap: 3px;
        }

        .detail-item.col-span-2 {
          grid-column: span 2;
        }

        .detail-item .label {
          font-size: 12px;
          color: #64748b;
          text-transform: uppercase;
        }

        .detail-item strong {
          font-size: 14px;
          color: #1e293b;
        }

        /* Notices */
        .notice-list {
          list-style: none;
          padding: 0;
          margin: 0;
          display: flex;
          flex-direction: column;
          gap: 12px;
        }

        .notice-item {
          display: flex;
          gap: 12px;
          padding: 10px 12px;
          background: #f8fafc;
          border-radius: 8px;
        }

        .notice-icon {
          width: 36px;
          height: 36px;
          border-radius: 50%;
          background: #ffedd5;
          color: #ea580c;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 14px;
          flex-shrink: 0;
        }

        .notice-content h5 {
          margin: 0 0 3px 0;
          font-size: 13px;
          color: #1e293b;
        }

        .notice-content p {
          margin: 0;
          font-size: 12px;
          color: #64748b;
          line-height: 1.4;
        }

        .empty-notice {
          text-align: center;
          padding: 24px 0;
          color: #94a3b8;
        }

/* --- Extracted from StudentResultSheet.tsx (resources/js/components/StudentResultSheet.tsx) --- */


        @font-face {
          font-family: 'Times New Roman';
          src: local('Times New Roman'), local('Times'), url('/assets/fonts/Times_New_Roman.ttf') format('truetype');
          font-weight: normal;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'Times New Roman';
          src: local('Times New Roman Bold'), local('Times-Bold'), url('/assets/fonts/Times_New_Roman.ttf') format('truetype');
          font-weight: bold;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'Khmer OS Muol Light';
          src: local('Khmer OS Muol Light'), local('KhmerOS Muol Light'), local('KhmerOS_muollight'), local('Khmer OS Muol'), local('KhmerOS Muol'), url('/assets/fonts/KhmerOS_muollight.ttf') format('truetype');
          font-weight: normal;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'Khmer OS Muol Light';
          src: local('Khmer OS Muol Light'), local('KhmerOS Muol Light'), local('KhmerOS_muollight'), local('Khmer OS Muol'), local('KhmerOS Muol'), url('/assets/fonts/KhmerOS_muollight.ttf') format('truetype');
          font-weight: bold;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'KhmerOS_muollight';
          src: local('Khmer OS Muol Light'), local('KhmerOS Muol Light'), local('KhmerOS_muollight'), url('/assets/fonts/KhmerOS_muollight.ttf') format('truetype');
          font-weight: 100 900;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'KhmerOS Muol Light';
          src: local('Khmer OS Muol Light'), local('KhmerOS Muol Light'), local('KhmerOS_muollight'), url('/assets/fonts/KhmerOS_muollight.ttf') format('truetype');
          font-weight: 100 900;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'Khmer OS Battambang';
          src: local('Khmer OS Battambang'), local('KhmerOS Battambang'), local('KhmerOS_battambang'), local('KhmerOS-Battambang'), url('/assets/fonts/KhmerOS_battambang.ttf') format('truetype');
          font-weight: normal;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'Khmer OS Battambang';
          src: local('Khmer OS Battambang'), local('KhmerOS Battambang'), local('KhmerOS_battambang'), local('KhmerOS-Battambang'), url('/assets/fonts/KhmerOS_battambang.ttf') format('truetype');
          font-weight: bold;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'KhmerOS_battambang';
          src: local('Khmer OS Battambang'), local('KhmerOS Battambang'), local('KhmerOS_battambang'), url('/assets/fonts/KhmerOS_battambang.ttf') format('truetype');
          font-weight: 100 900;
          font-style: normal;
          font-display: swap;
        }
        @font-face {
          font-family: 'KhmerOS Battambang';
          src: local('Khmer OS Battambang'), local('KhmerOS Battambang'), local('KhmerOS_battambang'), url('/assets/fonts/KhmerOS_battambang.ttf') format('truetype');
          font-weight: 100 900;
          font-style: normal;
          font-display: swap;
        }
        .student-result-sheet-container {
          font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Battambang', 'Kantumruy Pro', 'Siemreap', 'Noto Sans Khmer', serif;
          color: #1c1a17;
          line-height: 1.5;
        }
        .srs-toolbar {
          max-width: 980px;
          margin: 0 auto 14px;
          display: flex;
          gap: 10px;
          justify-content: flex-end;
        }
        .srs-btn {
          font-family: inherit;
          font-size: 14px;
          padding: 8px 18px;
          border-radius: 6px;
          border: 1px solid #a49b8a;
          background: #ffffff;
          cursor: pointer;
          box-shadow: 0 1px 2px rgba(0,0,0,.15);
          display: inline-flex;
          align-items: center;
          gap: 6px;
          font-weight: 600;
        }
        .srs-btn:hover {
          background: #f1f5f9;
        }
        .srs-btn-primary {
          background: #7a1113;
          color: #fff;
          border-color: #7a1113;
        }
        .srs-btn-primary:hover {
          background: #5f0c0e;
        }
        .srs-page {
          max-width: 980px;
          margin: 0 auto;
          background: #ffffff;
          border: 1px solid #e2e8f0;
          box-shadow: 0 4px 24px rgba(0,0,0,.15);
          padding: 32px 38px 28px;
          position: relative;
        }
        /* Header */
        .srs-header {
          padding-bottom: 14px;
          border-bottom: 2px double #1e3a8a;
          margin-bottom: 16px;
        }
        .srs-header-top-grid {
          display: flex;
          justify-content: space-between;
          align-items: flex-start;
          gap: 16px;
          margin-bottom: 10px;
        }
        .srs-header-left {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
          min-width: 200px;
          max-width: 280px;
          flex-shrink: 0;
        }
        .srs-header-right {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
          min-width: 200px;
          max-width: 280px;
          flex-shrink: 0;
        }
        .srs-school-logo {
          max-height: 80px;
          max-width: 80px;
          object-fit: contain;
          margin-bottom: 6px;
        }
        .srs-school-name {
          font-family: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Khmer OS Muol', 'Moul', 'Khmer OS Battambang', serif;
          font-size: 15px;
          font-weight: 700;
          color: #1e3a8a;
          letter-spacing: 0.5px;
          line-height: 1.35;
        }
        .srs-ministry-text {
          font-size: 12px;
          color: #475569;
          font-weight: 600;
          line-height: 1.35;
        }
        .srs-motto-title {
          font-family: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Khmer OS Muol', 'Moul', 'Khmer OS Battambang', serif;
          font-size: 15px;
          font-weight: 700;
          color: #1e3a8a;
          line-height: 1.35;
          margin: 0;
        }
        .srs-motto-sub {
          font-family: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Khmer OS Muol', 'Moul', 'Khmer OS Battambang', serif;
          font-size: 12px;
          color: #1e3a8a;
          line-height: 1.35;
          margin: 2px 0 0;
        }
        .srs-motto-ornament {
          font-size: 10px;
          color: #64748b;
          letter-spacing: 3px;
          margin-top: 2px;
        }
        .srs-doc-banner-wrap {
          text-align: center;
          margin: 10px 0 8px;
        }
        .srs-doc-title {
          font-family: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Khmer OS Muol', 'Moul', 'Khmer OS Battambang', serif;
          font-size: 17px;
          font-weight: 700;
          color: #ffffff;
          background: #7a1113;
          display: inline-block;
          padding: 4px 18px;
          letter-spacing: 0.8px;
          line-height: 1.4;
          border-radius: 2px;
        }
        .srs-doc-sub {
          font-size: 12px;
          color: #475569;
          margin-top: 4px;
        }
        /* Meta Grid */
        .srs-meta {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          padding: 8px 14px;
          margin-bottom: 16px;
          display: grid;
          grid-template-columns: repeat(4, 1fr);
          gap: 6px 14px;
          font-size: 12.5px;
        }
        .srs-meta-item {
          display: flex;
          gap: 6px;
        }
        .srs-meta-item .lbl {
          font-weight: 600;
          color: #475569;
          white-space: nowrap;
        }
        .srs-meta-item .val {
          font-weight: 700;
          color: #0f172a;
        }
        /* Layout */
        .srs-main {
          display: flex;
          gap: 18px;
          align-items: flex-start;
        }
        .srs-result-table-wrap {
          flex: 1 1 auto;
          min-width: 0;
        }
        /* Table */
        table.srs-result {
          width: 100%;
          border-collapse: collapse;
          font-size: 13.5px;
          background: #ffffff;
        }
        .srs-result th, .srs-result td {
          border: 1px solid #cbd5e1;
          padding: 6px 8px;
          vertical-align: middle;
          background: #ffffff;
        }
        .srs-result thead th {
          background: #f8fafc;
          border: 1px solid #cbd5e1;
          font-weight: 700;
          text-align: center;
          font-size: 13.5px;
        }
        .srs-result td.no {
          text-align: center;
          width: 44px;
          font-weight: 600;
        }
        .srs-result td.name {
          min-width: 175px;
        }
        .srs-result td.score {
          text-align: center;
          width: 70px;
          font-weight: 700;
        }
        .srs-result td.grade {
          text-align: center;
          width: 75px;
          font-weight: 700;
          letter-spacing: 0.5px;
        }
        .srs-result td.grade.fail {
          color: #b3261e;
        }
        .srs-result td.grade.pass {
          color: #15803d;
        }
        .srs-result td.sign {
          width: 95px;
          height: 30px;
          text-align: center;
        }
        .srs-result tbody tr:nth-child(even) {
          background: #ffffff;
        }
        .srs-result td[contenteditable]:focus {
          outline: 2px solid #c9a24b;
          outline-offset: -2px;
          background: #f8fafc;
        }
        /* Right Side Panel - Compact Layout */
        .srs-side {
          flex: 0 0 190px;
          display: flex;
          flex-direction: column;
          gap: 10px;
        }
        .srs-side-box {
          border: 1px solid #e2e8f0;
          background: #ffffff;
          border-radius: 3px;
        }
        .srs-side-box h3 {
          font-size: 12px;
          text-align: center;
          background: #ffffff;
          border-bottom: 1px solid #e2e8f0;
          padding: 4px 2px;
          font-weight: 700;
          margin: 0;
          letter-spacing: 0.5px;
        }
        .srs-side-box .hint {
          font-size: 8.5px;
          color: #8a8175;
          text-align: center;
          margin: 3px 0 2px;
          letter-spacing: 0.5px;
        }
        .srs-side-box .body {
          padding: 6px 8px;
        }
        .srs-field {
          font-size: 10.5px;
          margin-bottom: 4px;
          display: flex;
          align-items: baseline;
          gap: 4px;
        }
        .srs-field .lbl {
          display: inline-block;
          font-weight: 600;
          min-width: 48px;
          font-size: 10px;
          white-space: nowrap;
          margin-bottom: 0;
        }
        .srs-field .fill {
          flex: 1;
          border-bottom: 1.5px dashed #cbd5e1;
          min-height: 14px;
          display: block;
          padding: 0 2px;
        }
        .srs-rule-lines div {
          border-bottom: 1.5px dashed #cbd5e1;
          height: 16px;
        }
        .srs-stamp {
          border: 1px dashed #cbd5e1;
          min-height: 65px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #8a8175;
          font-size: 12px;
          letter-spacing: 1px;
          font-weight: 600;
          padding: 4px;
          border-radius: 4px;
        }
        /* Summary */
        .srs-summary {
          margin-top: 18px;
          border: 1px solid #e2e8f0;
          display: flex;
          flex-wrap: wrap;
          background: #ffffff;
        }
        .srs-summary > div {
          flex: 1 1 140px;
          text-align: center;
          padding: 8px 6px;
          border-right: 1px solid #2b2723;
          font-size: 13px;
        }
        .srs-summary > div:last-child {
          border-right: none;
        }
        .srs-summary .num {
          display: block;
          font-size: 19px;
          font-weight: 700;
          font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Kantumruy Pro', 'Siemreap', serif;
        }
        .srs-summary .fail .num {
          color: #b3261e;
        }
        /* Signatures */
        .srs-signatures {
          display: flex;
          justify-content: space-between;
          align-items: flex-start;
          margin-top: 24px;
          font-size: 13px;
        }
        .srs-signatures .sig {
          width: 240px;
        }
        .srs-signatures .role {
          font-weight: 700;
          margin-top: 4px;
        }
        .srs-signatures .space {
          height: 52px;
        }
        .srs-signatures .name-line {
          padding-top: 4px;
          font-size: 12px;
        }
        .srs-note {
          margin-top: 14px;
          font-size: 12px;
          color: #8a8175;
          text-align: center;
        }
        /* Print Styles - 100% Exact Match with Live Preview */
        @media print {
          @page {
            size: A4 portrait;
            margin: 0 !important;
          }
          * {
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
            color-adjust: exact !important;
          }
          body {
            background: #fff !important;
            margin: 0 !important;
            padding: 8mm 10mm !important;
            box-sizing: border-box !important;
          }
          .srs-toolbar, .srs-note, .no-print, .modal-header, .modal-footer, .btn, .page-header, .sidebar, .navbar, .top-nav {
            display: none !important;
          }
          .student-result-sheet-container {
            display: block !important;
            visibility: visible !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
          }
          .student-result-sheet-container * {
            visibility: visible !important;
          }
          .srs-page {
            box-shadow: none !important;
            border: none !important;
            max-width: 100% !important;
            width: 100% !important;
            padding: 10px 16px 8px !important;
            background: #ffffff !important;
            font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Kantumruy Pro', 'Siemreap', 'Noto Sans Khmer', serif !important;
            page-break-inside: avoid !important;
            break-inside: avoid !important;
            page-break-after: always !important;
            break-after: page !important;
            margin: 0 auto !important;
            box-sizing: border-box !important;
          }
          .srs-motto-title, .srs-motto-sub, .srs-doc-title, .srs-school-name {
            font-family: 'Times New Roman', 'Khmer OS Muol Light', 'KhmerOS Muol Light', 'KhmerOS_muollight', 'Khmer OS Muol', 'Moul', 'Khmer OS Battambang', serif !important;
          }
          .srs-result, .srs-meta, .srs-summary, .srs-signatures, .srs-side, .srs-doc-sub {
            font-family: 'Times New Roman', 'Khmer OS Battambang', 'KhmerOS Battambang', 'KhmerOS_battambang', 'Kantumruy Pro', 'Siemreap', 'Noto Sans Khmer', serif !important;
          }
          .srs-batch-page {
            page-break-before: auto !important;
            page-break-after: always !important;
            break-after: page !important;
            page-break-inside: avoid !important;
            break-inside: avoid !important;
            margin: 0 !important;
            padding: 0 !important;
            box-shadow: none !important;
            border: none !important;
            background: transparent !important;
            overflow: visible !important;
          }
          .srs-batch-page:last-child,
          .srs-page:last-child {
            page-break-after: auto !important;
            break-after: auto !important;
            margin-bottom: 0 !important;
          }
          .srs-header {
            padding-bottom: 4px !important;
            margin-bottom: 4px !important;
            border-bottom: 2px double #1e3a8a !important;
          }
          .srs-header-top-grid {
            display: flex !important;
            justify-content: space-between !important;
            align-items: flex-start !important;
            margin-bottom: 2px !important;
          }
          .srs-school-logo {
            max-height: 42px !important;
            max-width: 42px !important;
          }
          .srs-motto-title {
            font-size: 12px !important;
          }
          .srs-motto-sub {
            font-size: 9.5px !important;
          }
          .srs-motto-ornament {
            font-size: 8px !important;
            margin-top: 1px !important;
          }
          .srs-doc-banner-wrap {
            margin: 2px 0 3px !important;
          }
          .srs-doc-title {
            background: #7a1113 !important;
            color: #ffffff !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
            font-size: 11.5px !important;
            padding: 2px 6px !important;
          }
          .srs-doc-sub {
            font-size: 10px !important;
            margin-top: 1px !important;
          }
          .srs-meta {
            padding: 2px 8px !important;
            margin-bottom: 4px !important;
            font-size: 10px !important;
          }
          .srs-main {
            display: flex !important;
            flex-direction: row !important;
            gap: 8px !important;
          }
          .srs-result thead th, .srs-side-box h3 {
            background: #ffffff !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
          }
          .srs-result {
            font-size: 10px !important;
            background: #ffffff !important;
          }
          .srs-result th {
            padding: 2.5px 3px !important;
            font-size: 9.5px !important;
            border: 1px solid #cbd5e1 !important;
            background: #ffffff !important;
          }
          .srs-result td {
            padding: 2px 3px !important;
            font-size: 9.5px !important;
            height: 20px !important;
            border: 1px solid #cbd5e1 !important;
            background: #ffffff !important;
          }
          .srs-result tbody tr {
            background: #ffffff !important;
          }
          .srs-side {
            display: flex !important;
            flex-direction: column !important;
            flex: 0 0 170px !important;
            gap: 5px !important;
          }
          .srs-side-box {
            background: #ffffff !important;
            border: 1px solid #e2e8f0 !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
          }
          .srs-side-box h3 {
            padding: 2px 2px !important;
            font-size: 9px !important;
            border-bottom: 1px solid #e2e8f0 !important;
          }
          .srs-side-box .hint {
            display: none !important;
          }
          .srs-side-box .body {
            padding: 2px 4px !important;
          }
          .srs-field {
            margin-bottom: 2px !important;
            font-size: 9px !important;
          }
          .srs-field .fill {
            min-height: 11px !important;
          }
          .srs-rule-lines div {
            height: 12px !important;
          }
          .srs-stamp {
            min-height: 40px !important;
            font-size: 9px !important;
            padding: 2px !important;
          }
          .srs-stamp img {
            max-height: 38px !important;
          }
          .srs-summary {
            background: #ffffff !important;
            border: 1px solid #e2e8f0 !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
            margin-top: 5px !important;
          }
          .srs-summary > div {
            border-right: 1px solid #e2e8f0 !important;
            padding: 2px 3px !important;
            font-size: 9.5px !important;
          }
          .srs-summary .num {
            font-size: 12.5px !important;
          }
          .srs-grade-counts {
            margin-top: 3px !important;
            padding: 2px 4px !important;
            font-size: 9.5px !important;
          }
          .srs-signatures {
            margin-top: 6px !important;
            font-size: 9.5px !important;
          }
          .srs-signatures .space {
            height: 22px !important;
          }
          .srs-signatures .space img {
            max-height: 26px !important;
          }
          .srs-signatures .sig {
            width: 170px !important;
          }
          .srs-note {
            display: none !important;
          }
        }
        @media (max-width: 760px) {
          .srs-main {
            flex-direction: column;
          }
          .srs-side {
            flex-direction: row;
            flex-wrap: wrap;
            width: 100%;
          }
          .srs-side-box, .srs-stamp {
            flex: 1 1 200px;
          }
        }

/* --- Extracted from TeacherDashboardView.tsx (resources/js/components/TeacherDashboardView.tsx) --- */
.teacher-portal-container {
          display: flex;
          flex-direction: column;
          gap: 20px;
        }

        /* Top Hero Card */
        .teacher-hero-card {
          background: linear-gradient(135deg, #065f46 0%, #0f172a 100%);
          color: #ffffff;
          border-radius: 16px;
          padding: 24px;
          display: flex;
          flex-direction: column;
          gap: 20px;
          box-shadow: 0 10px 25px -5px rgba(6, 95, 70, 0.3);
        }

        @media (min-width: 900px) {
          .teacher-hero-card {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
          }
        }

        .teacher-hero-profile {
          display: flex;
          align-items: center;
          gap: 20px;
        }

        .teacher-avatar-wrap {
          position: relative;
          width: 80px;
          height: 80px;
          flex-shrink: 0;
        }

        .teacher-avatar-img {
          width: 80px;
          height: 80px;
          border-radius: 50%;
          object-fit: cover;
          border: 3px solid rgba(255, 255, 255, 0.3);
        }

        .teacher-avatar-placeholder {
          width: 80px;
          height: 80px;
          border-radius: 50%;
          background: rgba(255, 255, 255, 0.15);
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 32px;
          color: #a7f3d0;
          border: 3px solid rgba(255, 255, 255, 0.25);
        }

        .teacher-status-badge {
          position: absolute;
          bottom: -4px;
          right: -4px;
          background: #10b981;
          color: white;
          font-size: 12px;
          font-weight: 600;
          padding: 2px 6px;
          border-radius: 10px;
          display: flex;
          align-items: center;
          gap: 3px;
        }

        .teacher-profile-info {
          display: flex;
          flex-direction: column;
          gap: 6px;
        }

        .teacher-title-row {
          display: flex;
          align-items: center;
          gap: 12px;
          flex-wrap: wrap;
        }

        .teacher-name {
          font-size: 24px;
          font-weight: 700;
          margin: 0;
          color: #ffffff;
        }

        .teacher-code-badge {
          background: rgba(255, 255, 255, 0.15);
          padding: 4px 10px;
          border-radius: 20px;
          font-size: 12px;
          font-weight: 600;
          color: #a7f3d0;
        }

        .teacher-subtitle {
          margin: 0;
          color: #cbd5e1;
          font-size: 13px;
          display: flex;
          gap: 16px;
          flex-wrap: wrap;
        }

        .teacher-subtitle span {
          display: flex;
          align-items: center;
          gap: 5px;
        }

        /* KPI Bubbles */
        .teacher-quick-kpis {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 12px;
        }

        @media (min-width: 600px) {
          .teacher-quick-kpis {
            grid-template-columns: repeat(4, 1fr);
          }
        }

        .kpi-bubble {
          background: rgba(255, 255, 255, 0.08);
          border: 1px solid rgba(255, 255, 255, 0.12);
          border-radius: 12px;
          padding: 12px 16px;
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
        }

        .kpi-label {
          font-size: 12px;
          text-transform: uppercase;
          letter-spacing: 0.5px;
          color: #94a3b8;
          margin-bottom: 2px;
        }

        .kpi-value {
          font-size: 20px;
          font-weight: 700;
        }

        .kpi-sub {
          font-size: 12px;
          color: #cbd5e1;
        }

        /* Navigation Icon Grid */
        .portal-grid-nav {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
          gap: 15px;
        }

        .portal-nav-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 12px;
          padding: 16px;
          display: flex;
          align-items: center;
          gap: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
          text-align: left;
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        .portal-nav-card:hover {
          transform: translateY(-2px);
          box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
          border-color: #cbd5e1;
        }

        .portal-nav-card.active {
          border-color: #10b981;
          background: #ecfdf5;
          box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
        }

        .nav-icon-box {
          width: 48px;
          height: 48px;
          border-radius: 12px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 20px;
          color: #ffffff;
          flex-shrink: 0;
        }

        .bg-blue { background: linear-gradient(135deg, #16a34a, #15803d); }
        .bg-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
        .bg-emerald { background: linear-gradient(135deg, #10b981, #059669); }
        .bg-sky { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
        .bg-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
        .bg-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .bg-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }

        .nav-card-text h4 {
          margin: 0 0 4px 0;
          font-size: 14px;
          font-weight: 600;
          color: #1e293b;
        }

        .nav-card-text p {
          margin: 0;
          font-size: 12px;
          color: #64748b;
          line-height: 1.3;
        }

        /* Content Cards */
        .content-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 14px;
          padding: 20px;
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        }

        .card-header-flex {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 16px;
          flex-wrap: wrap;
          gap: 10px;
        }

        .card-title {
          margin: 0;
          font-size: 16px;
          font-weight: 700;
          color: #1e293b;
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .card-sub {
          margin: 4px 0 0 0;
          font-size: 12px;
          color: #64748b;
        }

        .link-btn {
          background: none;
          border: none;
          color: #059669;
          font-weight: 600;
          font-size: 13px;
          cursor: pointer;
          padding: 0;
        }

        .link-btn:hover {
          text-decoration: underline;
        }

        /* Filters */
        .filter-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 12px;
          padding: 16px;
        }

        .filter-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
          gap: 14px;
        }

        .filter-group label {
          display: block;
          font-size: 12px;
          font-weight: 600;
          color: #475569;
          margin-bottom: 6px;
        }

        .form-control {
          width: 100%;
          padding: 8px 12px;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          font-size: 13px;
          background: #f8fafc;
        }

        /* Attendance Toggles */
        .att-toggle-group {
          display: flex;
          gap: 4px;
          background: #f1f5f9;
          padding: 3px;
          border-radius: 8px;
        }

        .att-toggle-btn {
          border: none;
          background: none;
          font-size: 12px;
          font-weight: 600;
          padding: 4px 8px;
          border-radius: 6px;
          cursor: pointer;
          color: #64748b;
          transition: all 0.15s ease;
        }

        .att-toggle-btn.active-green {
          background: #10b981;
          color: #ffffff;
        }

        .att-toggle-btn.active-yellow {
          background: #f59e0b;
          color: #ffffff;
        }

        .att-toggle-btn.active-red {
          background: #ef4444;
          color: #ffffff;
        }

        .att-toggle-btn.active-orange {
          background: #f97316;
          color: #ffffff;
        }

        /* Assigned Classes Grid */
        .assigned-classes-grid {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
          gap: 12px;
        }

        .assigned-class-box {
          background: #f8fafc;
          border: 1px solid #e2e8f0;
          border-radius: 10px;
          padding: 12px;
          display: flex;
          align-items: center;
          gap: 10px;
        }

        .class-badge-icon {
          width: 36px;
          height: 36px;
          border-radius: 8px;
          background: #ecfdf5;
          color: #059669;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 16px;
        }

        .class-box-info h4 {
          margin: 0;
          font-size: 13px;
          color: #1e293b;
        }

        .class-box-info p {
          margin: 2px 0 0 0;
          font-size: 12px;
          color: #64748b;
        }

        .class-box-actions {
          margin-left: auto;
          display: flex;
          gap: 4px;
        }

        .btn-icon {
          background: none;
          border: 1px solid #e2e8f0;
          border-radius: 6px;
          padding: 5px 8px;
          cursor: pointer;
        }

        .btn-icon:hover {
          background: #ffffff;
        }

        /* Score KPI Box */
        .score-kpi-summary-box {
          display: grid;
          grid-template-columns: repeat(4, 1fr);
          gap: 10px;
          background: #f8fafc;
          border: 1px solid #e2e8f0;
          border-radius: 8px;
          padding: 10px;
        }

        .kpi-mini {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
        }

        .kpi-mini span {
          font-size: 10px;
          color: #64748b;
        }

        .kpi-mini strong {
          font-size: 14px;
        }

        /* Timetable Grid */
        .timetable-grid-wrap {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
          gap: 12px;
        }

        .timetable-day-col {
          background: #f8fafc;
          border: 1px solid #e2e8f0;
          border-radius: 10px;
          overflow: hidden;
        }

        .timetable-day-col.today-col {
          border-color: #059669;
          box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
        }

        .day-header {
          background: #e2e8f0;
          padding: 10px;
          text-align: center;
          font-weight: 700;
          font-size: 13px;
          color: #334155;
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 6px;
        }

        .today-col .day-header {
          background: #059669;
          color: #ffffff;
        }

        .today-chip {
          background: #ffffff;
          color: #047857;
          font-size: 10px;
          padding: 1px 5px;
          border-radius: 8px;
          font-weight: 700;
        }

        .day-slots {
          padding: 10px;
          display: flex;
          flex-direction: column;
          gap: 8px;
        }

        .slot-card {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 6px;
          padding: 8px 10px;
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        }

        .slot-time {
          font-size: 10px;
          font-weight: 600;
          color: #64748b;
          margin-bottom: 2px;
        }

        .slot-subject {
          font-size: 13px;
          font-weight: 700;
          color: #1e293b;
        }

        .slot-teacher, .slot-room {
          font-size: 12px;
          color: #64748b;
          margin-top: 2px;
          display: flex;
          align-items: center;
          gap: 4px;
        }

        .slot-empty {
          text-align: center;
          padding: 15px 0;
          font-size: 12px;
          color: #94a3b8;
          font-style: italic;
        }

        /* Profile Grid */
        .profile-details-grid {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 14px;
        }

        .detail-item {
          display: flex;
          flex-direction: column;
          gap: 3px;
        }

        .detail-item .label {
          font-size: 12px;
          color: #64748b;
          text-transform: uppercase;
        }

        .detail-item strong {
          font-size: 14px;
          color: #1e293b;
        }

        /* Tables & Badges */
        .data-table, .mini-table {
          width: 100%;
          border-collapse: collapse;
          font-size: 13px;
        }

        .data-table th, .mini-table th {
          background: #f1f5f9;
          color: #475569;
          padding: 10px 12px;
          text-align: left;
          font-weight: 600;
          border-bottom: 1px solid #e2e8f0;
        }

        .data-table td, .mini-table td {
          padding: 10px 12px;
          border-bottom: 1px solid #f1f5f9;
          color: #334155;
        }

        .score-summary-pill {
          background: #ecfdf5;
          border: 1px solid #a7f3d0;
          color: #065f46;
          padding: 6px 14px;
          border-radius: 20px;
          font-size: 13px;
          display: flex;
          gap: 6px;
          align-items: center;
        }

        .grade-badge {
          display: inline-block;
          padding: 2px 8px;
          border-radius: 6px;
          color: #ffffff;
          font-weight: 700;
          font-size: 12px;
          text-align: center;
        }

        .badge-tag {
          background: #e2e8f0;
          color: #475569;
          padding: 2px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 500;
        }

        .badge-status-green {
          background: #dcfce7;
          color: #15803d;
          padding: 3px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 600;
        }

        .badge-status-yellow {
          background: #fef9c3;
          color: #854d0e;
          padding: 3px 8px;
          border-radius: 12px;
          font-size: 12px;
          font-weight: 600;
        }

        .today-classes-list {
          display: flex;
          flex-direction: column;
          gap: 10px;
        }

        .today-class-item {
          display: flex;
          align-items: center;
          gap: 14px;
          padding: 10px 14px;
          background: #f8fafc;
          border-radius: 8px;
          border-left: 4px solid #10b981;
        }

        .period-badge {
          display: flex;
          flex-direction: column;
          align-items: center;
          background: #e2e8f0;
          border-radius: 6px;
          padding: 4px 8px;
          min-width: 45px;
        }

        .period-num {
          font-weight: 700;
          font-size: 13px;
          color: #1e293b;
        }

        .period-session {
          font-size: 9px;
          color: #64748b;
          text-transform: uppercase;
        }

        .class-detail h4 {
          margin: 0 0 2px 0;
          font-size: 14px;
          color: #1e293b;
        }

        .class-detail p {
          margin: 0;
          font-size: 12px;
          color: #64748b;
        }

        .class-actions {
          margin-left: auto;
        }

        .notice-list {
          list-style: none;
          padding: 0;
          margin: 0;
          display: flex;
          flex-direction: column;
          gap: 12px;
        }

        .notice-item {
          display: flex;
          gap: 12px;
          padding: 10px 12px;
          background: #f8fafc;
          border-radius: 8px;
        }

        .notice-icon {
          width: 36px;
          height: 36px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 14px;
          color: #ffffff;
          flex-shrink: 0;
        }

        .notice-content h5 {
          margin: 0 0 3px 0;
          font-size: 13px;
          color: #1e293b;
        }

        .notice-content p {
          margin: 0;
          font-size: 12px;
          color: #64748b;
          line-height: 1.4;
        }

        .empty-notice {
          text-align: center;
          padding: 24px 0;
          color: #94a3b8;
        }

/* --- Extracted from ClassSchedule.tsx (resources/js/pages/ClassSchedule.tsx) --- */
.view-tabs {
          display: flex;
          gap: 10px;
          margin-bottom: 20px;
          border-bottom: 1px solid #e2e8f0;
          padding-bottom: 10px;
        }
        .tab-btn {
          padding: 10px 20px;
          border: none;
          background: none;
          font-weight: 600;
          color: #64748b;
          cursor: pointer;
          border-radius: 6px;
          transition: all 0.2s ease;
          display: flex;
          align-items: center;
          font-size: 14px;
        }
        .tab-btn:hover {
          background: #f1f5f9;
          color: #1e293b;
        }
        .tab-btn.active {
          background: #e2e8f0;
          color: #0f172a;
        }
        .calendar-section-title {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin: 25px 0 12px;
          font-weight: 700;
          color: #334155;
          font-size: 16px;
          border-left: 4px solid var(--primary-color, #2563eb);
          padding-left: 10px;
        }
        .schedule-cell-content {
          position: relative;
          padding: 10px 6px;
          border-radius: 6px;
          min-height: 64px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          text-align: center;
          cursor: pointer;
          transition: all 0.2s ease;
          border: 1px solid rgba(0,0,0,0.1);
          box-shadow: 0 1px 2px rgba(0,0,0,0.05);
          color: #0f172a !important;
          -webkit-text-fill-color: #0f172a !important;
        }
        .schedule-cell-content .subject-name {
          color: #0f172a !important;
          -webkit-text-fill-color: #0f172a !important;
          font-weight: 700 !important;
        }
        .schedule-cell-content:hover {
          filter: brightness(0.95);
          box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
        }
        .schedule-cell-empty {
          color: #475569 !important;
          -webkit-text-fill-color: #475569 !important;
          cursor: pointer;
          padding: 10px 6px;
          min-height: 64px;
          display: flex;
          justify-content: center;
          align-items: center;
          transition: all 0.2s ease;
          border: 1px dashed #cbd5e1;
          border-radius: 6px;
          background: #f8fafc;
        }
        .schedule-cell-empty i {
          color: #475569 !important;
          -webkit-text-fill-color: #475569 !important;
        }
        .schedule-cell-empty:hover {
          background: #f1f5f9;
          border-color: #94a3b8;
          color: #1e293b !important;
          -webkit-text-fill-color: #1e293b !important;
        }
        .schedule-cell-empty:hover i {
          color: #1e293b !important;
          -webkit-text-fill-color: #1e293b !important;
        }
        .cell-actions {
          display: none;
          position: absolute;
          bottom: 3px;
          right: 3px;
          gap: 3px;
          background: rgba(255, 255, 255, 0.95);
          backdrop-filter: blur(4px);
          padding: 2px 3px;
          border-radius: 5px;
          box-shadow: 0 2px 6px rgba(0,0,0,0.12);
          z-index: 5;
        }
        .schedule-cell-content:hover .cell-actions {
          display: flex;
          align-items: center;
        }
        .cell-action-btn {
          background: #ffffff;
          border: 1px solid #cbd5e1;
          border-radius: 4px;
          padding: 3px 5px;
          font-size: 12px;
          line-height: 1;
          cursor: pointer;
          color: #64748b;
          transition: all 0.15s ease;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
        .cell-action-btn:hover {
          background: #ffffff;
          transform: translateY(-1px);
        }
        .cell-action-btn.exchange:hover {
          color: #7c3aed;
          border-color: #8b5cf6;
          background: #f5f3ff;
        }
        .cell-action-btn.replace:hover {
          color: #0d9488;
          border-color: #14b8a6;
          background: #f0fdfa;
        }
        .cell-action-btn.edit:hover {
          color: #2563eb;
          border-color: #3b82f6;
          background: #eff6ff;
        }
        .cell-action-btn.delete:hover {
          color: #dc2626;
          border-color: #ef4444;
          background: #fef2f2;
        }
        .exchange-target-candidate:hover {
          outline: 2px dashed #8b5cf6 !important;
          box-shadow: 0 0 10px rgba(139, 92, 246, 0.35) !important;
          filter: brightness(0.92);
        }
        .exchange-empty-target:hover {
          background: #ede9fe !important;
          border-color: #7c3aed !important;
          color: #6d28d9 !important;
        }
        @keyframes slideUp {
          from {
            opacity: 0;
            transform: translate(-50%, 20px);
          }
          to {
            opacity: 1;
            transform: translate(-50%, 0);
          }
        }
        .subject-name {
          font-weight: 700;
          font-size: 13px;
          color: #0f172a;
        }
        .class-name {
          font-size: 12px;
          color: #475569;
          margin-top: 2px;
          font-weight: 500;
        }
        .ml-5 {
          margin-left: 5px;
        }
        @media print {
          .sidebar, #sidebar, .header, #header, .view-tabs, .filter-section, .page-header-actions, .cell-actions, .schedule-cell-empty, button, .floating-exchange-banner {
            display: none !important;
          }
          .page {
            margin: 0 !important;
            padding: 0 !important;
          }
          .card {
            border: none !important;
            box-shadow: none !important;
            padding: 0 !important;
          }
          .table-wrapper {
            overflow: visible !important;
          }
          table {
            width: 100% !important;
            border-collapse: collapse !important;
          }
          th, td {
            border: 1px solid #cbd5e1 !important;
          }
        }

/* --- Extracted from Discipline.tsx (resources/js/pages/Discipline.tsx) --- */
.discipline-module-tile:hover {
          transform: translateY(-3px);
          box-shadow: 0 6px 16px rgba(0,0,0,0.08) !important;
          border-color: #93c5fd !important;
        }
        .discipline-table-row:hover {
          background-color: #f8fafc !important;
        }
        @media print {
          body * {
            visibility: hidden;
          }
          .card, .card * {
            visibility: visible;
          }
          .page-header, .management-tabs-container, .discipline-module-tile, .filter-section {
            display: none !important;
          }
        }

/* --- Extracted from InputScore.tsx (resources/js/pages/InputScore.tsx) --- */
@keyframes scoreSkeletonShimmer {
            0% { opacity: 0.4; }
            50% { opacity: 0.95; }
            100% { opacity: 0.4; }
          }
          .score-skeleton-pulse {
            animation: scoreSkeletonShimmer 1.1s ease-in-out infinite;
          }
          @keyframes fastBarMove {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
          }
          .fast-loading-top-bar {
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #3b82f6, #6366f1, #06b6d4, #3b82f6);
            background-size: 200% 100%;
            animation: fastBarMove 0.8s linear infinite;
            z-index: 9999;
          }
          .input-score-table-wrap::-webkit-scrollbar {
            width: 6px;
            height: 6px;
          }
          .input-score-table-wrap::-webkit-scrollbar-track {
            background: #f1f5f9;
          }
          .input-score-table-wrap::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 3px;
          }
          .input-score-table-wrap::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
          }
          .input-score-table tbody tr:hover td {
            filter: brightness(0.97);
          }
          .input-score-table tbody tr:hover td.sticky-col-idx,
          .input-score-table tbody tr:hover td.sticky-col-name {
            background-color: #f1f5f9 !important;
          }
          .input-score-table input[type="text"]:not(:disabled):hover,
          .score-cell-input:not(:disabled):hover {
            border-color: #3b82f6 !important;
            box-shadow: 0 0 0 1px #3b82f6 !important;
            background-color: #f0f7ff !important;
            cursor: pointer;
          }
          .input-score-table input[type="text"]:not(:disabled):focus,
          .score-cell-input:not(:disabled):focus {
            border-color: #2563eb !important;
            box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.3) !important;
            background-color: #ffffff !important;
            cursor: text;
          }
          .micro-teacher-badge,
          .micro-teacher-badge span,
          .micro-teacher-badge i {
            font-size: 6.5px !important;
            line-height: 1.1 !important;
          }
          @media (max-width: 768px) {
            .content-area,
            .portal-layout .content-area {
              padding-left: 0 !important;
              padding-right: 0 !important;
              padding-top: 4px !important;
            }
            .input-score-page {
              padding-left: 0 !important;
              padding-right: 0 !important;
              margin-left: 0 !important;
              margin-right: 0 !important;
              width: 100% !important;
              max-width: 100% !important;
            }
            .input-score-page .page-header {
              padding-left: 4px !important;
              padding-right: 4px !important;
              margin-bottom: 4px !important;
            }
            .input-score-page .card {
              border-left: none !important;
              border-right: none !important;
              border-radius: 0 !important;
              margin-left: 0 !important;
              margin-right: 0 !important;
              box-shadow: none !important;
            }
            .input-score-page .a4-sheet-canvas {
              padding-left: 0 !important;
              padding-right: 0 !important;
              padding-top: 2px !important;
              padding-bottom: 10px !important;
              width: 100% !important;
              background: #ffffff !important;
            }
            .input-score-page .a4-score-sheet {
              padding-left: 0 !important;
              padding-right: 0 !important;
              padding-top: 2px !important;
              padding-bottom: 4px !important;
              border-left: none !important;
              border-right: none !important;
              border-radius: 0 !important;
              box-shadow: none !important;
              width: 100% !important;
              max-width: 100% !important;
            }
            .input-score-page .a4-score-sheet > .table-wrapper,
            .input-score-page .input-score-table-wrap {
              border-left: none !important;
              border-right: none !important;
              border-radius: 0 !important;
              width: 100% !important;
            }
            .input-score-page .table-footer {
              padding-left: 4px !important;
              padding-right: 4px !important;
            }
            .score-cell-input,
            .excel-score-input {
              height: 24px !important;
              font-size: 12px !important;
            }
            .input-score-table col:nth-child(1) {
              width: 24px !important;
              min-width: 24px !important;
              max-width: 26px !important;
            }
            .input-score-table col:nth-child(2) {
              width: 95px !important;
              min-width: 85px !important;
              max-width: 105px !important;
            }
            .input-score-table th.sticky-col-idx,
            .input-score-table td.sticky-col-idx {
              width: 24px !important;
              min-width: 24px !important;
              max-width: 26px !important;
              padding: 1px 1px !important;
            }
            .input-score-table th.sticky-col-name,
            .input-score-table td.sticky-col-name {
              left: 24px !important;
              width: 95px !important;
              min-width: 85px !important;
              max-width: 105px !important;
              padding: 1px 3px !important;
            }
          }
          @media print {
            @page {
              size: A4 landscape;
              margin: 6mm 8mm;
            }
            body {
              background: #ffffff !important;
              font-size: 10px !important;
              -webkit-print-color-adjust: exact !important;
              print-color-adjust: exact !important;
            }
            .sidebar, .app-sidebar, .app-header, .page-header, .card-header,
            .btn, button, .action-buttons, .no-print,
            .input-score-actions-top, .score-assign-bar {
              display: none !important;
            }
            .card {
              border: none !important;
              box-shadow: none !important;
              background: transparent !important;
              padding: 0 !important;
              margin: 0 !important;
            }
            .a4-sheet-canvas {
              padding: 0 !important;
              background: transparent !important;
              margin: 0 !important;
              display: block !important;
            }
            .a4-score-sheet {
              max-width: 100% !important;
              width: 100% !important;
              border: none !important;
              box-shadow: none !important;
              padding: 0 !important;
              border-radius: 0 !important;
            }
            .table-wrapper.input-score-table-wrap {
              max-height: none !important;
              overflow: visible !important;
              border: none !important;
            }
            .input-score-table {
              width: 100% !important;
            }
            .excel-score-input, .score-cell-input {
              border: none !important;
              background: transparent !important;
              font-size: 9.5px !important;
            }
          }

/* --- Extracted from Login.tsx (resources/js/pages/Login.tsx) --- */
@keyframes gradientBG {
          0% { background-position: 0% 50%; }
          50% { background-position: 100% 50%; }
          100% { background-position: 0% 50%; }
        }

/* --- Extracted from Login.tsx (resources/js/pages/Login.tsx) --- */
@keyframes gradientBG {
          0% { background-position: 0% 50%; }
          50% { background-position: 100% 50%; }
          100% { background-position: 0% 50%; }
        }
        
        /* Custom Scrollbar Styling */
        ::-webkit-scrollbar {
          width: 8px;
        }
        ::-webkit-scrollbar-track {
          background: #f1f5f9;
          border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb {
          background: #cbd5e1;
          border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
          background: #94a3b8;
        }
        
        @media (max-width: 768px) {
          .login-split-card {
            flex-direction: column !important;
            max-width: 400px !important;
          }
          .login-image-panel, .login-split-card > div:first-child {
            width: 100% !important;
          }
          .login-image-panel {
            height: 160px;
          }
          .login-split-card > div:first-child {
            padding: 20px !important;
          }
        }

/* --- Extracted from MediaManager.tsx (resources/js/pages/MediaManager.tsx) --- */
.filemanager {
          display: flex;
          height: calc(100vh - 120px);
          background: #f5f5f5;
        }
        
        .filemanager--sidebar {
          width: 200px;
          background: #fff;
          border-right: 1px solid #e5e7eb;
        }
        
        .filemanager--tabs ul {
          list-style: none;
          padding: 0;
          margin: 0;
        }
        
        .filemanager--tabs li {
          border-bottom: 1px solid #f0f0f0;
        }
        
        .filemanager--tabs button {
          width: 100%;
          padding: 12px 16px;
          text-align: left;
          background: none;
          border: none;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 14px;
          color: #6b7280;
        }
        
        .filemanager--tabs li.active button {
          background: #eff6ff;
          color: #3b82f6;
          border-left: 3px solid #3b82f6;
        }
        
        .filemanager--tabs button:hover {
          background: #f9fafb;
        }
        
        .filemanager--main {
          flex: 1;
          display: flex;
          flex-direction: column;
          overflow: hidden;
        }
        
        .filemanager--breadcrumbs {
          padding: 12px 16px;
          background: #fff;
          border-bottom: 1px solid #e5e7eb;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        
        .filemanager--breadcrumbs button {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
          font-size: 13px;
          color: #6b7280;
        }
        
        .filemanager--breadcrumbs button:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .filemanager--breadcrumbs .separator {
          color: #9ca3af;
        }
        
        .filemanager--content {
          flex: 1;
          display: flex;
          flex-direction: row;
          overflow: hidden;
          height: 100%;
          width: 100%;
        }
        
        .filemanager--files {
          flex: 0 0 70%;
          width: 70%;
          max-width: 70%;
          overflow-y: auto;
          padding: 16px;
        }
        
        .grid-view {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
          gap: 12px;
          list-style: none;
          padding: 0;
          margin: 0;
        }
        
        .list-view {
          display: flex;
          flex-direction: column;
          gap: 8px;
          list-style: none;
          padding: 0;
          margin: 0;
        }
        
        .list-view li {
          display: flex;
          align-items: center;
          padding: 8px 12px;
        }
        
        .list-view .file-preview {
          width: 60px;
          height: 60px;
          flex-shrink: 0;
        }
        
        .list-view .file-info {
          flex: 1;
          margin-left: 12px;
        }
        
        .grid-view li,
        .list-view li {
          background: #fff;
          border: 2px solid #e5e7eb;
          border-radius: 8px;
          cursor: pointer;
          transition: all 0.2s;
          overflow: hidden;
        }
        
        .grid-view li:hover,
        .list-view li:hover {
          border-color: #3b82f6;
          box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
        }
        
        .grid-view li.selected,
        .list-view li.selected {
          border-color: #3b82f6;
          background: #eff6ff;
        }
        
        .file-preview {
          height: 120px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #f9fafb;
          overflow: hidden;
        }
        
        .file-preview img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
        
        .file-info {
          padding: 10px;
        }
        
        .file-name {
          font-size: 13px;
          font-weight: 500;
          color: #1f2937;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        
        .file-size {
          font-size: 12px;
          color: #9ca3af;
        }
        
        .filemanager--info {
          flex: 0 0 30%;
          width: 30%;
          max-width: 30%;
          background: #fff;
          border-left: 1px solid #e5e7eb;
          overflow-y: auto;
        }
        
        .modal-overlay {
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: rgba(0, 0, 0, 0.5);
          display: flex;
          align-items: center;
          justify-content: center;
          z-index: 1000;
        }
        
        .modal-content {
          background: #fff;
          border-radius: 8px;
          max-width: 500px;
          width: 90%;
          max-height: 90vh;
          overflow-y: auto;
        }
        
        .modal-md {
          max-width: 700px;
        }
        
        .modal-header {
          padding: 16px 20px;
          border-bottom: 1px solid #e5e7eb;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        
        .modal-header h3 {
          margin: 0;
          font-size: 18px;
          color: #1f2937;
        }
        
        .modal-header button {
          background: none;
          border: none;
          font-size: 18px;
          cursor: pointer;
          color: #6b7280;
        }
        
        .modal-body {
          padding: 20px;
        }
        
        .media-actions-grid {
          display: grid;
          gap: 16px;
        }
        
        .media-actions-section {
          font-size: 12px;
          font-weight: 600;
          color: #9ca3af;
          text-transform: uppercase;
          letter-spacing: 0.5px;
        }
        
        .media-action-btn-new {
          width: 100%;
          padding: 8px 12px;
          background: #fff;
          border: 1px solid #e2e8f0;
          border-radius: 6px;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 13px;
          font-weight: 500;
          color: #334155;
          transition: all 0.15s;
        }
        
        .media-action-btn-new:hover {
          background: #f8fafc;
          border-color: #cbd5e1;
        }
        
        .media-action-btn-new:disabled {
          opacity: 0.5;
          cursor: not-allowed;
        }
        
        .media-action-btn {
          width: 100%;
          padding: 10px 16px;
          background: #fff;
          border: 1px solid #e5e7eb;
          border-radius: 6px;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 10px;
          font-size: 14px;
          color: #374151;
          transition: all 0.2s;
        }
        
        .media-action-btn:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .media-action-btn:disabled {
          opacity: 0.5;
          cursor: not-allowed;
        }
        
        .media-sort-row {
          display: flex;
          gap: 8px;
        }
        
        .media-sort-btn {
          flex: 1;
          padding: 8px 12px;
          background: #fff;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
          font-size: 13px;
          color: #6b7280;
        }
        
        .media-sort-btn.active {
          background: #eff6ff;
          border-color: #3b82f6;
          color: #3b82f6;
        }
        
        .media-action-divider {
          height: 1px;
          background: #e5e7eb;
          margin: 8px 0;
        }
        
        .media-details-container {
          display: flex;
          flex-direction: column;
          gap: 20px;
        }
        
        .media-details-preview {
          width: 100%;
          aspect-ratio: 1;
          background: #f9fafb;
          border-radius: 8px;
          display: flex;
          align-items: center;
          justify-content: center;
          overflow: hidden;
        }
        
        .media-details-preview img {
          max-width: 100%;
          max-height: 100%;
          object-fit: contain;
        }
        
        .media-details-info {
          display: grid;
          gap: 12px;
        }
        
        .media-details-label {
          font-size: 12px;
          font-weight: 600;
          color: #9ca3af;
          text-transform: uppercase;
        }
        
        .media-details-value {
          font-size: 14px;
          color: #374151;
          word-break: break-all;
        }
        
        .media-details-value.path {
          font-family: monospace;
          font-size: 12px;
          color: #6b7280;
        }
        
        .media-details-footer {
          display: flex;
          justify-content: flex-end;
          margin-top: 20px;
        }
        
        .btn-media-close {
          padding: 8px 24px;
          background: #6b7280;
          color: white;
          border: none;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .btn-media-close:hover {
          background: #4b5563;
        }
        
        .header-upload-btn {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
          font-size: 14px;
          color: #6b7280;
          display: flex;
          align-items: center;
          gap: 4px;
        }
        
        .header-upload-btn:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .view.icon {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .view.icon.active {
          background: #eff6ff;
          border-color: #3b82f6;
          color: #3b82f6;
        }
        
        .primary {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .primary:hover {
          background: #f9fafb;
          border-color: #3b82f6;
        }
        
        .danger {
          padding: 4px 8px;
          background: none;
          border: 1px solid #e5e7eb;
          border-radius: 4px;
          cursor: pointer;
        }
        
        .danger:hover {
          background: #fef2f2;
          border-color: #ef4444;
        }
        
        .toggle {
          opacity: 0.8;
        }

/* --- Extracted from SchoolExam.tsx (resources/js/pages/SchoolExam.tsx) --- */
.card-actions-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
        }

        .exam-filter-panel {
          background: #ffffff;
          border: 1px solid #e2e8f0;
          border-radius: 8px;
          padding: 10px 14px;
          margin-bottom: 16px;
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
          position: relative;
          z-index: 50;
          overflow: visible;
        }

        .exam-filter-toolbar {
          display: flex;
          align-items: center;
          gap: 10px;
          flex-wrap: wrap;
        }

        .exam-filter-search-box {
          position: relative;
          display: flex;
          align-items: center;
          flex: 1 1 200px;
          min-width: 180px;
          max-width: 320px;
        }

        .exam-filter-search-box i.fa-search {
          position: absolute;
          left: 10px;
          color: #94a3b8;
          font-size: 13px;
          pointer-events: none;
        }

        .exam-filter-search-box input {
          width: 100%;
          padding: 7px 30px 7px 32px;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          font-size: 13px;
          background: #f8fafc;
          color: #1e293b;
          transition: all 0.15s ease;
        }

        .exam-filter-search-box input:focus {
          outline: none;
          border-color: #2563eb;
          background: #ffffff;
          box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        }

        .exam-filter-subsearch-clear {
          position: absolute;
          right: 8px;
          background: none;
          border: none;
          color: #94a3b8;
          cursor: pointer;
          padding: 2px 4px;
          font-size: 11px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 50%;
          transition: color 0.12s;
        }

        .exam-filter-subsearch-clear:hover {
          color: #475569;
        }

        .exam-filter-dropdown-wrap {
          position: relative;
          display: inline-block;
        }

        .exam-filter-dropdown-btn {
          display: inline-flex;
          align-items: center;
          gap: 8px;
          padding: 7px 12px;
          font-size: 13px;
          font-weight: 500;
          color: #334155;
          background: #ffffff;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          cursor: pointer;
          transition: all 0.15s ease;
          white-space: nowrap;
          user-select: none;
        }

        .exam-filter-dropdown-btn:hover {
          background: #f8fafc;
          border-color: #94a3b8;
          color: #0f172a;
        }

        .exam-filter-dropdown-btn.active {
          background: #eff6ff;
          border-color: #3b82f6;
          color: #1d4ed8;
          box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
        }

        .exam-filter-dropdown-btn.has-value {
          border-color: #3b82f6;
          color: #1d4ed8;
          background: #f0f9ff;
          font-weight: 600;
        }

        .exam-filter-dropdown-btn i.fa-chevron-down {
          font-size: 10px;
          color: #64748b;
          transition: transform 0.15s ease;
        }

        .exam-filter-dropdown-btn.active i.fa-chevron-down {
          transform: rotate(180deg);
        }

        .exam-filter-dropdown-badge {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          min-width: 18px;
          height: 18px;
          padding: 0 5px;
          font-size: 11px;
          font-weight: 700;
          border-radius: 9px;
          background: #16a34a;
          color: #ffffff;
        }

        .exam-filter-dropdown-menu {
          position: absolute;
          top: calc(100% + 5px);
          left: 0;
          z-index: 1050;
          min-width: 260px;
          max-width: 340px;
          background: #ffffff;
          border: 1px solid #cbd5e1;
          border-radius: 8px;
          box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
          padding: 0;
          overflow: hidden;
          animation: examFilterFadeIn 0.12s ease-out;
        }

        @keyframes examFilterFadeIn {
          from {
            opacity: 0;
            transform: translateY(-4px);
          }
          to {
            opacity: 1;
            transform: translateY(0);
          }
        }

        .exam-dropdown-search-wrap {
          padding: 8px 10px;
          border-bottom: 1px solid #f1f5f9;
          background: #fafafa;
        }

        .exam-filter-subsearch {
          position: relative;
          display: flex;
          align-items: center;
        }

        .exam-filter-subsearch i.fa-search {
          position: absolute;
          left: 8px;
          color: #94a3b8;
          font-size: 11.5px;
          pointer-events: none;
        }

        .exam-filter-subsearch input {
          width: 100%;
          padding: 5px 26px 5px 26px;
          font-size: 12px;
          border: 1px solid #cbd5e1;
          border-radius: 5px;
          background: #ffffff;
          color: #1e293b;
        }

        .exam-filter-subsearch input:focus {
          outline: none;
          border-color: #3b82f6;
          box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
        }

        .exam-dropdown-actions {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 6px 10px;
          font-size: 11.5px;
          color: #64748b;
          background: #f8fafc;
          border-bottom: 1px solid #e2e8f0;
        }

        .exam-dropdown-actions-left {
          font-weight: 500;
        }

        .exam-dropdown-actions-right {
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .exam-filter-mini-action {
          background: none;
          border: none;
          color: #2563eb;
          font-size: 11.5px;
          font-weight: 600;
          cursor: pointer;
          padding: 2px 6px;
          border-radius: 4px;
          transition: all 0.12s;
        }

        .exam-filter-mini-action:hover {
          background: #dbeafe;
          color: #1d4ed8;
        }

        .exam-dropdown-list {
          max-height: 220px;
          overflow-y: auto;
          padding: 4px 0;
        }

        .exam-dropdown-list::-webkit-scrollbar {
          width: 5px;
        }

        .exam-dropdown-list::-webkit-scrollbar-thumb {
          background: #cbd5e1;
          border-radius: 4px;
        }

        .exam-filter-no-matches {
          padding: 12px 14px;
          font-size: 12px;
          color: #94a3b8;
          text-align: center;
        }

        .exam-dropdown-item {
          display: flex;
          align-items: center;
          gap: 9px;
          padding: 7px 12px;
          font-size: 13px;
          color: #334155;
          cursor: pointer;
          transition: background 0.1s ease;
          user-select: none;
          margin: 0;
        }

        .exam-dropdown-item:hover {
          background: #f1f5f9;
        }

        .exam-dropdown-item.selected {
          background: #eff6ff;
          color: #1d4ed8;
          font-weight: 500;
        }

        .exam-dropdown-item input[type="checkbox"] {
          cursor: pointer;
          width: 15px;
          height: 15px;
          accent-color: #2563eb;
          border-radius: 3px;
          margin: 0;
        }

        .exam-dropdown-item-text {
          flex: 1;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .exam-dropdown-item-count {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          font-size: 11px;
          color: #64748b;
          background: #e2e8f0;
          border-radius: 10px;
          padding: 1px 6px;
          min-width: 18px;
        }

        .exam-dropdown-item.selected .exam-dropdown-item-count {
          background: #bfdbfe;
          color: #1e40af;
        }

        .exam-dropdown-footer {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 8px 12px;
          background: #f8fafc;
          border-top: 1px solid #e2e8f0;
        }

        .exam-dropdown-footer-btn {
          padding: 4px 12px;
          font-size: 12px;
          font-weight: 600;
          color: #ffffff;
          background: #16a34a;
          border: none;
          border-radius: 5px;
          cursor: pointer;
          transition: background 0.12s;
        }

        .exam-dropdown-footer-btn:hover {
          background: #15803d;
        }

        .exam-filter-clear-btn {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 7px 11px;
          font-size: 12.5px;
          font-weight: 600;
          color: #dc2626;
          background: #fef2f2;
          border: 1px solid #fecaca;
          border-radius: 6px;
          cursor: pointer;
          transition: all 0.12s ease;
          margin-left: auto;
        }

        .exam-filter-clear-btn:hover {
          background: #fee2e2;
          border-color: #fca5a5;
          color: #b91c1c;
        }

        /* Active Pills */
        .exam-filter-active-pills {
          display: flex;
          align-items: center;
          flex-wrap: wrap;
          gap: 6px;
          margin-top: 10px;
          padding-top: 8px;
          border-top: 1px dashed #e2e8f0;
        }

        .exam-filter-active-label {
          font-size: 12px;
          font-weight: 600;
          color: #64748b;
          margin-right: 2px;
        }

        .exam-filter-pill-item {
          display: inline-flex;
          align-items: center;
          gap: 5px;
          font-size: 12px;
          color: #1e40af;
          background: #eff6ff;
          border: 1px solid #bfdbfe;
          border-radius: 14px;
          padding: 2px 8px 2px 10px;
          font-weight: 500;
        }

        .exam-filter-pill-item button {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          background: none;
          border: none;
          color: #3b82f6;
          cursor: pointer;
          padding: 0;
          margin-left: 2px;
          font-size: 10px;
          width: 14px;
          height: 14px;
          border-radius: 50%;
          transition: all 0.1s;
        }

        .exam-filter-pill-item button:hover {
          background: #dbeafe;
          color: #1d4ed8;
        }

/* --- Extracted from ScoreLock.tsx (resources/js/pages/ScoreLock.tsx) --- */
.table-sticky-first th:first-child,
        .table-sticky-first td:first-child {
          position: sticky;
          left: 0;
          z-index: 2;
          box-shadow: 2px 0 5px rgba(0,0,0,0.05);
        }
        .table-sticky-first th:nth-child(2),
        .table-sticky-first td:nth-child(2) {
          position: sticky;
          left: 40px;
          z-index: 2;
          box-shadow: 2px 0 5px rgba(0,0,0,0.05);
        }
        .border-left {
          border-left: 1px solid var(--table-row-border) !important;
        }
        .input-xs {
          padding: 3px 6px;
          font-size: 12px;
          border: 1px solid var(--border);
          border-radius: 4px;
        }
        .fs-16 { font-size: 16px; }
        .flex { display: flex; }
        .flex-column { display: flex; flex-direction: column; }
        .align-center { align-items: center; }
        .justify-center { justify-content: center; }
        .gap-5 { gap: 5px; }
        .gap-10 { gap: 10px; }
        .w-full { width: 100%; }
        .cursor-pointer { cursor: pointer; }

/* --- Extracted from ScorePublishing.tsx (resources/js/pages/ScorePublishing.tsx) --- */
.switch-sm {
          width: 34px;
          height: 18px;
        }
        .switch-sm .slider:before {
          height: 14px;
          width: 14px;
          left: 2px;
          bottom: 2px;
        }
        input:checked + .switch-sm .slider:before {
          transform: translateX(16px);
        }
        .min-w-80 { min-width: 80px; }

/* --- Extracted from ScoreReview.tsx (resources/js/pages/ScoreReview.tsx) --- */
.excel-grid-table {
          width: 100%;
          border-collapse: collapse;
        }
        .excel-grid-table th, .excel-grid-table td {
          border: 1px solid #e2e8f0;
          padding: 6px 8px;
        }
        .excel-grid-table thead th {
          background: #f1f5f9;
          color: #1e293b;
          font-weight: 600;
          font-size: 12px;
        }

        .print-only-container {
          display: none;
        }

        @font-face {
          font-family: 'Khmer OS Battambang';
          src: url('/assets/fonts/KhmerOS_battambang.ttf') format('truetype');
        }
        @font-face {
          font-family: 'Khmer OS Muol Light';
          src: url('/assets/fonts/KhmerOS_muollight.ttf') format('truetype');
        }
        @font-face {
          font-family: 'Times New Roman';
          src: url('/assets/fonts/Times_New_Roman.ttf') format('truetype');
        }

        /* ── Official Print Styles ── */
        @media print {
          * {
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
            color-adjust: exact !important;
          }
          body {
            background: #fff !important;
            color: #000 !important;
            font-family: 'Khmer OS Battambang', 'Times New Roman', sans-serif !important;
            margin: 0 !important;
            padding: 0 !important;
          }
          .no-print, .page-header, .card, .sidebar, .navbar, .top-nav, header, nav, .modal-header, .modal-footer {
            display: none !important;
          }
          .page {
            padding: 0 !important;
            margin: 0 !important;
          }

          /* Unclip modal wrappers during print so full content prints cleanly */
          .modal-overlay, .modal, .modal-content, .modal-body {
            position: static !important;
            overflow: visible !important;
            max-height: none !important;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0 !important;
            margin: 0 !important;
            display: block !important;
            visibility: visible !important;
          }

          .class-print-sheet {
            page-break-after: always;
            break-after: page;
            margin-bottom: 20px;
            padding: 10px 0;
            font-family: 'Khmer OS Battambang', 'Times New Roman', sans-serif !important;
          }
          .print-header-grid {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
          }
          .print-school-info {
            text-align: left;
          }
          .print-national-motto {
            text-align: right;
          }
          .khmer-motto-title {
            font-family: 'Khmer OS Muol Light', 'Times New Roman', serif !important;
            font-size: 13px;
            font-weight: bold;
          }
          .khmer-motto-subtitle {
            font-family: 'Khmer OS Muol Light', 'Times New Roman', serif !important;
            font-size: 12px;
          }
          .khmer-motto-ornament {
            font-size: 8px;
            letter-spacing: 2px;
          }
          .print-title-section {
            text-align: center;
            margin-bottom: 12px;
          }
          .print-main-title {
            font-family: 'Khmer OS Muol Light', 'Times New Roman', serif !important;
            font-size: 14px;
            font-weight: bold;
            color: #000;
          }
          .print-meta-info {
            font-size: 10.5px;
            margin-top: 4px;
          }
          .print-meta-info .separator {
            margin: 0 6px;
            color: #666;
          }
          .print-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 9.5px;
            margin-bottom: 15px;
          }
          .print-table th, .print-table td {
            border: 1px solid #000 !important;
            padding: 3px 4px;
            text-align: center;
            color: #000 !important;
          }
          .print-table thead th {
            background-color: #f1f5f9 !important;
            font-weight: bold;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
          }
          .print-footer-grid {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-top: 15px;
            font-size: 10px;
          }
          .print-footer-left {
            line-height: 1.6;
          }
          .print-footer-right {
            text-align: right;
          }
          .print-date-line {
            font-style: italic;
          }
          .print-signature-role {
            font-weight: bold;
            margin-top: 4px;
          }
          .print-signature-box {
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            margin: 6px 0;
          }
          .print-blank-signature {
            color: #777;
            font-size: 9px;
          }
          .print-teacher-name {
            font-weight: bold;
            font-size: 12px;
          }
        }

/* --- Extracted from StudentAccount.tsx (resources/js/pages/StudentAccount.tsx) --- */
.student-account-page {
          background-color: #f4f6f9;
          min-height: 100vh;
          padding: 24px;
        }

        .page-meta-row {
          display: flex;
          justify-content: space-between;
          align-items: center;
          flex-wrap: wrap;
          gap: 16px;
          margin-bottom: 24px;
        }

        .breadcrumbs {
          font-size: 13px;
          color: #6c757d;
        }

        .breadcrumbs span {
          margin: 0 4px;
          color: #ccc;
        }

        .meta-select-filters {
          display: flex;
          gap: 12px;
          align-items: center;
        }

        .meta-filter-group {
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 14px;
          color: #555;
        }

        .select-input {
          padding: 6px 12px;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          background-color: #fff;
          font-size: 14px;
          color: #333;
          outline: none;
        }

        .search-card {
          background: #fff;
          border-radius: 8px;
          border: 1px solid #e2e8f0;
          padding: 24px;
          margin-bottom: 24px;
        }

        .search-card h3 {
          font-size: 18px;
          font-weight: 500;
          margin-bottom: 20px;
          color: #333;
        }

        .search-grid {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 20px;
          margin-bottom: 20px;
        }

        .search-field-group {
          display: grid;
          grid-template-columns: 100px 1fr;
          align-items: center;
          gap: 12px;
        }

        .search-field-group label {
          font-size: 14px;
          color: #4a5568;
          text-align: right;
        }

        .form-control {
          width: 100%;
          padding: 8px 12px;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          font-size: 14px;
          outline: none;
        }

        .form-control:focus {
          border-color: #1565c0;
          box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
        }

        .search-actions {
          display: flex;
          justify-content: center;
        }

        .btn-search {
          background-color: #1565c0;
          color: #fff;
          border: none;
          padding: 9px 28px;
          border-radius: 6px;
          font-size: 14px;
          font-weight: 500;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .btn-search:hover {
          background-color: #0d47a1;
        }

        .data-card {
          background: #fff;
          border-radius: 8px;
          border: 1px solid #e2e8f0;
          padding: 24px;
          display: flex;
          flex-direction: column;
          gap: 20px;
        }

        .data-card h3 {
          font-size: 18px;
          font-weight: 500;
          color: #333;
        }

        .action-triggers-row {
          display: flex;
          gap: 12px;
          flex-wrap: wrap;
        }

        .btn-action {
          padding: 8px 20px;
          border-radius: 6px;
          font-size: 14px;
          font-weight: 500;
          border: none;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 8px;
          color: #fff;
        }

        .btn-blue-action {
          background-color: #2563eb !important;
          border: 1px solid #1d4ed8 !important;
          color: #ffffff !important;
        }

        .btn-blue-action:hover {
          background-color: #1d4ed8 !important;
        }

        .btn-outline-blue {
          background-color: #ffffff !important;
          border: 1px solid #3b82f6 !important;
          color: #2563eb !important;
        }

        .btn-outline-blue:hover {
          background-color: #eff6ff !important;
          border-color: #2563eb !important;
        }

        .btn-delete-action {
          background-color: #dc2626 !important;
          border: 1px solid #b91c1c !important;
          color: #ffffff !important;
        }

        .btn-delete-action:hover {
          background-color: #b91c1c !important;
        }

        .table-responsive {
          overflow-x: auto;
          border: 1px solid #e2e8f0;
          border-radius: 6px;
        }

        .data-table {
          width: 100%;
          border-collapse: collapse;
          font-size: 14px;
          text-align: left;
        }

        .data-table th {
          background-color: #f8fafc;
          color: #333;
          font-weight: 600;
          padding: 14px 16px;
          border-bottom: 2px solid #e2e8f0;
        }

        .data-table td {
          padding: 12px 16px;
          border-bottom: 1px solid #e2e8f0;
          vertical-align: middle;
        }

        .data-table tbody tr:hover {
          background-color: #fdfdfd;
        }

        .student-profile-cell {
          display: flex;
          flex-direction: column;
          gap: 4px;
        }

        .student-khmer-name {
          font-weight: 500;
          color: #111;
          font-size: 14px;
        }

        .student-meta-details {
          font-size: 12px;
          color: #777;
          display: flex;
          gap: 12px;
        }

        .badge-status {
          background-color: #e6f9f7;
          color: #00b4d8;
          padding: 4px 16px;
          border-radius: 20px;
          font-size: 12px;
          font-weight: 600;
          display: inline-block;
          text-align: center;
        }

        .badge-status.active {
          background-color: #2ec4b6;
          color: #fff;
        }

        .action-cell-btn {
          background: #e3f2fd;
          color: #1565c0;
          border: none;
          padding: 6px 10px;
          border-radius: 4px;
          cursor: pointer;
          font-size: 13px;
        }

        .action-cell-btn:hover {
          background-color: #bbdefb;
        }

        .checkbox-custom {
          width: 16px;
          height: 16px;
          cursor: pointer;
        }

        .loading-box {
          text-align: center;
          padding: 40px;
          color: #666;
        }

        .table-footer-controls {
          display: flex;
          justify-content: space-between;
          align-items: center;
          font-size: 14px;
          color: #555;
          padding-top: 8px;
        }

        .show-entries {
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .show-entries input {
          width: 50px;
          padding: 4px 6px;
          border: 1px solid #cbd5e1;
          border-radius: 4px;
          text-align: center;
        }

        .pagination {
          display: flex;
          gap: 4px;
          align-items: center;
          list-style: none;
        }

        .page-link {
          padding: 6px 12px;
          border-radius: 4px;
          text-decoration: none;
          color: #555;
          cursor: pointer;
          font-size: 13px;
          border: none;
          background: none;
        }

        .page-link.active {
          background-color: #1565c0;
          color: #fff;
          font-weight: 600;
        }

        .page-link.disabled {
          color: #ccc;
          cursor: not-allowed;
        }

        .page-link:hover:not(.active):not(.disabled) {
          background-color: #f0f0f0;
        }

/* --- Extracted from TeachingSchedule.tsx (resources/js/pages/TeachingSchedule.tsx) --- */
.view-tabs {
          display: flex;
          gap: 10px;
          margin-bottom: 20px;
          border-bottom: 1px solid #e2e8f0;
          padding-bottom: 10px;
        }
        .tab-btn {
          padding: 10px 20px;
          border: none;
          background: none;
          font-weight: 600;
          color: #64748b;
          cursor: pointer;
          border-radius: 6px;
          transition: all 0.2s ease;
          display: flex;
          align-items: center;
          font-size: 14px;
        }
        .tab-btn:hover {
          background: #f1f5f9;
          color: #1e293b;
        }
        .tab-btn {
          color: #475569 !important;
          -webkit-text-fill-color: #475569 !important;
        }
        .tab-btn.active {
          background: #e2e8f0 !important;
          color: #0f172a !important;
          -webkit-text-fill-color: #0f172a !important;
          font-weight: 700;
        }
        .schedule-cell-content {
          position: relative;
          padding: 8px 6px;
          border-radius: 6px;
          min-height: 58px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          text-align: center;
          transition: all 0.2s ease;
          border: 1px solid rgba(0, 0, 0, 0.1);
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
          color: #0f172a !important;
          -webkit-text-fill-color: #0f172a !important;
        }
        .schedule-cell-content:hover {
          filter: brightness(0.96);
          box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.1);
        }
        .schedule-cell-content .subject-code {
          color: #0f172a !important;
          -webkit-text-fill-color: #0f172a !important;
          font-weight: 800 !important;
          font-size: 13px !important;
          line-height: 1.2;
        }
        .schedule-cell-content .class-name {
          color: #0369a1 !important;
          -webkit-text-fill-color: #0369a1 !important;
          font-weight: 700 !important;
          font-size: 11.5px !important;
          line-height: 1.2;
        }
        .schedule-cell-content .coteacher-badge,
        .schedule-cell-content .coteacher-badge * {
          color: #1d4ed8 !important;
          -webkit-text-fill-color: #1d4ed8 !important;
          background-color: #eff6ff !important;
          border: 1px solid #bfdbfe !important;
          font-weight: 600 !important;
          font-size: 10px !important;
        }
        .schedule-cell-content .room-name,
        .schedule-cell-content .room-name * {
          color: #475569 !important;
          -webkit-text-fill-color: #475569 !important;
          font-weight: 600 !important;
          font-size: 11px !important;
        }
        .schedule-cell-content .draft-badge,
        .schedule-cell-content .draft-badge * {
          background-color: #fef3c7 !important;
          color: #b45309 !important;
          -webkit-text-fill-color: #b45309 !important;
          border: 1px solid #fcd34d !important;
          font-weight: 700 !important;
          font-size: 9px !important;
        }
        .schedule-cell-empty {
          color: #475569 !important;
          -webkit-text-fill-color: #475569 !important;
          padding: 8px 6px;
          min-height: 58px;
          display: flex;
          justify-content: center;
          align-items: center;
          transition: all 0.2s ease;
          border: 1px dashed #cbd5e1;
          border-radius: 6px;
          background: #f8fafc;
          font-weight: 600;
        }
        .schedule-cell-empty span {
          color: #475569 !important;
          -webkit-text-fill-color: #475569 !important;
        }
        .schedule-cell-empty:hover {
          background: #f1f5f9;
          border-color: #94a3b8;
          color: #1e293b !important;
          -webkit-text-fill-color: #1e293b !important;
        }
        .holiday-slot-cell,
        .holiday-slot-cell * {
          color: #9f1239 !important;
          -webkit-text-fill-color: #9f1239 !important;
        }
        .holiday-slot-cell .holiday-badge-text {
          color: #e11d48 !important;
          -webkit-text-fill-color: #e11d48 !important;
        }
        .teacher-assigned-badge,
        .teacher-assigned-badge * {
          color: #334155 !important;
          -webkit-text-fill-color: #334155 !important;
        }
        .teacher-id-badge,
        .teacher-id-badge * {
          color: #0369a1 !important;
          -webkit-text-fill-color: #0369a1 !important;
        }
        .ml-5 {
          margin-left: 5px;
        }



/* ==========================================================================
   ROLE NAVIGATION BAR (Pill Tabs) - http://127.0.0.1:8000/employee-account
   ========================================================================== */
.emp-role-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.emp-role-tabs-bar::-webkit-scrollbar {
  height: 5px;
}

.emp-role-tabs-bar::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.emp-role-tabs-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.emp-role-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.emp-role-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.emp-role-tab.active {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 3px 8px rgba(30, 58, 138, 0.3);
}

.emp-role-tab.active * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.emp-role-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  transition: all 0.2s ease;
}

.emp-role-tab.active .emp-role-tab-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* Role Group Header inside By-Role View */
.emp-role-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
}

.emp-role-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}


/* ==========================================================================
   SCORE ASSIGN - CREATE NEW SCORE RULE & REPEATER COMPONENT STYLES
   ========================================================================== */
.comp-repeater-table {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.comp-repeater-inner {
  display: flex;
  flex-direction: column;
}

.comp-repeater-header {
  display: grid;
  grid-template-columns: minmax(130px, 1.8fr) minmax(130px, 1.8fr) minmax(75px, 1fr) minmax(75px, 1fr) 110px 42px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.comp-repeater-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.8fr) minmax(130px, 1.8fr) minmax(75px, 1fr) minmax(75px, 1fr) 110px 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.comp-repeater-row:hover {
  background-color: #fafbfc;
}

.comp-name-col {
  min-width: 0;
}

.comp-short-col {
  min-width: 0;
}

.comp-name-input,
.comp-short-input {
  width: 100%;
  height: 34px;
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.comp-name-input:focus,
.comp-short-input:focus,
.comp-pct-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.comp-name-input.kh-input,
.comp-short-input.kh-input {
  font-family: 'Khmer OS Battambang', 'Battambang', sans-serif;
}

.comp-pct-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comp-pct-input {
  width: 70px;
  height: 34px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: right;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.comp-pct-unit {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.comp-remove-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.comp-remove-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2 !important;
  color: #ef4444 !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
}

.comp-remove-btn i {
  color: #ef4444 !important;
  -webkit-text-fill-color: #ef4444 !important;
}

.comp-remove-btn:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

.comp-remove-btn:hover i {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
}

/* Final row — fixed automatic row */
.comp-repeater-row.comp-final-row {
  background: #faf5ff;
  border-bottom: 2px solid #e9d5ff;
  font-weight: 600;
}

.comp-final-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b21a8;
}

.comp-final-short {
  font-size: 12.5px;
  font-weight: 600;
  color: #7e22ce;
  padding: 4px 8px;
  background: #f3e8ff;
  border-radius: 4px;
  display: inline-block;
}

.comp-final-pct {
  font-size: 14px;
  font-weight: 800;
  color: #7e22ce;
  min-width: 60px;
  text-align: right;
  display: inline-block;
}

.comp-add-row {
  padding: 10px 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
}

.comp-add-row button {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
}

.comp-add-row button:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

/* ==========================================================================
   UNIVERSAL LIGHT MODE ENFORCEMENT
   Browser dark mode is disabled so all views render cleanly in light mode.
   ========================================================================== */
:root, html, body {
  color-scheme: only light !important;
}

/* ==========================================================================
   PROFESSIONAL LANGUAGE SWITCHER: FLAWLESS CONTRAST & DUAL-THEME SUPPORT
   ========================================================================== */
.topbar-lang-item,
.topbar-lang-select {
  display: inline-flex !important;
  align-items: center !important;
}

/* 1. Language Trigger Button (Topbar) */
.topbar-lang-select .searchable-select-trigger {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border: 1px solid #F7EDED !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35) !important;
  transition: all 0.2s ease !important;
}

.topbar-lang-select .searchable-select-trigger:hover,
.topbar-lang-select .searchable-select-trigger.open {
  border-color: #ffedd5 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35) !important;
  transform: translateY(-1px);
}

.topbar-lang-select .searchable-select-trigger *,
.topbar-lang-select .searchable-select-trigger span,
.topbar-lang-select .searchable-select-trigger div,
.topbar-lang-select .searchable-select-trigger i,
.topbar-lang-item label,
.topbar-lang-label,
.lang-switcher-label,
.lang-switch-label,
label[for*="language"],
label[for*="lang"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
}

/* 2. Topbar Language Dropdown Menu (Portal) */
.topbar-lang-select-dropdown,
.lang-dropdown-menu,
ul.lang-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #F7EDED !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
  padding: 6px !important;
  z-index: 2147483647 !important;
}

.topbar-lang-select-dropdown .searchable-select-search-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-radius: 6px !important;
}

.topbar-lang-select-dropdown .searchable-select-option,
.topbar-lang-select-dropdown .searchable-select-option div,
.topbar-lang-select-dropdown .searchable-select-option span,
.lang-dropdown-menu li,
.lang-dropdown-menu li a,
.lang-dropdown-menu li span {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
}

.topbar-lang-select-dropdown .searchable-select-option:hover,
.topbar-lang-select-dropdown .searchable-select-option:hover div,
.topbar-lang-select-dropdown .searchable-select-option:hover span,
.lang-dropdown-menu li:hover,
.lang-dropdown-menu li.dropdown-item:hover {
  background: #fff7ed !important;
  color: #ea580c !important;
  -webkit-text-fill-color: #ea580c !important;
}

.topbar-lang-select-dropdown .searchable-select-option.selected,
.topbar-lang-select-dropdown .searchable-select-option[aria-selected="true"] {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.topbar-lang-select-dropdown .searchable-select-option.selected div,
.topbar-lang-select-dropdown .searchable-select-option.selected span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 3. Modal & Login Language Switch Tabs */
.modal-lang-tabs,
.login-lang-switch {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 4px !important;
}

.modal-lang-tab-btn:not(.active),
.modal-lang-tab-btn:not(.active) span,
.modal-lang-tab-btn:not(.active) div,
.modal-lang-tabs > button:not(.active),
.modal-lang-tabs > button:not(.active) span,
.login-lang-switch button:not(.active),
.login-lang-switch button:not(.active) span {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  background: transparent !important;
  font-weight: 600 !important;
}

.modal-lang-tab-btn:not(.active):hover,
.modal-lang-tab-btn:not(.active):hover span,
.modal-lang-tabs > button:not(.active):hover,
.modal-lang-tabs > button:not(.active):hover span,
.login-lang-switch button:not(.active):hover,
.login-lang-switch button:not(.active):hover span {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background: #e2e8f0 !important;
}

.login-lang-switch button.active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border-color: #ea580c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35) !important;
}

.login-lang-switch button.active * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.modal-lang-tab-btn.active,
.modal-lang-tabs > button.active {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  border-bottom: 2.5px solid #2563eb !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.modal-lang-tab-btn.active *,
.modal-lang-tabs > button.active * {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

/* 4. Website Homepage Language Switcher (http://127.0.0.1:8000/) */
.web-desktop-lang-switch,
.web-mobile-lang-switch {
  background: rgba(7, 21, 43, 0.85) !important;
  border: 1.5px solid #f97316 !important;
  border-radius: 8px !important;
}

.web-lang-btn {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}

.web-lang-btn *,
.web-lang-btn span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
}

.web-lang-btn:hover:not(.active) {
  background: rgba(249, 115, 22, 0.2) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.web-lang-btn.active,
.web-lang-btn[data-active="true"] {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border: 1px solid #ffedd5 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.45) !important;
}

.flag-icon-img,
img[src*="/flag/"] {
  width: 18px !important;
  height: 12px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.4) !important;
}

/* 5. Promotion Buttons, Badges & Links: Gradient Orange */
.btn-promotion,
button.btn-promotion,
a.btn-promotion,
button[title*="Promotion" i],
button[title*="ឡើងថ្នាក់"],
.badge-promotion {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  background-color: #f97316 !important;
  border: 1px solid #ea580c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35) !important;
  transition: all 0.15s ease-in-out !important;
}

.btn-promotion:hover,
button.btn-promotion:hover,
a.btn-promotion:hover,
button[title*="Promotion" i]:hover,
button[title*="ឡើងថ្នាក់"]:hover,
.badge-promotion:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  background-color: #ea580c !important;
  border-color: #c2410c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.45) !important;
  transform: translateY(-1px);
}

.btn-promotion *,
button.btn-promotion *,
a.btn-promotion *,
button[title*="Promotion" i] *,
button[title*="ឡើងថ្នាក់"] *,
.badge-promotion * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   EXAM SUBJECTS INLINE SCROLL BAR & ACTION BUTTONS
   ========================================================================== */
.exam-sub-scroll-container {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.exam-sub-scroll-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.exam-sub-scroll-btn {
  transition: all 0.15s ease-in-out !important;
  user-select: none !important;
}
.exam-sub-scroll-btn:hover:not(:disabled) {
  background: #ffedd5 !important;
  border-color: #ea580c !important;
  color: #ea580c !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2) !important;
}
.exam-sub-scroll-btn:active:not(:disabled) {
  transform: scale(0.92);
}

/* ==========================================================================
   PRINT PROTECTION: Keep all printed documents crisp black on white paper
   ========================================================================== */
@media print {
  * {
    color-scheme: only light !important;
  }
  body, #root, .a4-score-sheet, .print-section, table, th, td {
    background-color: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
  }
}

/* ==========================================================================
   CANCEL BUTTONS & LABELS: ENFORCE PURE WHITE TEXT/ICON COLOR EVERYWHERE
   ========================================================================== */
.btn-cancel,
button.btn-cancel,
a.btn-cancel,
.btn-outline.btn-cancel,
.btn-cancel.btn-outline,
button.btn-outline.btn-cancel,
button.btn-cancel.btn-outline,
.btn.btn-outline.btn-cancel,
.btn.btn-cancel.btn-outline,
.btn-cancel *,
button.btn-cancel *,
a.btn-cancel *,
.btn-outline.btn-cancel *,
.btn-cancel.btn-outline *,
button.btn-outline.btn-cancel *,
button.btn-cancel.btn-outline *,
.btn.btn-outline.btn-cancel *,
.btn.btn-cancel.btn-outline *,
button[data-action="cancel"],
button[data-action="cancel"] *,
button[data-action="close"],
button[data-action="close"] *,
button[title*="Cancel" i],
button[title*="Cancel" i] *,
button[title*="បោះបង់"],
button[title*="បោះបង់"] *,
button[aria-label*="Cancel" i],
button[aria-label*="Cancel" i] *,
button[aria-label*="បោះបង់"],
button[aria-label*="បោះបង់"] *,
.modal-footer button.btn-outline,
.modal-footer button.btn-outline *,
.modal-footer-right button.btn-outline,
.modal-footer-right button.btn-outline *,
.modal-footer button.btn-secondary,
.modal-footer button.btn-secondary *,
.modal-footer-right button.btn-secondary,
.modal-footer-right button.btn-secondary *,
.modal-footer button:not(.btn-save):not(.btn-primary):not(.btn-success):not(.bg-green):not(.btn-danger):not(.btn-delete),
.modal-footer button:not(.btn-save):not(.btn-primary):not(.btn-success):not(.bg-green):not(.btn-danger):not(.btn-delete) *,
.modal-footer-right button:not(.btn-save):not(.btn-primary):not(.btn-success):not(.bg-green):not(.btn-danger):not(.btn-delete),
.modal-footer-right button:not(.btn-save):not(.btn-primary):not(.btn-success):not(.bg-green):not(.btn-danger):not(.btn-delete) *,
.btn-close-modal,
button.btn-close-modal,
.btn-close-modal *,
button.btn-close-modal * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-cancel:hover,
button.btn-cancel:hover,
a.btn-cancel:hover,
.btn-cancel:hover *,
button.btn-cancel:hover *,
a.btn-cancel:hover *,
button[data-action="cancel"]:hover,
button[data-action="cancel"]:hover *,
.modal-footer button.btn-outline:hover,
.modal-footer button.btn-outline:hover *,
.modal-footer-right button.btn-outline:hover,
.modal-footer-right button.btn-outline:hover *,
.btn-close-modal:hover,
.btn-close-modal:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   ADD OR EDIT MODAL TABS & ALL TAB HEADERS:
   Bottom bar for active tab with blue color for label active tab
   (Pattern matching Add or Edit Teacher Profile: http://127.0.0.1:8000/teacher-profile)
   ========================================================================== */

/* 1. Modal Tab Bars & Navigation Headers */
.modal-content .tabs,
.modal-container .tabs,
.modal-body .tabs,
.modal .tabs,
.modal-tabs {
  display: flex !important;
  border-bottom: 2px solid #e2e8f0 !important;
  gap: 6px !important;
  background: transparent !important;
  padding-bottom: 2px !important;
  overflow-x: auto !important;
}

/* 2. Inactive Tabs in Modals & Tab Containers */
.modal-content .tabs > .tab-item,
.modal-container .tabs > .tab-item,
.modal-body .tabs > .tab-item,
.modal .tabs > .tab-item,
.modal-content .tabs > button,
.modal-container .tabs > button,
.modal-body .tabs > button,
.modal .tabs > button,
.modal-tabs .tab-item,
.modal-tabs button,
.tabs > .tab-item,
.tabs > button {
  padding: 9px 16px !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  background: transparent !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 6px 6px 0 0 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transition: all 0.15s ease-in-out !important;
  text-decoration: none !important;
}

.modal-content .tabs > .tab-item:not(.active):hover,
.modal-container .tabs > .tab-item:not(.active):hover,
.modal-body .tabs > .tab-item:not(.active):hover,
.modal .tabs > .tab-item:not(.active):hover,
.modal-content .tabs > button:not(.active):hover,
.modal-container .tabs > button:not(.active):hover,
.modal-body .tabs > button:not(.active):hover,
.modal .tabs > button:not(.active):hover,
.modal-tabs .tab-item:not(.active):hover,
.modal-tabs button:not(.active):hover,
.tabs > .tab-item:not(.active):hover,
.tabs > button:not(.active):hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
}

.modal-content .tabs > .tab-item:not(.active) *,
.modal-container .tabs > .tab-item:not(.active) *,
.modal-body .tabs > .tab-item:not(.active) *,
.modal .tabs > .tab-item:not(.active) *,
.modal-content .tabs > button:not(.active) *,
.modal-container .tabs > button:not(.active) *,
.modal-body .tabs > button:not(.active) *,
.modal .tabs > button:not(.active) *,
.modal-tabs .tab-item:not(.active) *,
.modal-tabs button:not(.active) *,
.tabs > .tab-item:not(.active) *,
.tabs > button:not(.active) * {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* 3. Active Tabs: Bottom Bar & Blue Label */
.modal-content .tabs > .tab-item.active,
.modal-container .tabs > .tab-item.active,
.modal-body .tabs > .tab-item.active,
.modal .tabs > .tab-item.active,
.modal-content .tabs > button.active,
.modal-container .tabs > button.active,
.modal-body .tabs > button.active,
.modal .tabs > button.active,
.modal-tabs .tab-item.active,
.modal-tabs button.active,
.tabs > .tab-item.active,
.tabs > button.active,
.tab-item.active,
div.tabs > div.tab-item.active {
  border: none !important;
  border-bottom: 3px solid #2563eb !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  font-weight: 700 !important;
  border-radius: 6px 6px 0 0 !important;
  box-shadow: none !important;
}

.modal-content .tabs > .tab-item.active *,
.modal-container .tabs > .tab-item.active *,
.modal-body .tabs > .tab-item.active *,
.modal .tabs > .tab-item.active *,
.modal-content .tabs > button.active *,
.modal-container .tabs > button.active *,
.modal-body .tabs > button.active *,
.modal .tabs > button.active *,
.modal-tabs .tab-item.active *,
.modal-tabs button.active *,
.tabs > .tab-item.active *,
.tabs > button.active *,
.tab-item.active *,
div.tabs > div.tab-item.active * {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

.modal-content .tabs > .tab-item.active i,
.modal-container .tabs > .tab-item.active i,
.modal-body .tabs > .tab-item.active i,
.modal .tabs > .tab-item.active i,
.modal-content .tabs > button.active i,
.modal-container .tabs > button.active i,
.modal-body .tabs > button.active i,
.modal .tabs > button.active i,
.modal-tabs .tab-item.active i,
.modal-tabs button.active i,
.tabs > .tab-item.active i,
.tabs > button.active i,
.tab-item.active i,
div.tabs > div.tab-item.active i {
  color: #2563eb !important;
}

/* 4. Active Language Tabs in Modal Footer / Dialogs */
.modal-lang-tabs {
  border-bottom: 2px solid #e2e8f0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 4px 2px 4px !important;
  gap: 6px !important;
}

.modal-lang-tab-btn {
  border: none !important;
  border-bottom: 2.5px solid transparent !important;
  border-radius: 6px 6px 0 0 !important;
  background: transparent !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
}

.modal-lang-tab-btn:not(.active):hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
}

.modal-lang-tab-btn.active,
.modal-lang-tabs > button.active {
  background: #eff6ff !important;
  border: none !important;
  border-bottom: 2.5px solid #2563eb !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.modal-lang-tab-btn.active *,
.modal-lang-tabs > button.active * {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

/* ==========================================================================
   UNIVERSAL CANCEL BUTTON CONTRAST ENFORCEMENT
   All modal and form Cancel/Dismiss buttons MUST render with amber background
   and crisp white text.
   ========================================================================== */
.modal-footer button.btn-outline,
.modal-footer .btn-outline,
.modal-footer button.btn-secondary,
.modal-footer .btn-secondary,
.modal-footer button.btn-cancel,
.modal-footer .btn-cancel,
.modal-footer button[data-action="cancel"],
.modal-footer button[data-action="close"],
.modal-footer-right button.btn-outline,
.modal-footer-right .btn-outline,
.modal-footer-right button.btn-secondary,
.modal-footer-right .btn-secondary,
.modal-footer-right button.btn-cancel,
.modal-footer-right .btn-cancel,
.modal-footer-right button[data-action="cancel"],
.modal-footer-right button[data-action="close"],
.btn-cancel,
button.btn-cancel,
a.btn-cancel,
button[data-action="cancel"],
button[data-action="close"],
button[title*="Cancel" i],
button[title*="បោះបង់"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  background-color: #f59e0b !important;
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.modal-footer button.btn-outline *,
.modal-footer .btn-outline *,
.modal-footer button.btn-secondary *,
.modal-footer .btn-secondary *,
.modal-footer button.btn-cancel *,
.modal-footer .btn-cancel *,
.modal-footer button[data-action="cancel"] *,
.modal-footer button[data-action="close"] *,
.modal-footer-right button.btn-outline *,
.modal-footer-right .btn-outline *,
.modal-footer-right button.btn-secondary *,
.modal-footer-right .btn-secondary *,
.modal-footer-right button.btn-cancel *,
.modal-footer-right .btn-cancel *,
.modal-footer-right button[data-action="cancel"] *,
.modal-footer-right button[data-action="close"] *,
.btn-cancel *,
button.btn-cancel *,
a.btn-cancel *,
button[data-action="cancel"] *,
button[data-action="close"] *,
button[title*="Cancel" i] *,
button[title*="បោះបង់"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: transparent !important;
}

.modal-footer button.btn-outline:hover,
.modal-footer .btn-outline:hover,
.modal-footer button.btn-secondary:hover,
.modal-footer .btn-secondary:hover,
.modal-footer button.btn-cancel:hover,
.modal-footer .btn-cancel:hover,
.modal-footer button[data-action="cancel"]:hover,
.modal-footer button[data-action="close"]:hover,
.modal-footer-right button.btn-outline:hover,
.modal-footer-right .btn-outline:hover,
.modal-footer-right button.btn-secondary:hover,
.modal-footer-right .btn-secondary:hover,
.modal-footer-right button.btn-cancel:hover,
.modal-footer-right .btn-cancel:hover,
.modal-footer-right button[data-action="cancel"]:hover,
.modal-footer-right button[data-action="close"]:hover,
.btn-cancel:hover,
button.btn-cancel:hover,
a.btn-cancel:hover,
button[data-action="cancel"]:hover,
button[data-action="close"]:hover,
button[title*="Cancel" i]:hover,
button[title*="បោះបង់"]:hover {
  background-color: #d97706 !important;
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.35) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   STUDENT INFORMATION SPREADSHEET (recreated from public/demo/student-info.html)
   ========================================================================== */

/* Spreadsheet Layout & Container */
.student-info-spreadsheet-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.student-info-topbar {
  background: linear-gradient(90deg, #d9f2eb 0%, #eaf7f3 50%, #f4faf8 100%);
  border-bottom: 1px solid #c8e8df;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.student-info-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-info-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #005844;
  color: #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.student-info-title {
  font-size: 14px;
  font-weight: 700;
  color: #064e3b;
  margin: 0;
}

.student-info-counter-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.student-info-counter-badge.total {
  background: #dcf0fb;
  color: #0284c7;
  border: 1px solid #bae6fd;
}
.student-info-counter-badge.female {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
}
.student-info-counter-badge.male {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Toolbar */
.student-info-toolbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.student-info-toolbar-left,
.student-info-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.student-toolbar-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.student-toolbar-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.student-toolbar-btn.active {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.student-toolbar-btn-primary {
  background: #059669;
  border-color: #047857;
  color: #ffffff !important;
}
.student-toolbar-btn-primary:hover:not(:disabled) {
  background: #047857;
  color: #ffffff !important;
}

.student-toolbar-btn-teal {
  background: #0f766e;
  border-color: #115e59;
  color: #ffffff !important;
}
.student-toolbar-btn-teal:hover:not(:disabled) {
  background: #115e59;
  color: #ffffff !important;
}

/* Search input */
.student-toolbar-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.student-toolbar-search input {
  height: 30px;
  width: 200px;
  padding-left: 28px;
  padding-right: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 11px;
  outline: none;
  transition: all 0.15s;
}
.student-toolbar-search input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
  width: 240px;
}
.student-toolbar-search i {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 11px;
  pointer-events: none;
}

/* Table scrollport */
.student-info-viewport {
  flex: 1;
  overflow: auto;
  min-height: 480px;
  max-height: calc(100vh - 210px);
  position: relative;
  background: #ffffff;
}

/* Custom scrollbars */
.student-info-viewport::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.student-info-viewport::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.student-info-viewport::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.student-info-viewport::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Spreadsheet table */
.student-info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  white-space: nowrap;
}

/* Sticky column configuration for freeze panes */
.freeze-col-1 { position: sticky; left: 0px; z-index: 20; width: 38px; min-width: 38px; max-width: 38px; box-sizing: border-box; }
.freeze-col-2 { position: sticky; left: 38px; z-index: 20; width: 36px; min-width: 36px; max-width: 36px; box-sizing: border-box; }
.freeze-col-3 { position: sticky; left: 74px; z-index: 20; width: 85px; min-width: 85px; max-width: 85px; box-sizing: border-box; }
.freeze-col-4 { position: sticky; left: 159px; z-index: 20; width: 110px; min-width: 110px; max-width: 110px; box-sizing: border-box; }
.freeze-col-5 { position: sticky; left: 269px; z-index: 20; width: 110px; min-width: 110px; max-width: 110px; box-sizing: border-box; }
.freeze-col-6 { position: sticky; left: 379px; z-index: 20; width: 70px; min-width: 70px; max-width: 70px; box-sizing: border-box; box-shadow: 3px 0 5px -1px rgba(0, 0, 0, 0.16); }

/* Unfrozen state */
.freeze-unlocked .freeze-col-1,
.freeze-unlocked .freeze-col-2,
.freeze-unlocked .freeze-col-3,
.freeze-unlocked .freeze-col-4,
.freeze-unlocked .freeze-col-5,
.freeze-unlocked .freeze-col-6,
.freeze-unlocked .sticky-corner-1,
.freeze-unlocked .sticky-corner-2,
.freeze-unlocked .sticky-corner-3,
.freeze-unlocked .sticky-corner-4,
.freeze-unlocked .sticky-corner-5,
.freeze-unlocked .sticky-corner-6,
.freeze-unlocked .sticky-corner-b1,
.freeze-unlocked .sticky-corner-b2,
.freeze-unlocked .sticky-corner-b3,
.freeze-unlocked .sticky-corner-b4,
.freeze-unlocked .sticky-corner-b5,
.freeze-unlocked .sticky-corner-b6,
.freeze-unlocked .sticky-corner-c1,
.freeze-unlocked .sticky-corner-c2,
.freeze-unlocked .sticky-corner-c3,
.freeze-unlocked .sticky-corner-c4,
.freeze-unlocked .sticky-corner-c5,
.freeze-unlocked .sticky-corner-c6 {
  position: static !important;
  box-shadow: none !important;
}

/* Sticky Headers */
.sticky-header-row1 th { position: sticky; top: 0; z-index: 30; }
.sticky-header-row2 th { position: sticky; top: 30px; z-index: 30; }
.sticky-header-row3 th { position: sticky; top: 62px; z-index: 30; }

/* Sticky Corners - Top Left frozen intersection */
.sticky-corner-1 { position: sticky; left: 0px; top: 0; z-index: 45 !important; box-shadow: 3px 0 5px -1px rgba(0, 0, 0, 0.16); }
.sticky-corner-2 { position: sticky; left: 38px; top: 0; z-index: 45 !important; }
.sticky-corner-3 { position: sticky; left: 74px; top: 0; z-index: 45 !important; }
.sticky-corner-4 { position: sticky; left: 159px; top: 0; z-index: 45 !important; }
.sticky-corner-5 { position: sticky; left: 269px; top: 0; z-index: 45 !important; }
.sticky-corner-6 { position: sticky; left: 379px; top: 0; z-index: 45 !important; box-shadow: 3px 0 5px -1px rgba(0, 0, 0, 0.16); }

.sticky-corner-b1 { position: sticky; left: 0px; top: 30px; z-index: 45 !important; width: 38px; min-width: 38px; max-width: 38px; box-sizing: border-box; }
.sticky-corner-b2 { position: sticky; left: 38px; top: 30px; z-index: 45 !important; width: 36px; min-width: 36px; max-width: 36px; box-sizing: border-box; }
.sticky-corner-b3 { position: sticky; left: 74px; top: 30px; z-index: 45 !important; width: 85px; min-width: 85px; max-width: 85px; box-sizing: border-box; }
.sticky-corner-b4 { position: sticky; left: 159px; top: 30px; z-index: 45 !important; width: 110px; min-width: 110px; max-width: 110px; box-sizing: border-box; }
.sticky-corner-b5 { position: sticky; left: 269px; top: 30px; z-index: 45 !important; width: 110px; min-width: 110px; max-width: 110px; box-sizing: border-box; }
.sticky-corner-b6 { position: sticky; left: 379px; top: 30px; z-index: 45 !important; width: 70px; min-width: 70px; max-width: 70px; box-sizing: border-box; box-shadow: 3px 0 5px -1px rgba(0, 0, 0, 0.16); }

.sticky-corner-c1 { position: sticky; left: 0px; top: 62px; z-index: 45 !important; width: 38px; min-width: 38px; max-width: 38px; box-sizing: border-box; }
.sticky-corner-c2 { position: sticky; left: 38px; top: 62px; z-index: 45 !important; width: 36px; min-width: 36px; max-width: 36px; box-sizing: border-box; }
.sticky-corner-c3 { position: sticky; left: 74px; top: 62px; z-index: 45 !important; width: 85px; min-width: 85px; max-width: 85px; box-sizing: border-box; }
.sticky-corner-c4 { position: sticky; left: 159px; top: 62px; z-index: 45 !important; width: 110px; min-width: 110px; max-width: 110px; box-sizing: border-box; }
.sticky-corner-c5 { position: sticky; left: 269px; top: 62px; z-index: 45 !important; width: 110px; min-width: 110px; max-width: 110px; box-sizing: border-box; }
.sticky-corner-c6 { position: sticky; left: 379px; top: 62px; z-index: 45 !important; width: 70px; min-width: 70px; max-width: 70px; box-sizing: border-box; box-shadow: 3px 0 5px -1px rgba(0, 0, 0, 0.16); }

/* Table cells */
.student-info-table th {
  padding: 5px 8px;
  font-weight: 600;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  text-align: center;
  user-select: none;
}
.student-info-table td {
  padding: 2px 4px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background-color: #ffffff;
}

.student-info-table tbody tr:hover td {
  background-color: #f8fafc;
}
.student-info-table tbody tr.row-selected td {
  background-color: #ecfdf5 !important;
}

/* ==========================================================================
   STUDENT INFORMATION SPREADSHEET CATEGORY BLOCKS
   Full styling for each block with distinct bg, subheader bg, cell bg & borders
   (Styled like student input score / subject blocks)
   ========================================================================== */

/* 1. BASIC INFORMATION (Slate / Steel) */
.cat-basic {
  background: #e2e8f0 !important;
  color: #1e293b !important;
  border-bottom: 2px solid #94a3b8 !important;
  border-right: 2px solid #94a3b8 !important;
}
.cat-sub-basic {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-bottom: 2px solid #94a3b8 !important;
  border-right: 1px solid #cbd5e1 !important;
}
.cat-cell-basic {
  background-color: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}
.cat-cell-basic .cell-input:focus,
.cat-cell-basic .cell-select:focus {
  border-color: #475569 !important;
  box-shadow: 0 0 0 1.5px rgba(71, 85, 105, 0.25) !important;
}

/* 2. PERSONAL INFORMATION (Sky Blue) */
.cat-personal {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-bottom: 2px solid #38bdf8 !important;
  border-right: 2px solid #38bdf8 !important;
}
.cat-sub-personal {
  background: #f0f9ff !important;
  color: #0284c7 !important;
  border-bottom: 2px solid #38bdf8 !important;
  border-right: 1px solid #bae6fd !important;
}
.cat-cell-personal {
  background-color: #f8fcff !important;
  border-right: 1px solid #e0f2fe !important;
}
.cat-cell-personal .cell-input:focus,
.cat-cell-personal .cell-select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 1.5px rgba(2, 132, 199, 0.25) !important;
}

/* 3. PLACE OF BIRTH (Teal / Mint) */
.cat-birthplace {
  background: #ccfbf1 !important;
  color: #0f766e !important;
  border-bottom: 2px solid #2dd4bf !important;
  border-right: 2px solid #2dd4bf !important;
}
.cat-sub-birthplace {
  background: #f0fdfa !important;
  color: #0d9488 !important;
  border-bottom: 2px solid #2dd4bf !important;
  border-right: 1px solid #99f6e4 !important;
}
.cat-cell-birthplace {
  background-color: #f5fdfb !important;
  border-right: 1px solid #ccfbf1 !important;
}
.cat-cell-birthplace .cell-input:focus,
.cat-cell-birthplace .cell-select:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 1.5px rgba(13, 148, 136, 0.25) !important;
}

/* 4. CURRENT RESIDENCE (Emerald Green) */
.cat-residence {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-bottom: 2px solid #4ade80 !important;
  border-right: 2px solid #4ade80 !important;
}
.cat-sub-residence {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border-bottom: 2px solid #4ade80 !important;
  border-right: 1px solid #bbf7d0 !important;
}
.cat-cell-residence {
  background-color: #f6fef8 !important;
  border-right: 1px solid #dcfce7 !important;
}
.cat-cell-residence .cell-input:focus,
.cat-cell-residence .cell-select:focus {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 1.5px rgba(22, 163, 74, 0.25) !important;
}

/* 5. ACADEMIC ENROLLMENT (Purple / Violet) */
.cat-academic {
  background: #f3e8ff !important;
  color: #6b21a8 !important;
  border-bottom: 2px solid #c084fc !important;
  border-right: 2px solid #c084fc !important;
}
.cat-sub-academic {
  background: #faf5ff !important;
  color: #7e22ce !important;
  border-bottom: 2px solid #c084fc !important;
  border-right: 1px solid #e9d5ff !important;
}
.cat-cell-academic {
  background-color: #fcf8ff !important;
  border-right: 1px solid #f3e8ff !important;
}
.cat-cell-academic .cell-input:focus,
.cat-cell-academic .cell-select:focus {
  border-color: #7e22ce !important;
  box-shadow: 0 0 0 1.5px rgba(126, 34, 206, 0.25) !important;
}

/* 6. VULNERABILITY & BACKGROUND (Amber / Gold) */
.cat-vulnerability {
  background: #fef9c3 !important;
  color: #854d0e !important;
  border-bottom: 2px solid #facc15 !important;
  border-right: 2px solid #facc15 !important;
}
.cat-sub-vulnerability {
  background: #fffbeb !important;
  color: #a16207 !important;
  border-bottom: 2px solid #facc15 !important;
  border-right: 1px solid #fde68a !important;
}
.cat-cell-vulnerability {
  background-color: #fffdf5 !important;
  border-right: 1px solid #fef9c3 !important;
}
.cat-cell-vulnerability .cell-input:focus,
.cat-cell-vulnerability .cell-select:focus {
  border-color: #a16207 !important;
  box-shadow: 0 0 0 1.5px rgba(161, 98, 7, 0.25) !important;
}

/* 7. VACCINE (Mint Green) */
.cat-vaccine {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-bottom: 2px solid #34d399 !important;
  border-right: 2px solid #34d399 !important;
}
.cat-sub-vaccine {
  background: #f0fdf4 !important;
  color: #059669 !important;
  border-bottom: 2px solid #34d399 !important;
  border-right: 2px solid #34d399 !important;
}
.cat-cell-vaccine {
  background-color: #f6fefb !important;
  border-right: 2px solid #34d399 !important;
}
.cat-cell-vaccine .cell-input:focus,
.cat-cell-vaccine .cell-select:focus {
  border-color: #059669 !important;
  box-shadow: 0 0 0 1.5px rgba(5, 150, 105, 0.25) !important;
}

/* 8. HEALTH EXAM 1 (Indigo Blue) */
.cat-health1 {
  background: #e0e7ff !important;
  color: #3730a3 !important;
  border-bottom: 2px solid #818cf8 !important;
  border-right: 2px solid #818cf8 !important;
}
.cat-sub-health1 {
  background: #eef2ff !important;
  color: #4338ca !important;
  border-bottom: 2px solid #818cf8 !important;
  border-right: 1px solid #c7d2fe !important;
}
.cat-cell-health1 {
  background-color: #f7f8ff !important;
  border-right: 1px solid #e0e7ff !important;
}
.cat-cell-health1 .cell-input:focus,
.cat-cell-health1 .cell-select:focus {
  border-color: #4338ca !important;
  box-shadow: 0 0 0 1.5px rgba(67, 56, 202, 0.25) !important;
}

/* 9. HEALTH EXAM 2 (Cyan / Sky) */
.cat-health2 {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-bottom: 2px solid #60a5fa !important;
  border-right: 2px solid #60a5fa !important;
}
.cat-sub-health2 {
  background: #eff6ff !important;
  color: #2563eb !important;
  border-bottom: 2px solid #60a5fa !important;
  border-right: 1px solid #bfdbfe !important;
}
.cat-cell-health2 {
  background-color: #f7faff !important;
  border-right: 1px solid #dbeafe !important;
}
.cat-cell-health2 .cell-input:focus,
.cat-cell-health2 .cell-select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.25) !important;
}

/* 10. SENSORY & VISION (Pink / Rose) */
.cat-sensory {
  background: #fce7f3 !important;
  color: #9d174d !important;
  border-bottom: 2px solid #f472b6 !important;
  border-right: 2px solid #f472b6 !important;
}
.cat-sub-sensory {
  background: #fdf2f8 !important;
  color: #be185d !important;
  border-bottom: 2px solid #f472b6 !important;
  border-right: 1px solid #fbcfe8 !important;
}
.cat-cell-sensory {
  background-color: #fff8fb !important;
  border-right: 1px solid #fce7f3 !important;
}
.cat-cell-sensory .cell-input:focus,
.cat-cell-sensory .cell-select:focus {
  border-color: #be185d !important;
  box-shadow: 0 0 0 1.5px rgba(190, 24, 93, 0.25) !important;
}

/* 11. FATHER INFORMATION (Light Soft Blue / Azure Theme) */
.cat-father {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-bottom: 2px solid #93c5fd !important;
  border-right: 2px solid #93c5fd !important;
  text-shadow: none !important;
}
.cat-sub-father {
  background: #eff6ff !important;
  color: #1e40af !important;
  border-bottom: 2px solid #93c5fd !important;
  border-right: 1px solid #bfdbfe !important;
}
.cat-cell-father {
  background-color: #f8faff !important;
  border-right: 1px solid #dbeafe !important;
}
/* Father: Name */
.cat-sub-father-name {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-bottom: 2px solid #93c5fd !important;
  border-right: 1px solid #bfdbfe !important;
}
.cat-cell-father-name {
  background-color: #f8faff !important;
  border-right: 1px solid #e2e8f0 !important;
}
.cat-cell-father-name .cell-input:focus,
.cat-cell-father-name .cell-select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.25) !important;
}
/* Father: Contact / Phone */
.cat-sub-father-phone {
  background: #cffafe !important;
  color: #0e7490 !important;
  border-bottom: 2px solid #67e8f9 !important;
  border-right: 1px solid #a5f3fc !important;
}
.cat-cell-father-phone {
  background-color: #f0fdfa !important;
  border-right: 1px solid #cffafe !important;
}
.cat-cell-father-phone .cell-input:focus,
.cat-cell-father-phone .cell-select:focus {
  border-color: #0891b2 !important;
  box-shadow: 0 0 0 1.5px rgba(8, 145, 178, 0.25) !important;
}
/* Father: Job / Occupation */
.cat-sub-father-job {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-bottom: 2px solid #fcd34d !important;
  border-right: 1px solid #fde68a !important;
}
.cat-cell-father-job {
  background-color: #fffdf5 !important;
  border-right: 1px solid #fef3c7 !important;
}
.cat-cell-father-job .cell-input:focus,
.cat-cell-father-job .cell-select:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 1.5px rgba(217, 119, 6, 0.25) !important;
}
/* Father: Residence / Address */
.cat-sub-father-address {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-bottom: 2px solid #86efac !important;
  border-right: 1px solid #bbf7d0 !important;
}
.cat-cell-father-address {
  background-color: #f6fef8 !important;
  border-right: 1px solid #dcfce7 !important;
}
.cat-cell-father-address .cell-input:focus,
.cat-cell-father-address .cell-select:focus {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 1.5px rgba(22, 163, 74, 0.25) !important;
}

/* 12. MOTHER INFORMATION (Light Soft Rose / Blossom Theme) */
.cat-mother {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border-bottom: 2px solid #f43f5e !important;
  border-right: 2px solid #f43f5e !important;
  text-shadow: none !important;
}
.cat-sub-mother {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border-bottom: 2px solid #fb7185 !important;
  border-right: 1px solid #fecdd3 !important;
}
.cat-cell-mother {
  background-color: #fff8f9 !important;
  border-right: 1px solid #ffe4e6 !important;
}
/* Mother: Name */
.cat-sub-mother-name {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border-bottom: 2px solid #fda4af !important;
  border-right: 1px solid #fecdd3 !important;
}
.cat-cell-mother-name {
  background-color: #fff8f9 !important;
  border-right: 1px solid #ffe4e6 !important;
}
.cat-cell-mother-name .cell-input:focus,
.cat-cell-mother-name .cell-select:focus {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 1.5px rgba(225, 29, 72, 0.25) !important;
}
/* Mother: Contact / Phone */
.cat-sub-mother-phone {
  background: #fae8ff !important;
  color: #86198f !important;
  border-bottom: 2px solid #f0abfc !important;
  border-right: 1px solid #f5d0fe !important;
}
.cat-cell-mother-phone {
  background-color: #fdf8fe !important;
  border-right: 1px solid #fae8ff !important;
}
.cat-cell-mother-phone .cell-input:focus,
.cat-cell-mother-phone .cell-select:focus {
  border-color: #a21caf !important;
  box-shadow: 0 0 0 1.5px rgba(162, 28, 175, 0.25) !important;
}
/* Mother: Job / Occupation */
.cat-sub-mother-job {
  background: #ffedd5 !important;
  color: #c2410c !important;
  border-bottom: 2px solid #fdba74 !important;
  border-right: 1px solid #fed7aa !important;
}
.cat-cell-mother-job {
  background-color: #fffaf5 !important;
  border-right: 1px solid #ffedd5 !important;
}
.cat-cell-mother-job .cell-input:focus,
.cat-cell-mother-job .cell-select:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 1.5px rgba(234, 88, 12, 0.25) !important;
}
/* Mother: Residence / Address */
.cat-sub-mother-address {
  background: #ccfbf1 !important;
  color: #0f766e !important;
  border-bottom: 2px solid #5eead4 !important;
  border-right: 1px solid #99f6e4 !important;
}
.cat-cell-mother-address {
  background-color: #f0fdfa !important;
  border-right: 1px solid #ccfbf1 !important;
}
.cat-cell-mother-address .cell-input:focus,
.cat-cell-mother-address .cell-select:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 1.5px rgba(13, 148, 136, 0.25) !important;
}

/* 13. GUARDIAN DETAILS (Orchid / Purple Theme) */
.cat-guardian {
  background: #6b21a8 !important;
  color: #ffffff !important;
  border-bottom: 2px solid #581c87 !important;
  border-right: 2px solid #581c87 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.cat-sub-guardian {
  background: #fdf4ff !important;
  color: #a21caf !important;
  border-bottom: 2px solid #e879f9 !important;
  border-right: 1px solid #f5d0fe !important;
}
.cat-cell-guardian {
  background-color: #fdf8fe !important;
  border-right: 1px solid #fae8ff !important;
}
/* Guardian: Relation */
.cat-sub-guardian-rel {
  background: #ede9fe !important;
  color: #5b21b6 !important;
  border-bottom: 2px solid #c4b5fd !important;
  border-right: 1px solid #ddd6fe !important;
}
.cat-cell-guardian-rel {
  background-color: #faf8ff !important;
  border-right: 1px solid #ede9fe !important;
}
.cat-cell-guardian-rel .cell-input:focus,
.cat-cell-guardian-rel .cell-select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 1.5px rgba(124, 58, 237, 0.25) !important;
}
/* Guardian: Name */
.cat-sub-guardian-name {
  background: #f3e8ff !important;
  color: #6b21a8 !important;
  border-bottom: 2px solid #d8b4fe !important;
  border-right: 1px solid #e9d5ff !important;
}
.cat-cell-guardian-name {
  background-color: #fcf8ff !important;
  border-right: 1px solid #f3e8ff !important;
}
.cat-cell-guardian-name .cell-input:focus,
.cat-cell-guardian-name .cell-select:focus {
  border-color: #9333ea !important;
  box-shadow: 0 0 0 1.5px rgba(147, 51, 234, 0.25) !important;
}
/* Guardian: Contact / Phone */
.cat-sub-guardian-phone {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-bottom: 2px solid #7dd3fc !important;
  border-right: 1px solid #bae6fd !important;
}
.cat-cell-guardian-phone {
  background-color: #f8fcff !important;
  border-right: 1px solid #e0f2fe !important;
}
.cat-cell-guardian-phone .cell-input:focus,
.cat-cell-guardian-phone .cell-select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 1.5px rgba(2, 132, 199, 0.25) !important;
}
/* Guardian: Job / Occupation */
.cat-sub-guardian-job {
  background: #fef9c3 !important;
  color: #854d0e !important;
  border-bottom: 2px solid #fde047 !important;
  border-right: 1px solid #fef08a !important;
}
.cat-cell-guardian-job {
  background-color: #fffdf0 !important;
  border-right: 1px solid #fef9c3 !important;
}
.cat-cell-guardian-job .cell-input:focus,
.cat-cell-guardian-job .cell-select:focus {
  border-color: #ca8a04 !important;
  box-shadow: 0 0 0 1.5px rgba(202, 138, 4, 0.25) !important;
}
/* Guardian: Full Address */
.cat-sub-guardian-address {
  background: #e2e8f0 !important;
  color: #334155 !important;
  border-bottom: 2px solid #cbd5e1 !important;
  border-right: 1px solid #cbd5e1 !important;
}
.cat-cell-guardian-address {
  background-color: #f8fafc !important;
  border-right: 1px solid #e2e8f0 !important;
}
.cat-cell-guardian-address .cell-input:focus,
.cat-cell-guardian-address .cell-select:focus {
  border-color: #475569 !important;
  box-shadow: 0 0 0 1.5px rgba(71, 85, 105, 0.25) !important;
}

/* 14. ACTIONS */
.cat-actions {
  background: #e2e8f0 !important;
  color: #334155 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}
.cat-sub-actions {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}
.cat-cell-actions {
  background-color: #f8fafc !important;
}

/* Bold vertical block dividing borders between category groups */
.student-info-table th.cat-border-right,
.student-info-table td.cat-border-right {
  border-right-width: 2px !important;
}
.student-info-table th.cat-sub-basic.cat-border-right,
.student-info-table td.cat-cell-basic.cat-border-right {
  border-right: 2px solid #94a3b8 !important;
}
.student-info-table th.cat-sub-personal.cat-border-right,
.student-info-table td.cat-cell-personal.cat-border-right {
  border-right: 2px solid #38bdf8 !important;
}
.student-info-table th.cat-sub-birthplace.cat-border-right,
.student-info-table td.cat-cell-birthplace.cat-border-right {
  border-right: 2px solid #2dd4bf !important;
}
.student-info-table th.cat-sub-residence.cat-border-right,
.student-info-table td.cat-cell-residence.cat-border-right {
  border-right: 2px solid #4ade80 !important;
}
.student-info-table th.cat-sub-academic.cat-border-right,
.student-info-table td.cat-cell-academic.cat-border-right {
  border-right: 2px solid #c084fc !important;
}
.student-info-table th.cat-sub-vulnerability.cat-border-right,
.student-info-table td.cat-cell-vulnerability.cat-border-right {
  border-right: 2px solid #facc15 !important;
}
.student-info-table th.cat-sub-health1.cat-border-right,
.student-info-table td.cat-cell-health1.cat-border-right {
  border-right: 2px solid #818cf8 !important;
}
.student-info-table th.cat-sub-health2.cat-border-right,
.student-info-table td.cat-cell-health2.cat-border-right {
  border-right: 2px solid #60a5fa !important;
}
.student-info-table th.cat-sub-sensory.cat-border-right,
.student-info-table td.cat-cell-sensory.cat-border-right {
  border-right: 2px solid #f472b6 !important;
}
.student-info-table th.cat-sub-father.cat-border-right,
.student-info-table td.cat-cell-father.cat-border-right,
.student-info-table th.cat-sub-father-address.cat-border-right,
.student-info-table td.cat-cell-father-address.cat-border-right {
  border-right: 2px solid #1e40af !important;
}
.student-info-table th.cat-sub-mother.cat-border-right,
.student-info-table td.cat-cell-mother.cat-border-right,
.student-info-table th.cat-sub-mother-address.cat-border-right,
.student-info-table td.cat-cell-mother-address.cat-border-right {
  border-right: 2px solid #9f1239 !important;
}
.student-info-table th.cat-sub-guardian.cat-border-right,
.student-info-table td.cat-cell-guardian.cat-border-right,
.student-info-table th.cat-sub-guardian-address.cat-border-right,
.student-info-table td.cat-cell-guardian-address.cat-border-right {
  border-right: 2px solid #6b21a8 !important;
}

/* Category column hover highlighting */
.student-info-table tbody tr:hover td.cat-cell-basic { background-color: #f8fafc !important; }
.student-info-table tbody tr:hover td.cat-cell-personal { background-color: #e0f2fe !important; }
.student-info-table tbody tr:hover td.cat-cell-birthplace { background-color: #ccfbf1 !important; }
.student-info-table tbody tr:hover td.cat-cell-residence { background-color: #dcfce7 !important; }
.student-info-table tbody tr:hover td.cat-cell-academic { background-color: #f3e8ff !important; }
.student-info-table tbody tr:hover td.cat-cell-vulnerability { background-color: #fef9c3 !important; }
.student-info-table tbody tr:hover td.cat-cell-vaccine { background-color: #ecfdf5 !important; }
.student-info-table tbody tr:hover td.cat-cell-health1 { background-color: #e0e7ff !important; }
.student-info-table tbody tr:hover td.cat-cell-health2 { background-color: #dbeafe !important; }
.student-info-table tbody tr:hover td.cat-cell-sensory { background-color: #fce7f3 !important; }
.student-info-table tbody tr:hover td.cat-cell-father,
.student-info-table tbody tr:hover td.cat-cell-father-name { background-color: #eff6ff !important; }
.student-info-table tbody tr:hover td.cat-cell-father-phone { background-color: #cffafe !important; }
.student-info-table tbody tr:hover td.cat-cell-father-job { background-color: #fef3c7 !important; }
.student-info-table tbody tr:hover td.cat-cell-father-address { background-color: #dcfce7 !important; }
.student-info-table tbody tr:hover td.cat-cell-mother,
.student-info-table tbody tr:hover td.cat-cell-mother-name { background-color: #ffe4e6 !important; }
.student-info-table tbody tr:hover td.cat-cell-mother-phone { background-color: #fae8ff !important; }
.student-info-table tbody tr:hover td.cat-cell-mother-job { background-color: #ffedd5 !important; }
.student-info-table tbody tr:hover td.cat-cell-mother-address { background-color: #ccfbf1 !important; }
.student-info-table tbody tr:hover td.cat-cell-guardian,
.student-info-table tbody tr:hover td.cat-cell-guardian-rel { background-color: #ede9fe !important; }
.student-info-table tbody tr:hover td.cat-cell-guardian-name { background-color: #f3e8ff !important; }
.student-info-table tbody tr:hover td.cat-cell-guardian-phone { background-color: #e0f2fe !important; }
.student-info-table tbody tr:hover td.cat-cell-guardian-job { background-color: #fef9c3 !important; }
.student-info-table tbody tr:hover td.cat-cell-guardian-address { background-color: #f1f5f9 !important; }
.student-info-table tbody tr:hover td.cat-cell-actions { background-color: #f1f5f9 !important; }

/* Fallback: Automatic Nth-Child block styling for student info table */
.student-info-table thead tr.sticky-header-row2 th:nth-child(-n+6) { background: #f1f5f9; color: #334155; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(6) { border-right: 2px solid #94a3b8 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+7):nth-child(-n+12) { background: #f0f9ff; color: #0284c7; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(12) { border-right: 2px solid #38bdf8 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+13):nth-child(-n+16) { background: #f0fdfa; color: #0d9488; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(16) { border-right: 2px solid #2dd4bf !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+17):nth-child(-n+20) { background: #f0fdf4; color: #16a34a; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(20) { border-right: 2px solid #4ade80 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+21):nth-child(-n+24) { background: #faf5ff; color: #7e22ce; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(24) { border-right: 2px solid #c084fc !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+25):nth-child(-n+28) { background: #fffbeb; color: #a16207; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(28) { border-right: 2px solid #facc15 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(29) { background: #f0fdf4; color: #059669; border-right: 2px solid #34d399 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+30):nth-child(-n+32) { background: #eef2ff; color: #4338ca; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(32) { border-right: 2px solid #818cf8 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+33):nth-child(-n+35) { background: #eff6ff; color: #2563eb; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(35) { border-right: 2px solid #60a5fa !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+36):nth-child(-n+40) { background: #fdf2f8; color: #be185d; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(40) { border-right: 2px solid #f472b6 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+41):nth-child(-n+48) { background: #f8fafc; color: #475569; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(48) { border-right: 2px solid #94a3b8 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+49):nth-child(-n+56) { background: #fff1f2; color: #e11d48; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(56) { border-right: 2px solid #fb7185 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(n+57):nth-child(-n+62) { background: #fdf4ff; color: #a21caf; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(62) { border-right: 2px solid #e879f9 !important; }
.student-info-table thead tr.sticky-header-row2 th:nth-child(63) { background: #f1f5f9; color: #334155; }

/* Subtle table cell input styles */
.cell-input {
  width: 100%;
  height: 26px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11px;
  outline: none;
  background-color: #ffffff;
  color: #1e293b;
  transition: all 0.15s ease-in-out;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-input:hover {
  border-color: #94a3b8;
}
.cell-input:focus {
  border-color: #059669;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
  width: 100%;
  position: relative;
  z-index: 15;
}
.cell-input.cell-changed {
  background-color: #fef9c3;
  border-color: #eab308;
}

.cell-select {
  width: 100%;
  height: 26px;
  padding: 0 4px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11px;
  outline: none;
  background-color: #ffffff;
  color: #1e293b;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-select:hover {
  border-color: #94a3b8;
}
.cell-select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
  position: relative;
  z-index: 15;
  width: 100%;
}
.cell-select.cell-changed {
  background-color: #fef9c3;
  border-color: #eab308;
}

/* Column Filter Inputs in Sticky Row 3 */
.column-filter-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 24px;
  padding: 1px 4px;
  font-size: 10.5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  box-sizing: border-box;
  text-overflow: ellipsis;
  line-height: normal;
  display: block;
}
.column-filter-input:hover {
  border-color: #94a3b8;
}
.column-filter-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 1.5px rgba(5, 150, 105, 0.25);
}

/* Add Rows Dynamic Form Control */
.add-rows-group {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.15s ease-in-out;
}
.add-rows-group:hover,
.add-rows-group:focus-within {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}
.add-rows-btn {
  height: 32px;
  padding: 0 12px;
  background-color: #059669;
  color: #ffffff;
  border: none;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.add-rows-btn:hover {
  background-color: #047857;
}
.add-rows-btn:active {
  background-color: #065f46;
}
.add-rows-input {
  height: 32px;
  width: 52px;
  padding: 0 4px;
  border: none;
  border-left: 1px solid #cbd5e1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
  background-color: #ffffff;
}

/* Action Buttons in Spreadsheet Rows */
.row-action-reset-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background-color: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.row-action-reset-btn:hover {
  color: #047857;
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}
.row-action-reset-btn:active {
  background-color: #dcfce7;
  transform: rotate(-45deg);
}

.row-menu-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  background-color: #f97316 !important;
  border: 1px solid #ea580c !important;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.25);
  transition: all 0.15s ease-in-out;
}
.row-menu-btn i,
.row-menu-btn .fa-solid,
.row-menu-btn .fas {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.row-menu-btn:hover {
  background-color: #ea580c !important;
  border-color: #c2410c !important;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.35);
  transform: translateY(-0.5px);
}
.row-menu-btn:active {
  background-color: #c2410c !important;
  border-color: #9a3412 !important;
  transform: translateY(0);
}

/* Universal Three-Dot Action Buttons across all components and pages */
.action-dropdown-btn,
.row-menu-btn,
button:has(> i.fa-ellipsis-v),
button:has(> i.fa-ellipsis-vertical),
button:has(> i.fa-ellipsis),
button:has(> .fa-ellipsis-v),
button:has(> .fa-ellipsis-vertical),
button:has(> .fa-ellipsis) {
  background-color: #f97316 !important;
  border-color: #ea580c !important;
  color: #ffffff !important;
}

.action-dropdown-btn i,
.action-dropdown-btn .fas,
.action-dropdown-btn .fa-solid,
.row-menu-btn i,
.row-menu-btn .fa-solid,
.row-menu-btn .fas,
button:has(> i.fa-ellipsis-v) i,
button:has(> i.fa-ellipsis-vertical) i,
button:has(> i.fa-ellipsis) i,
button:has(> .fa-ellipsis-v) .fa-ellipsis-v,
button:has(> .fa-ellipsis-vertical) .fa-ellipsis-vertical,
button:has(> .fa-ellipsis) .fa-ellipsis {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.action-dropdown-btn:hover,
.action-dropdown-btn.active,
.row-menu-btn:hover,
button:has(> i.fa-ellipsis-v):hover,
button:has(> i.fa-ellipsis-vertical):hover,
button:has(> i.fa-ellipsis):hover {
  background-color: #ea580c !important;
  border-color: #c2410c !important;
  color: #ffffff !important;
}

/* Three Dot Actions Context Menu */
.student-row-context-menu {
  position: fixed;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  padding: 5px;
  min-width: 190px;
  z-index: 99999;
  font-size: 11.5px;
  animation: contextMenuPop 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes contextMenuPop {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.student-row-context-menu a,
.student-row-context-menu button,
.student-row-context-menu .menu-action {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  gap: 10px;
  color: #334155;
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  transition: all 0.12s ease-in-out;
}
.student-row-context-menu a i,
.student-row-context-menu button i,
.student-row-context-menu .menu-action i {
  font-size: 12px;
  width: 16px;
  text-align: center;
  color: #64748b;
  transition: color 0.12s;
}
.student-row-context-menu a:hover,
.student-row-context-menu button:hover,
.student-row-context-menu .menu-action:hover {
  background: #ecfdf5;
  color: #065f46;
}
.student-row-context-menu a:hover i,
.student-row-context-menu button:hover i,
.student-row-context-menu .menu-action:hover i {
  color: #059669;
}
.student-row-context-menu .menu-divider {
  border-top: 1px solid #f1f5f9;
  margin: 4px 0;
}
.student-row-context-menu .menu-danger,
.student-row-context-menu .menu-action-danger {
  color: #e11d48 !important;
}
.student-row-context-menu .menu-danger i,
.student-row-context-menu .menu-action-danger i {
  color: #e11d48 !important;
}
.student-row-context-menu .menu-danger:hover,
.student-row-context-menu .menu-action-danger:hover {
  background: #fff1f2 !important;
  color: #be123c !important;
}

/* Dropdown menus (Category Jump, Enrollment status) */
.student-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18);
  border: 1px solid #e2e8f0;
  padding: 4px 0;
  min-width: 180px;
  z-index: 100;
  font-size: 11.5px;
}
.student-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  cursor: pointer;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s;
}
.student-dropdown-item:hover {
  background: #f1f5f9;
}
.student-dropdown-item.is-active {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}

/* Failed Student Middle Red Line Crossing (Live Preview & Print) */
.student-failed-row td,
.failed-student-cell,
.student-failed-strike {
  position: relative !important;
  background-image: linear-gradient(to bottom, transparent calc(50% - 0.75px), var(--fail-cross-color, #dc2626) calc(50% - 0.75px), var(--fail-cross-color, #dc2626) calc(50% + 0.75px), transparent calc(50% + 0.75px)) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  text-decoration: none !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.student-failed-row td *,
.failed-student-strike *,
.failed-student-cell * {
  text-decoration: none !important;
}

.student-failed-row.student-failed-disabled td,
.failed-student-cell.student-failed-disabled,
.student-failed-strike.student-failed-disabled,
td.student-failed-disabled,
tr.student-failed-disabled td {
  background-image: none !important;
  text-decoration: none !important;
}

/* ==========================================================================
   MASTER PROFESSIONAL DESIGN SYSTEM FOR ALL TABS, BACKGROUNDS, COLORS & COMPONENTS
   Applies universally across all .tsx pages and modals in Chamkarit Modern School
   ========================================================================== */

/* ── 1. UNIVERSAL PROFESSIONAL TAB DESIGN SYSTEM (Any Tab) ── */
.nav-tabs,
.nav-pills,
.tab-list,
.tab-group,
.tabs,
.management-tabs-container,
.export-tabs,
.modal-lang-tabs,
.config-tabs,
.filemanager--tabs,
.portal-tabs,
.sub-nav-tabs,
.filter-tabs,
[role="tablist"] {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  padding: 4px 6px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  background: transparent !important;
  margin-bottom: 16px !important;
}

/* Tab buttons - Unified baseline */
.tab-btn,
.tab-item,
.mgmt-tab-btn,
.workflow-tab-btn,
.payment-tab-btn,
.modal-lang-tab-btn,
.import-filter-tab-btn,
.coeff-view-tab,
.export-tab,
.export-tab-btn,
.portal-tab-btn,
.sub-tab-btn,
.nav-tabs .nav-link,
.nav-pills .nav-link,
.tab-list > button,
.tab-list > a,
.tabs > button,
.tabs > a,
.tabs > .tab-item,
.export-tabs > button,
.modal-lang-tabs > button,
[role="tablist"] > button,
[role="tablist"] > [role="tab"],
[role="tab"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 7px 15px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid #e2e8f0 !important;
  text-decoration: none !important;
  outline: none !important;
  user-select: none !important;
  white-space: nowrap !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Inactive Tab Text & Icons - High Contrast Dark Slate (Never Faded or Washed Out) */
.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active),
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.modal-lang-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.import-filter-tab-btn:not(.is-active):not(.is-active-error),
.coeff-view-tab:not(.active),
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active),
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active),
.portal-tab-btn:not(.active),
.sub-tab-btn:not(.active),
.nav-tabs .nav-link:not(.active),
.nav-pills .nav-link:not(.active),
[role="tab"]:not(.active):not([aria-selected="true"]),
[role="tablist"] > button:not(.active):not([aria-selected="true"]),
.tabs > button:not(.active):not([aria-selected="true"]),
.tabs > .tab-item:not(.active):not([aria-selected="true"]) {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #e2e8f0 !important;
}

.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active) *,
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.modal-lang-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.import-filter-tab-btn:not(.is-active):not(.is-active-error) *,
.coeff-view-tab:not(.active) *,
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active) *,
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active) *,
.nav-tabs .nav-link:not(.active) *,
.nav-pills .nav-link:not(.active) *,
[role="tab"]:not(.active):not([aria-selected="true"]) * {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

/* Inactive Tab Hover - Sleek Slate Contrast */
.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.workflow-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.payment-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.modal-lang-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.import-filter-tab-btn:not(.is-active):not(.is-active-error):hover,
.coeff-view-tab:not(.active):hover,
.export-tab:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.export-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover,
.portal-tab-btn:not(.active):hover,
.sub-tab-btn:not(.active):hover,
.nav-tabs .nav-link:not(.active):hover,
.nav-pills .nav-link:not(.active):hover,
[role="tab"]:not(.active):not([aria-selected="true"]):hover,
[role="tablist"] > button:not(.active):not([aria-selected="true"]):hover {
  background-color: #f1f5f9 !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-0.5px) !important;
}

.tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.tab-item:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.mgmt-tab-btn:not(.active):not([aria-selected="true"]):not(.is-active):hover *,
.nav-tabs .nav-link:not(.active):hover *,
[role="tab"]:not(.active):not([aria-selected="true"]):hover * {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* Active Tabs - Solid Modern Gradient Green with Pure Crisp White Text & Icons */
.tab-btn.active,
.tab-item.active,
.mgmt-tab-btn.active,
.workflow-tab-btn.active,
.payment-tab-btn.active,
.modal-lang-tab-btn.active,
.import-filter-tab-btn.is-active,
.coeff-view-tab.active,
.export-tab.active,
.export-tab-btn.active,
.portal-tab-btn.active,
.sub-tab-btn.active,
.nav-tabs .nav-link.active,
.nav-pills .nav-link.active,
.tab-btn[aria-selected="true"],
.tab-item[aria-selected="true"],
.tab-list > button.active,
.tab-list > button[aria-selected="true"],
.tabs > button.active,
.tabs > button[aria-selected="true"],
.tabs > .tab-item.active,
.export-tabs > button.active,
.modal-lang-tabs > button.active,
[role="tablist"] > button.active,
[role="tablist"] > [role="tab"].active,
[role="tab"][aria-selected="true"] {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  background-color: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #15803d !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35) !important;
  transform: translateY(-0.5px) !important;
}

.tab-btn.active *,
.tab-item.active *,
.mgmt-tab-btn.active *,
.workflow-tab-btn.active *,
.payment-tab-btn.active *,
.modal-lang-tab-btn.active *,
.import-filter-tab-btn.is-active *,
.coeff-view-tab.active *,
.export-tab.active *,
.export-tab-btn.active *,
.portal-tab-btn.active *,
.sub-tab-btn.active *,
.nav-tabs .nav-link.active *,
.nav-pills .nav-link.active *,
.tab-btn[aria-selected="true"] *,
.tab-item[aria-selected="true"] *,
[role="tab"][aria-selected="true"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Active Tab Hover State - Keep Deep Vibrant Green with Pure White Text */
.tab-btn.active:hover,
.tab-item.active:hover,
.mgmt-tab-btn.active:hover,
.nav-tabs .nav-link.active:hover,
.nav-pills .nav-link.active:hover,
[role="tab"][aria-selected="true"]:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
  background-color: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.45) !important;
}

.tab-btn.active:hover *,
.tab-item.active:hover *,
.mgmt-tab-btn.active:hover *,
.nav-tabs .nav-link.active:hover *,
[role="tab"][aria-selected="true"]:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Tab Content Panels */
.tab-content,
.tab-pane,
.portal-tab-content,
.export-tab-content,
.tab-section {
  animation: tabFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 2. UNIVERSAL BACKGROUNDS (bg) & COLOR HARMONY ── */
/* Base Surface & Backgrounds */
.bg-white,
.bg-surface,
.bg-card,
.bg-panel {
  background-color: #ffffff !important;
  background: #ffffff !important;
}

.bg-slate-50,
.bg-app-light {
  background-color: #f8fafc !important;
  background: #f8fafc !important;
}

.bg-slate-100 {
  background-color: #f1f5f9 !important;
  background: #f1f5f9 !important;
}

.bg-slate-200 {
  background-color: #e2e8f0 !important;
  background: #e2e8f0 !important;
}

/* Dark Backgrounds with Automatic Crisp White Text Contrast Guard */
.bg-slate-800,
.bg-dark-slate,
.bg-slate-900,
.bg-dark,
.bg-navy {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-slate-800 *,
.bg-dark-slate *,
.bg-slate-900 *,
.bg-dark *,
.bg-navy * {
  color: #ffffff;
}

/* Colored Semantic Backgrounds */
.bg-green,
.bg-emerald,
.bg-success {
  background-color: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-blue,
.bg-primary {
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-red,
.bg-danger {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-orange {
  background-color: #ea580c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-warning,
.bg-amber {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-info,
.bg-sky {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-purple,
.bg-violet {
  background-color: #7c3aed !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bg-secondary {
  background-color: #64748b !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Light Pastel Backgrounds for Chips, Badges & Highlights */
.bg-green-soft,
.bg-emerald-50,
.bg-emerald-100 {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
}

.bg-blue-soft,
.bg-blue-50,
.bg-blue-100 {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

.bg-red-soft,
.bg-rose-50,
.bg-rose-100 {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}

.bg-orange-soft,
.bg-orange-50,
.bg-orange-100 {
  background-color: #fff7ed !important;
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
}

.bg-amber-soft,
.bg-amber-50,
.bg-amber-100 {
  background-color: #fffbeb !important;
  color: #b45309 !important;
  -webkit-text-fill-color: #b45309 !important;
}

.bg-purple-soft,
.bg-purple-50,
.bg-purple-100 {
  background-color: #faf5ff !important;
  color: #7e22ce !important;
  -webkit-text-fill-color: #7e22ce !important;
}

/* Professional Status Badges & Pills */
.badge,
.status-badge,
.badge-pill,
.chip,
.tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 3px 9px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

.badge-success,
.badge-active,
.badge-passed,
.badge-paid,
.badge-approved {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

.badge-danger,
.badge-inactive,
.badge-failed,
.badge-unpaid,
.badge-rejected,
.badge-offense {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.badge-warning,
.badge-pending,
.badge-draft,
.badge-partial {
  background-color: #fffbeb !important;
  color: #b45309 !important;
  -webkit-text-fill-color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.badge-info,
.badge-processing,
.badge-enrolled {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.badge-purple {
  background-color: #faf5ff !important;
  color: #7e22ce !important;
  -webkit-text-fill-color: #7e22ce !important;
  border: 1px solid #e9d5ff !important;
}

.badge-orange {
  background-color: #fff7ed !important;
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
  border: 1px solid #fed7aa !important;
}

.badge-secondary,
.badge-gray {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

/* ── 3. PROFESSIONAL POLISH ACROSS ALL .TSX COMPONENTS ── */
/* Modern Buttons */
.btn,
button.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.16s ease-in-out !important;
  text-decoration: none !important;
  line-height: normal !important;
}

.btn:active,
button.btn:active {
  transform: translateY(1px) !important;
}

.btn-primary,
button.btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
}

.btn-primary:hover,
button.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35) !important;
}

.btn-success,
button.btn-success {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  background-color: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #15803d !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25) !important;
}

.btn-success:hover,
button.btn-success:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.35) !important;
}

.btn-danger,
button.btn-danger {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
  background-color: #dc2626 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.25) !important;
}

.btn-danger:hover,
button.btn-danger:hover {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%) !important;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35) !important;
}

.btn-orange,
button.btn-orange {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%) !important;
  background-color: #ea580c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #c2410c !important;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25) !important;
}

.btn-orange:hover,
button.btn-orange:hover {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%) !important;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.35) !important;
}

.btn-secondary,
button.btn-secondary {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.btn-secondary:hover,
button.btn-secondary:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Modals & Dialogs */
.modal-overlay {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 9999 !important;
}

.modal-container,
.modal-box,
.modal-dialog {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.modal-header {
  padding: 14px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #ffffff !important;
}

.modal-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.modal-footer {
  padding: 12px 20px !important;
  border-top: 1px solid #f1f5f9 !important;
  background: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.modal-close,
.btn-modal-close {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  color: #64748b !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.modal-close:hover,
.btn-modal-close:hover {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fecaca !important;
}

/* Form Controls & Inputs */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea,
.form-control,
.form-select {
  height: 34px;
  padding: 6px 12px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

textarea.form-control,
textarea {
  height: auto;
  min-height: 80px;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18) !important;
  background-color: #ffffff !important;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
  font-size: 12px;
}

/* Cards & Content Blocks */
.card,
.panel,
.box-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05) !important;
}

.card-header,
.panel-header {
  padding: 12px 18px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* Toolbars & Filter Bars */
.filter-section,
.filter-card,
.toolbar-container,
.student-toolbar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
  padding: 10px 14px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Professional Modern Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}






