/* =====================================================
   HỆ THỐNG XÂY DỰNG LỊCH THI - HUETC
   assets/css/style.css
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --burgundy:        #7b2d3e;
  --burgundy-dark:   #5c1f2c;
  --burgundy-light:  #9e3d52;
  --burgundy-muted:  #f5eaec;
  --burgundy-hover:  #f0d9dd;
  --white:           #ffffff;
  --bg:              #f7f5f4;
  --sidebar-bg:      #ffffff;
  --header-bg:       #ffffff;
  --text-dark:       #1a1a1a;
  --text-mid:        #4a4a4a;
  --text-light:      #888888;
  --border:          #e2dada;
  --border-light:    #ede8e8;
  --shadow-sm:       0 1px 3px rgba(123,45,62,0.08);
  --shadow-md:       0 2px 8px rgba(123,45,62,0.12);
  --shadow-lg:       0 4px 20px rgba(123,45,62,0.15);
  --sidebar-width:   220px;
  --sidebar-collapsed: 52px;
  --header-height:   46px;
  --font-main:       'Be Vietnam Pro', sans-serif;
  --font-display:    'Playfair Display', serif;
  --radius:          4px;
  --radius-md:       6px;
  --radius-lg:       10px;
  --transition:      0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 12.5px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 12.5px;
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-main); font-size: 12.5px; }
input, select, textarea { font-family: var(--font-main); font-size: 12.5px; }
table { border-collapse: collapse; width: 100%; }

/* LAYOUT */
.admin-wrapper { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width); min-height: 100vh;
  background: var(--sidebar-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; z-index: 200;
  transition: width var(--transition), transform var(--transition);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-logo {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; height: var(--header-height);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap; overflow: hidden;
}
.sidebar-logo-icon {
  width: 26px; height: 26px; min-width: 26px;
  background: var(--burgundy); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  font-family: var(--font-display); letter-spacing: -0.5px;
}
.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.sidebar-logo-text .school-name {
  font-size: 10px; font-weight: 700; color: var(--burgundy);
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden; letter-spacing: 0.2px;
}
.sidebar-logo-text .school-sub { font-size: 9px; color: var(--text-light); white-space: nowrap; }
.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 0; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.nav-section-label {
  font-size: 9px; font-weight: 700; color: var(--text-light);
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 10px 14px 3px; white-space: nowrap; overflow: hidden;
  transition: opacity var(--transition);
}
.sidebar.collapsed .nav-section-label { opacity: 0; height: 0; padding: 0; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  color: var(--text-mid); font-size: 12px; font-weight: 500;
  white-space: nowrap; transition: background var(--transition), color var(--transition);
  cursor: pointer; position: relative; border-left: 2px solid transparent;
  margin: 0 4px; border-radius: var(--radius);
}
.nav-item:hover { background: var(--burgundy-hover); color: var(--burgundy); }
.nav-item.active { background: var(--burgundy-muted); color: var(--burgundy); border-left-color: var(--burgundy); font-weight: 600; }
.nav-item .nav-icon { width: 28px; min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.nav-item .nav-text { overflow: hidden; text-overflow: ellipsis; transition: opacity var(--transition), width var(--transition); }
.sidebar.collapsed .nav-text, .sidebar.collapsed .nav-badge { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 6px; margin: 1px 6px; }
.nav-badge { margin-left: auto; background: var(--burgundy); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center; }
.sidebar-footer { border-top: 1px solid var(--border-light); padding: 8px 0; }
.nav-item .nav-tooltip { display: none; position: absolute; left: calc(var(--sidebar-collapsed) + 4px); top: 50%; transform: translateY(-50%); background: var(--burgundy-dark); color: #fff; padding: 4px 8px; border-radius: var(--radius); font-size: 11px; white-space: nowrap; z-index: 300; pointer-events: none; box-shadow: var(--shadow-md); }
.sidebar.collapsed .nav-item:hover .nav-tooltip { display: block; }

/* MAIN */
.main-area { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; transition: margin-left var(--transition); }
.main-area.sidebar-collapsed { margin-left: var(--sidebar-collapsed); }

/* HEADER */
.header {
  height: var(--header-height); background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm);
}
.header-toggle { width: 30px; height: 30px; background: none; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--text-mid); font-size: 14px; transition: background var(--transition), color var(--transition), border-color var(--transition); flex-shrink: 0; }
.header-toggle:hover { background: var(--burgundy-muted); color: var(--burgundy); border-color: var(--burgundy); }
.header-search { flex: 1; max-width: 320px; position: relative; }
.header-search input { width: 100%; height: 28px; padding: 0 10px 0 30px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text-dark); font-size: 12px; outline: none; transition: border-color var(--transition), background var(--transition); }
.header-search input:focus { border-color: var(--burgundy); background: #fff; }
.header-search input::placeholder { color: var(--text-light); }
.header-search .search-icon { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 12px; pointer-events: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-notif { width: 30px; height: 30px; background: none; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--text-mid); font-size: 14px; position: relative; transition: background var(--transition), color var(--transition); }
.header-notif:hover { background: var(--burgundy-muted); color: var(--burgundy); }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; background: var(--burgundy); border-radius: 50%; border: 1px solid #fff; }
.header-user { display: flex; align-items: center; gap: 6px; cursor: pointer; position: relative; padding: 2px 6px 2px 2px; border-radius: var(--radius-md); border: 1px solid var(--border); transition: background var(--transition); }
.header-user:hover { background: var(--burgundy-muted); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 11.5px; font-weight: 600; color: var(--text-dark); white-space: nowrap; }
.user-role { font-size: 10px; color: var(--text-light); white-space: nowrap; }
.user-chevron { font-size: 10px; color: var(--text-light); transition: transform var(--transition); }
.header-user.open .user-chevron { transform: rotate(180deg); }
.user-dropdown { display: none; position: absolute; top: calc(100% + 4px); right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 160px; z-index: 500; overflow: hidden; }
.header-user.open .user-dropdown { display: block; animation: dropIn 0.15s ease; }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.dropdown-header { padding: 10px 12px; border-bottom: 1px solid var(--border-light); background: var(--burgundy-muted); }
.dropdown-header .dh-name { font-size: 12px; font-weight: 700; color: var(--burgundy-dark); }
.dropdown-header .dh-email { font-size: 10px; color: var(--text-light); }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12px; color: var(--text-mid); transition: background var(--transition), color var(--transition); cursor: pointer; }
.dropdown-item:hover { background: var(--burgundy-hover); color: var(--burgundy); }
.dropdown-item .di-icon { font-size: 13px; width: 16px; text-align: center; }
.dropdown-divider { border: none; border-top: 1px solid var(--border-light); margin: 2px 0; }
.dropdown-item.danger { color: #c0392b; }
.dropdown-item.danger:hover { background: #fdf0ee; color: #c0392b; }

/* MAIN CONTENT */
.main-content { flex: 1; padding: 14px; overflow-x: hidden; }

/* PAGE HEADER */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--burgundy-dark); line-height: 1.2; }
.page-subtitle { font-size: 11px; color: var(--text-light); margin-top: 1px; }
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-light); }
.breadcrumb-item { color: var(--text-light); }
.breadcrumb-item.active { color: var(--burgundy); font-weight: 500; }
.breadcrumb-sep { color: var(--border); font-size: 10px; }

