@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: 'Times New Roman';
  src: url('../fonts/Times_New_Roman.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --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;
}

/* LANGUAGE-SPECIFIC FONT APPLICATION - EXCLUDING FONTAWESOME */

/* FontAwesome preservation - highest priority */
.fa, .fas, .far, .fab, .fal, .fad, .fass, .fasr, .fasl, 
.fontawesome, .fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-duotone {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Solid", "Font Awesome 6 Sharp", sans-serif !important;
}

/* Additional FontAwesome preservation for inline elements */
i[class*="fa-"], span[class*="fa-"], div[class*="fa-"], 
i.fa, i.fas, i.far, i.fab, i.fal, i.fad,
span.fa, span.fas, span.far, span.fab, span.fal, span.fad,
div.fa, div.fas, div.far, div.fab, div.fal, div.fad {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Solid", "Font Awesome 6 Sharp", sans-serif !important;
}

/* Default font stack for text elements only (excluding FontAwesome) */
body, html, 
h1, h2, h3, h4, h5, h6, h7, h8,
p, span:not([class*="fa-"]), div:not([class*="fa-"]), 
a:not([class*="fa-"]), button:not([class*="fa-"]), 
input, select, textarea,
label, small, strong, em, i:not([class*="fa-"]), b, u, s, strike, del, ins, mark, sub, sup,
ul, ol, li, dl, dt, dd,
table, thead, tbody, tfoot, tr, td, th, caption,
form, fieldset, legend, optgroup, option, datalist, output,
article, aside, footer, header, main, nav, section, figure, figcaption,
address, blockquote, pre, code, kbd, samp, var, abbr, acronym, cite, dfn,
time, data, meter, progress, details, summary, dialog {
  font-family: 'Times New Roman', 'KhmerOS Battambang', serif;
  line-height: 1.6;
}

/* English language font application - EXCLUDING FontAwesome */
[lang="en"], .lang-en, .english-text, .en-text {
  font-family: 'Times New Roman', serif !important;
}

/* Khmer language font application - EXCLUDING FontAwesome */
[lang="kh"], .lang-kh, .khmer-text, .kh-text {
  font-family: 'KhmerOS Battambang', serif !important;
}

/* Body-level language-specific fonts - EXCLUDING FontAwesome */
body[lang="en"] {
  font-family: 'Times New Roman', serif;
}

body[lang="en"] span:not([class*="fa-"]), body[lang="en"] div:not([class*="fa-"]), 
body[lang="en"] a:not([class*="fa-"]), body[lang="en"] button:not([class*="fa-"]), 
body[lang="en"] input, body[lang="en"] select, body[lang="en"] textarea {
  font-family: 'Times New Roman', serif;
}

body[lang="kh"] {
  font-family: 'KhmerOS Battambang', serif;
}

body[lang="kh"] span:not([class*="fa-"]), body[lang="kh"] div:not([class*="fa-"]), 
body[lang="kh"] a:not([class*="fa-"]), body[lang="kh"] button:not([class*="fa-"]), 
body[lang="kh"] input, body[lang="kh"] select, body[lang="kh"] textarea {
  font-family: 'KhmerOS Battambang', serif;
}

/* Mixed content overrides - EXCLUDING FontAwesome */
body[lang="en"] [lang="kh"], body[lang="en"] .khmer-text, body[lang="en"] .kh-text {
  font-family: 'KhmerOS Battambang', serif !important;
}

body[lang="kh"] [lang="en"], body[lang="kh"] .english-text, body[lang="kh"] .en-text {
  font-family: 'Times New Roman', serif !important;
}

