/* =====================================================
   TRƯỜNG CAO ĐẲNG DU LỊCH HUẾ - ADMIN SYSTEM
   style.css - Global Stylesheet
   ===================================================== */

@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');

/* =====================================================
   CSS VARIABLES
   ===================================================== */
: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);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::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 WRAPPER
   ===================================================== */
.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;
  transition: opacity var(--transition);
}

.sidebar-footer {
  border-top: 1px solid var(--border-light);
  padding: 8px 0;
}

/* Tooltip for collapsed sidebar */
.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 AREA
   ===================================================== */
.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-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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);
}

/* Dropdown Menu */
.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; }

/* =====================================================
   CHARTS GRID
   ===================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.charts-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.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;
}

.chart-tabs {
  display: flex;
  gap: 2px;
}

.chart-tab {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 10.5px;
  color: var(--text-light);
  cursor: pointer;
  background: none;
  transition: all var(--transition);
}

.chart-tab.active,
.chart-tab:hover {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}

/* =====================================================
   BAR CHART (CSS/SVG Pure)
   ===================================================== */
.bar-chart {
  width: 100%;
  position: relative;
}

.bar-chart-inner {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  padding-left: 32px;
  position: relative;
}

.bar-chart-yaxis {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.bar-chart-yaxis span {
  font-size: 9px;
  color: var(--text-light);
  line-height: 1;
}

.bar-chart-gridlines {
  position: absolute;
  left: 30px;
  right: 0;
  top: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.bar-chart-gridlines::before,
.bar-chart-gridlines::after,
.gridline {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  display: block;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.bar-group-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  width: 100%;
  justify-content: center;
  height: 120px;
}

.bar {
  flex: 1;
  max-width: 22px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: opacity 0.15s;
  position: relative;
  cursor: pointer;
}

.bar:hover {
  opacity: 0.85;
}

.bar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--burgundy-dark);
  color: #fff;
  padding: 3px 6px;
  border-radius: var(--radius);
  font-size: 10px;
  white-space: nowrap;
  z-index: 10;
}

.bar:hover .bar-tooltip {
  display: block;
}

.bar.primary { background: var(--burgundy); }
.bar.secondary { background: #d4a0ac; }
.bar.tertiary { background: #e8c5cc; }

.bar-label {
  font-size: 9px;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.chart-legend {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-mid);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* =====================================================
   LINE CHART (SVG)
   ===================================================== */
.line-chart-svg {
  width: 100%;
  height: 140px;
}

.line-chart-svg .grid-line {
  stroke: var(--border-light);
  stroke-width: 1;
}

.line-chart-svg .data-line {
  stroke: var(--burgundy);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart-svg .data-line-secondary {
  stroke: #d4a0ac;
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 2;
  stroke-linecap: round;
}

.line-chart-svg .area-fill {
  fill: url(#areaGradient);
  opacity: 0.3;
}

.line-chart-svg .data-dot {
  fill: var(--burgundy);
  stroke: #fff;
  stroke-width: 1.5;
  cursor: pointer;
  transition: r 0.15s;
}

.line-chart-svg .data-dot:hover {
  r: 5;
}

.line-chart-svg .axis-label {
  font-family: var(--font-main);
  font-size: 9px;
  fill: var(--text-light);
}

/* =====================================================
   PIE CHART (SVG)
   ===================================================== */
.pie-chart-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pie-chart-svg {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.pie-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pie-legend-label {
  flex: 1;
  color: var(--text-mid);
  font-size: 10.5px;
}

.pie-legend-value {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 10.5px;
}

.pie-legend-pct {
  color: var(--text-light);
  font-size: 10px;
}

/* =====================================================
   DATA TABLE
   ===================================================== */
.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;
  transition: border-color var(--transition);
}

.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;
}

/* 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;
}

.data-table .col-actions {
  white-space: nowrap;
  display: flex;
  gap: 3px;
}

/* Badges / Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active   { background: #eafaf1; color: #27ae60; }
.badge-inactive { background: #fef9e7; color: #d68910; }
.badge-stopped  { background: #fdedec; color: #e74c3c; }
.badge-new      { background: var(--burgundy-muted); color: var(--burgundy); }
.badge-cd       { background: #eaf2ff; color: #2980b9; }
.badge-tc       { background: #f0eaff; color: #8e44ad; }
.badge-sc       { 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;
}

/* =====================================================
   PROFILE PAGE
   ===================================================== */
.profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 8px;
  align-items: start;
}

.profile-sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 10px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--burgundy);
  background: var(--burgundy-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--burgundy);
  font-family: var(--font-display);
  overflow: hidden;
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: var(--burgundy);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--burgundy-dark);
  margin-bottom: 2px;
}

.profile-id-badge {
  display: inline-block;
  background: var(--burgundy-muted);
  color: var(--burgundy);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.profile-status {
  margin-bottom: 12px;
}

.profile-sidebar-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 10px 0;
}