/* STAT CARDS */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), border-color var(--transition); position: relative; overflow: hidden; }
.stat-card::after { content:''; position:absolute; top:0; left:0; width:3px; height:100%; background:var(--burgundy); border-radius: var(--radius) 0 0 var(--radius); }
.stat-card:hover { box-shadow: var(--shadow-md); border-color: var(--burgundy); }
.stat-icon { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--burgundy-muted); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 19px; font-weight: 700; color: var(--burgundy-dark); line-height: 1; font-family: var(--font-display); }
.stat-label { font-size: 10.5px; color: var(--text-light); margin-top: 2px; }
.stat-change { font-size: 10px; font-weight: 600; margin-top: 2px; }
.stat-change.up { color: #27ae60; }
.stat-change.down { color: #e74c3c; }

/* TABLE CARD */
.table-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.table-card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border-light); gap: 8px; flex-wrap: wrap; }
.table-card-title { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.table-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.table-search { position: relative; }
.table-search input { height: 26px; padding: 0 8px 0 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); font-size: 11.5px; outline: none; width: 180px; color: var(--text-dark); transition: border-color var(--transition), width var(--transition); }
.table-search input:focus { border-color: var(--burgundy); width: 220px; }
.table-search .ts-icon { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 11px; pointer-events: none; }
.filter-select { height: 26px; padding: 0 22px 0 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); font-size: 11.5px; color: var(--text-mid); outline: none; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; }
.filter-select:focus { border-color: var(--burgundy); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: var(--radius); font-size: 11.5px; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.btn-primary:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); }
.btn-outline { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn-outline:hover { background: var(--burgundy-muted); }
.btn-ghost { background: transparent; color: var(--text-mid); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text-dark); }
.btn-sm { height: 22px; padding: 0 7px; font-size: 10.5px; }
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: #27ae60; color: #fff; border-color: #27ae60; }
.btn-success:hover { background: #219a52; }
.btn-warning { background: #e67e22; color: #fff; border-color: #e67e22; }
.btn-warning:hover { background: #ca6f1e; }

/* DATA TABLE */
.data-table { width: 100%; }
.data-table thead tr { background: #fff; border-bottom: 2px solid var(--border-light); }
.data-table th { padding: 7px 10px; text-align: left; font-size: 10.5px; font-weight: 700; color: var(--burgundy); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.3px; cursor: pointer; user-select: none; }
.data-table th:hover { color: var(--burgundy-dark); }
.data-table td { padding: 6px 10px; font-size: 12px; color: var(--text-dark); border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--burgundy-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }
.col-actions { white-space: nowrap; display: flex; gap: 3px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 12px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.badge-soan_thao { background: #fef9e7; color: #d68910; }
.badge-da_duyet  { background: #eaf2ff; color: #2980b9; }
.badge-cong_bo   { background: #eafaf1; color: #27ae60; }
.badge-hoc_ky    { background: var(--burgundy-muted); color: var(--burgundy); }
.badge-thi_lai   { background: #fdf0ee; color: #c0392b; }
.badge-tot_nghiep{ background: #f0eaff; color: #8e44ad; }
.badge-giua_ky   { background: #eafff6; color: #1a9e6b; }

/* PAGINATION */
.pagination { display: flex; align-items: center; gap: 3px; padding: 8px 12px; border-top: 1px solid var(--border-light); justify-content: flex-end; }
.pagination-info { font-size: 11px; color: var(--text-light); margin-right: auto; }
.page-btn { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-size: 11.5px; color: var(--text-mid); cursor: pointer; transition: all var(--transition); }
.page-btn:hover, .page-btn.active { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.form-label { font-size: 11px; font-weight: 600; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.3px; }
.form-control { height: 28px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text-dark); font-size: 12px; outline: none; transition: border-color var(--transition), box-shadow var(--transition); width: 100%; }
.form-control:focus { border-color: var(--burgundy); box-shadow: 0 0 0 2px rgba(123,45,62,0.1); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { height: auto; padding: 6px 8px; resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slideUp 0.2s ease; }
.modal-lg { max-width: 800px; }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.modal-header { padding: 12px 14px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-title { font-size: 13px; font-weight: 700; color: var(--burgundy-dark); }
.modal-close { width: 24px; height: 24px; background: none; border: none; font-size: 16px; color: var(--text-light); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); transition: background var(--transition); }
.modal-close:hover { background: var(--bg); color: var(--text-dark); }
.modal-body { padding: 14px; }
.modal-footer { padding: 10px 14px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 6px; }

/* ALERTS */
.alert { padding: 8px 12px; border-radius: var(--radius); font-size: 12px; margin-bottom: 8px; display: flex; align-items: flex-start; gap: 8px; }
.alert-error   { background: #fdf0ee; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-success { background: #eafaf1; color: #1a6e3a; border: 1px solid #a3e4c1; }
.alert-warning { background: #fef9e7; color: #7d6608; border: 1px solid #f9e79f; }
.alert-info    { background: #eaf2ff; color: #1a5276; border: 1px solid #a9cce3; }
.alert-icon    { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.conflict-list { margin-top: 4px; padding-left: 14px; }
.conflict-list li { margin-bottom: 2px; font-size: 11px; }

/* TABS */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.tab-btn { padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--text-light); cursor: pointer; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--transition), border-color var(--transition); }
.tab-btn:hover { color: var(--burgundy); }
.tab-btn.active { color: var(--burgundy); border-bottom-color: var(--burgundy); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* CHART CARD */
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-sm); }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.chart-title { font-size: 12.5px; font-weight: 700; color: var(--text-dark); }
.chart-subtitle { font-size: 10px; color: var(--text-light); margin-top: 1px; }
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-bottom: 8px; }

/* PROGRESS */
.progress-bar-wrap { height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; margin-top: 3px; }
.progress-bar-fill { height: 100%; border-radius: 3px; background: var(--burgundy); transition: width 0.5s ease; }
.progress-bar-fill.green { background: #27ae60; }
.progress-bar-fill.orange { background: #e67e22; }
.progress-bar-fill.blue { background: #2980b9; }

/* CALENDAR / TIMELINE */
.exam-calendar { width: 100%; }
.calendar-day { border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 6px; overflow: hidden; }
.calendar-day-header { background: var(--burgundy-muted); padding: 5px 10px; display: flex; align-items: center; justify-content: space-between; }
.calendar-day-title { font-size: 11.5px; font-weight: 700; color: var(--burgundy-dark); }
.calendar-day-count { font-size: 10px; color: var(--text-light); }
.exam-slot { display: grid; grid-template-columns: 80px 60px 1fr 1fr 100px 250px 80px; gap: 6px; align-items: center; padding: 5px 10px; border-bottom: 1px solid var(--border-light); font-size: 11.5px; transition: background var(--transition); }
.exam-slot:last-child { border-bottom: none; }
.exam-slot:hover { background: var(--burgundy-hover); }
.exam-slot-time { color: var(--burgundy); font-weight: 700; white-space: nowrap; }
.exam-slot-room { font-weight: 600; }
.exam-slot-head { font-size: 10px; font-weight: 700; color: var(--text-light); text-transform: uppercase; background: var(--bg); padding: 4px 10px; display: grid; grid-template-columns: 80px 60px 1fr 1fr 100px 250px 80px; gap: 6px; }

/* PRINT AREA */
.print-preview { background: #fff; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-top: 10px; }
.print-header { text-align: center; margin-bottom: 16px; }
.print-school { font-size: 13px; font-weight: 700; text-transform: uppercase; }
.print-dept   { font-size: 11px; margin-top: 2px; }
.print-doc-num { font-size: 10px; color: var(--text-light); margin-top: 4px; }
.print-title  { font-size: 15px; font-weight: 700; text-transform: uppercase; margin: 12px 0 4px; font-family: var(--font-display); }
.print-subtitle { font-size: 11px; font-style: italic; color: var(--text-mid); }
.print-table  { width: 100%; border-collapse: collapse; font-size: 11px; margin: 12px 0; }
.print-table th { border: 1px solid #333; padding: 5px 6px; background: #f0d9dd; font-weight: 700; text-align: center; font-size: 10px; }
.print-table td { border: 1px solid #555; padding: 4px 6px; vertical-align: middle; }
.print-signatures { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 24px; text-align: center; font-size: 11px; }
.print-sig-title { font-weight: 700; margin-bottom: 4px; }
.print-sig-date  { font-style: italic; color: var(--text-light); font-size: 10px; margin-bottom: 50px; }
.print-sig-name  { font-weight: 700; margin-top: 4px; }
.print-sig-img   { width: 120px; height: 50px; object-fit: contain; margin: 0 auto 4px; }

/* PUBLIC PAGE */
.public-header { background: var(--burgundy); color: #fff; padding: 16px 20px; }
.public-header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.public-logo { width: 50px; height: 50px; border-radius: var(--radius-md); background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.public-school-name { font-size: 14px; font-weight: 700; font-family: var(--font-display); }
.public-system-name { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.public-main { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* STATS COLORS */
.color-blue   { color: #2980b9 !important; }
.color-green  { color: #27ae60 !important; }
.color-orange { color: #e67e22 !important; }
.color-purple { color: #8e44ad !important; }

/* UTILITY */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-burg   { color: var(--burgundy); }
.text-muted  { color: var(--text-light); }
.fw-bold     { font-weight: 700; }
.fw-600      { font-weight: 600; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.gap-4 { gap: 4px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.w-full { width: 100%; }
.tag { background: var(--burgundy-muted); color: var(--burgundy); border: 1px solid rgba(123,45,62,0.15); border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 600; }
.num-mono { font-variant-numeric: tabular-nums; }

/* INFO CARD */
.info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 8px; }
.info-card-header { padding: 9px 12px; background: var(--burgundy-muted); border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.info-card-title { font-size: 12.5px; font-weight: 700; color: var(--burgundy-dark); display: flex; align-items: center; gap: 6px; }
.info-card-body { padding: 12px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.info-field { display: flex; flex-direction: column; gap: 2px; }
.info-field-label { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; }
.info-field-value { font-size: 12.5px; color: var(--text-dark); font-weight: 500; }

/* MOBILE OVERLAY */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 190; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .exam-slot { grid-template-columns: 70px 50px 1fr 1fr; }
  .exam-slot > *:nth-child(n+5) { display: none; }
  .exam-slot-head > *:nth-child(n+5) { display: none; }
}
@media (max-width: 640px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay.visible { display: block; }
  .main-area { margin-left: 0 !important; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 8px; }
  .info-grid { grid-template-columns: 1fr; }
  .user-info { display: none; }
  .header-search { max-width: 160px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .print-signatures { grid-template-columns: 1fr; }
  .exam-slot { grid-template-columns: 70px 1fr 1fr; }
  .exam-slot > *:nth-child(n+4) { display: none; }
}

@media print {
  .sidebar, .header, .main-content > *:not(.print-preview) { display: none !important; }
  .main-area { margin-left: 0 !important; }
  .print-preview { border: none; padding: 0; margin: 0; }
  body { background: #fff; font-size: 11px; }
  .print-table th, .print-table td { border: 1px solid #333 !important; }
}