/* 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;
}



* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); background: var(--content-bg); color: var(--text-primary); }
body.admin-layout { overflow: hidden; height: 100vh; }

/* --- 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: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 700; flex-shrink: 0;
}
.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;
}
.nav-item {
  display: flex; align-items: center; padding: 8px 4px; cursor: pointer;
  color: var(--sidebar-text); font-size: 13px; transition: all 0.2s; position: relative;
  gap: 12px; text-decoration: none; user-select: none;
}
.nav-item:hover { color: #d0e2f4; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #42a5f5; border-radius: 0 3px 3px 0;
}
.nav-item i { width: 18px; text-align: center; font-size: 13px; opacity: 0.7; }
.nav-item.active i { opacity: 1; }
.nav-item .chevron { margin-left: auto; font-size: 10px; transition: transform 0.25s; }
.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;
  text-decoration: none; position: relative; gap: 8px;
}
.nav-sub-item:hover { color: #d0e2f4; }
.nav-sub-item.active { color: var(--sidebar-text-active); background: var(--sidebar-active); }
.nav-sub-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #42a5f5; border-radius: 0 3px 3px 0;
}
.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%);
}
.nav-sub-item.active::after { background: #42a5f5; }

/* Main Layout */
.main-wrapper { display: flex; height: 100vh; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* 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);
}
.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: 12.5px; color: var(--text-primary); background: #fff;
  cursor: pointer; outline: none; font-family: var(--sans);
  transition: border-color 0.2s;
}
.topbar-select:focus { border-color: var(--accent); }

/* Content Area */
.content-area { flex: 1; overflow-y: auto; padding: 12px; }
.content-area::-webkit-scrollbar { width: 6px; }
.content-area::-webkit-scrollbar-thumb { background: #c8cdd4; border-radius: 4px; }

/* 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-actions { display: flex; gap: 10px; position: relative; }

/* Cards */
.card {
  background: var(--card-bg); 
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04); 
  overflow: hidden; margin-bottom: 20px;
}
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-header i { color: var(--accent); font-size: 14px; }
.card-body { padding: 8px; }

/* Filter Section */
.filter-section {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  padding: 16px 20px; background: #f8fafc; border-bottom: 1px solid var(--border);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: 11px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.filter-select, .filter-input {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12.5px; color: var(--text-primary); background: #fff;
  cursor: pointer; outline: none; font-family: 'Inter', sans-serif;
  min-width: 160px; transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(21,101,192,0.1); }

/* 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: 'Inter', sans-serif;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(21,101,192,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: var(--approve-bg); color: #fff; }
.btn-success:hover { background: var(--approve-hover); }
.btn-outline {
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
}
.btn-outline:hover { background: #f0f2f5; border-color: #bcc5d0; }
.btn-sm { padding: 5px 12px; font-size: 11.5px; }
.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.bg-green { background-color: #28a745 !important; color: #fff !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); }

/* Language Dropdown */
.lang-dropdown-btn {
  padding: 6px 12px;
  border: 2px solid #d9230f;
  background: transparent;
  color: #d9230f;
  font-weight: bold;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-dropdown-btn:hover {
  background: #d9230f;
  color: #fff;
}
.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 120px;
  z-index: 1000;
  margin-top: 5px;
  display: none;
  flex-direction: column;
}
.lang-dropdown-menu.show {
  display: flex;
}
.lang-dropdown-item {
  padding: 10px 15px;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  transition: background 0.2s;
  font-family: 'Times New Roman', serif;
}
.lang-dropdown-item:hover {
  background: #f5f5f5;
}
.lang-dropdown-item:first-child {
  border-radius: 4px 4px 0 0;
}
.lang-dropdown-item:last-child {
  border-radius: 0 0 4px 4px;
  border-top: 1px solid #eee;
}