.profile-sidebar-info {
  text-align: left;
}

.psi-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
}

.psi-icon {
  color: var(--burgundy);
  font-size: 12px;
  width: 14px;
  text-align: center;
}

.psi-label {
  color: var(--text-light);
  width: 60px;
  flex-shrink: 0;
  font-size: 10.5px;
}

.psi-value {
  color: var(--text-dark);
  font-weight: 500;
  flex: 1;
}

.profile-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-main-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.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;
}

/* Study History Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 10px;
  position: relative;
}

.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--burgundy);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--burgundy);
  margin-top: 3px;
  flex-shrink: 0;
}

.timeline-dot.done {
  background: #27ae60;
  box-shadow: 0 0 0 2px #27ae60;
}

.timeline-line {
  width: 1px;
  flex: 1;
  background: var(--border-light);
  margin: 3px 0;
}

.timeline-content {
  flex: 1;
  padding-bottom: 12px;
}

.timeline-period {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
}

.timeline-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
}

.timeline-detail {
  font-size: 11.5px;
  color: var(--text-mid);
  margin-top: 2px;
}

/* Score Table */
.score-table td:first-child { font-weight: 600; }
.score-val { font-weight: 700; color: var(--burgundy-dark); }
.score-gpa { font-size: 11px; }

/* =====================================================
   LECTURER PAGE
   ===================================================== */
.dept-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 2px;
}

.dept-tab {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  background: #fff;
  transition: all var(--transition);
  border-bottom-color: transparent;
}

.dept-tab:hover { color: var(--burgundy); background: var(--burgundy-muted); }
.dept-tab.active {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}

.dept-stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.dept-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.dept-stat:hover,
.dept-stat.active {
  border-color: var(--burgundy);
  background: var(--burgundy-muted);
}

.dept-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--burgundy-dark);
  font-family: var(--font-display);
}

.dept-stat-name {
  font-size: 9.5px;
  color: var(--text-light);
  margin-top: 1px;
}

/* =====================================================
   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;
}

/* 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: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

@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;
}

/* =====================================================
   RECENT ACTIVITY / EVENTS
   ===================================================== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
  transition: background var(--transition);
}

.activity-item:last-child { border-bottom: none; }

.activity-item:hover { background: var(--burgundy-hover); }

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--burgundy-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.4;
}

.activity-text strong { color: var(--burgundy); }

.activity-time {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 1px;
}

/* =====================================================
   QUICK STATS ROW
   ===================================================== */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.mini-stat {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 6px 8px;
  text-align: center;
}

.mini-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--burgundy-dark);
  font-family: var(--font-display);
}

.mini-stat-label {
  font-size: 9.5px;
  color: var(--text-light);
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.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; }

/* =====================================================
   SALARY / TUITION METER
   ===================================================== */
.tuition-meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tuition-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tuition-label {
  width: 100px;
  font-size: 11px;
  color: var(--text-mid);
  flex-shrink: 0;
}

.tuition-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.tuition-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--burgundy);
}

.tuition-amount {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  width: 70px;
  text-align: right;
  flex-shrink: 0;
}

/* =====================================================
   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;
}

/* =====================================================
   MOBILE OVERLAY
   ===================================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
}

/* =====================================================
   RESPONSIVE - TABLET (≤ 900px)
   ===================================================== */
@media (max-width: 900px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .charts-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dept-stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================================================
   RESPONSIVE - MOBILE (≤ 640px)
   ===================================================== */
@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);
  }
  .charts-grid-3 {
    grid-template-columns: 1fr;
  }
  .main-content {
    padding: 8px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .dept-stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .user-info {
    display: none;
  }
  .header-search {
    max-width: 160px;
  }
  .mini-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .table-search input {
    width: 120px;
  }
  .table-search input:focus {
    width: 140px;
  }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.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%; }

/* Number formatting helper */
.num-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* Tag list */
.tag-list {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.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;
}

/* Avatar group */
.avatar-group {
  display: flex;
}

.avatar-group .ava {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -6px;
  overflow: hidden;
  background: var(--burgundy-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--burgundy);
}

.avatar-group .ava:first-child { margin-left: 0; }

/* -------------------20260306 ADD FROM PAGES----------------------- */
/* 
  1. Dashboard page html ------------------------------
*/
    .competition-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .comp-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border: 1px solid var(--border-light);
      border-radius: var(--radius);
      background: var(--bg);
    }
    .comp-rank {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }
    .comp-rank.gold   { background: #d4a017; }
    .comp-rank.silver { background: #95a5a6; }
    .comp-rank.bronze { background: #ca6f1e; }
    .comp-rank.other  { background: var(--text-light); }
    .comp-name { font-size: 11.5px; font-weight: 600; flex: 1; }
    .comp-score { font-size: 12px; font-weight: 700; color: var(--burgundy-dark); }