/* Table */
.table-wrapper { overflow-x: auto; }
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); background: #fafbfc; }
.tab-item {
  padding: 12px 20px; font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s; user-select: none;
}
.tab-item:hover { color: var(--text-primary); background: #f0f3f7; }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* 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: 11px; 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); }

/* 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: 11px; 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); align-items: center; justify-content: center;
}
.modal-content {
  background-color: #fff; width: 100%; 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: 100%;  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); }
@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: 15px 20px; border-top: 1px solid var(--border); text-align: right; background: #f8fafc; flex-shrink: 0; }

/* 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: -270px; z-index: 100; }
  .sidebar.mobile-open { left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 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: 10mm; size: A4 portrait; }
  body * { visibility: hidden; }
  #print-container, #print-container * { visibility: visible; }
  #print-container {
    display: block;
    position: absolute;
    left: 0; top: 0; width: 100%;
    margin: 0; padding: 0;
  }
  .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: 11px;
  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: 11px;
  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: 11px;
}
.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 */
#toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translate(-50%, -40px);
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast-container {
  border-radius: 12px;
  padding: 14px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 320px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
}
.toast-success { background: #2ecc71; }
.toast-error { background: #e74c3c; }
.toast-icon { font-size: 24px; }
.toast-content { display: flex; flex-direction: column; }
.toast-title { font-size: 16px; font-weight: 800; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.toast-message { font-size: 14px; opacity: 0.95; }

/* --- 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: 11px; }
.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; }

/* --- Navbar Scroll Effect (from template) --- */
.navbar-scroll-effect {
  background: rgba(10, 10, 10, 0.3) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transition: all 0.5s ease !important;
  border-bottom: none !important;
}

.navbar-scroll-effect.nav-scrolled {
  background: rgba(10, 10, 10, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* For light theme navbar (current site) */
.navbar-light-scroll {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.5s ease !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.navbar-light-scroll.nav-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Mobile Navbar Responsiveness */
@media (max-width: 991px) {
  .navbar-light-scroll {
    padding: 10px 20px !important;
  }
  
  .navbar-brand {
    font-size: 18px !important;
  }
  
  .navbar-brand img {
    height: 30px !important;
  }
  
  #mainNavbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  #mainNavbar .navbar-nav {
    gap: 0 !important;
    flex-direction: column;
    width: 100%;
  }
  
  #mainNavbar .nav-item {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  #mainNavbar .nav-item:last-child {
    border-bottom: none;
  }
  
  #mainNavbar .nav-link {
    padding: 10px 0 !important;
    font-size: 16px !important;
  }
  
  #mainNavbar .nav-link i {
    margin-right: 8px;
  }
  
  #mainNavbar .nav-item a[style*="background"] {
    display: inline-block;
    padding: 10px 20px !important;
    margin-top: 10px;
  }
}

/* --- Hero Slider (from template) --- */
.slider-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
}

.slide.active .slide-bg {
  animation: kenBurns 8s ease-out forwards;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.5) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5%;
  max-width: 1280px;
  margin: 0 auto;
}

.slide-content .subtitle,
.slide-content .title,
.slide-content .desc,
.slide-content .buttons {
  opacity: 0;
  transform: translateY(30px);
}

.slide.active .slide-content .subtitle {
  animation: slideUp 0.8s 0.3s ease-out forwards;
}

.slide.active .slide-content .title {
  animation: slideUp 0.8s 0.5s ease-out forwards;
}

.slide.active .slide-content .desc {
  animation: slideUp 0.8s 0.7s ease-out forwards;
}

.slide.active .slide-content .buttons {
  animation: slideUp 0.8s 0.9s ease-out forwards;
}

/* Slider Dots */
.slider-dots {
  display: flex;
  gap: 8px;
}

.slider-dot {
  width: 40px;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.slider-dot::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #d9230f;
  transition: width 0s;
}

.slider-dot.active {
  background: rgba(255,255,255,0.15);
}

.slider-dot.active::after {
  width: 100%;
  transition: width 6s linear;
}

/* Slider Arrows */
.slider-arrow {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.slider-arrow:hover {
  background: #d9230f;
  border-color: #d9230f;
}

/* Progress bar on slide number */
.slide-counter {
  font-variant-numeric: tabular-nums;
}

/* Keyframes */
@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.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: 11px; 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:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.1);
}
.table-input:disabled {
  background: #f0f2f5;
  color: var(--text-secondary);
  cursor: not-allowed;
  border-color: var(--border);
}

/* 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: 11px;
  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 #fcfcfc !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: 14px;
}

.perm-actions input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
