/* assets/css/main.css */

/* ===== GOOGLE FONT IMPORT (Trebuchet MS fallback stack) ===== */
/* Trebuchet MS is a system font — no import needed.           */
/* We define a consistent stack everywhere below.              */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --secondary: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #1E293B;
  --bg-sidebar-hover: #334155;
  --bg-input: #FFFFFF;

  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-sidebar: #CBD5E1;
  --text-sidebar-active: #FFFFFF;

  --border: #E2E8F0;
  --border-input: #CBD5E1;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
  --sidebar-width: 260px;
  --topbar-height: 64px;

  /* Trebuchet MS font stack — used as the single source of truth */
  --font: 'Trebuchet MS', 'Trebuchet', 'Gill Sans MT', 'Gill Sans', Calibri, sans-serif;
  /* Monospace stays separate for code/refs */
  --font-mono: 'Courier New', Courier, monospace;
}

/* DARK THEME */
[data-theme="dark"] {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-sidebar: #0F172A;
  --bg-sidebar-hover: #1E293B;
  --bg-input: #1E293B;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border: #334155;
  --border-input: #475569;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;           /* Trebuchet reads best slightly larger */
  transition: background 0.3s, color 0.3s;
}

/* Apply Trebuchet MS everywhere it could be overridden */
input, textarea, select, button {
  font-family: var(--font);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== HEADINGS — Trebuchet looks great at display sizes ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

/* ===== LAYOUT ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 17px;
  font-family: var(--font);
}
.sidebar-logo .logo-text {
  color: white; font-size: 21px; font-weight: 700;
  font-family: var(--font); letter-spacing: 0.5px;
}
.sidebar-logo .logo-badge {
  font-size: 10px; color: var(--primary-light);
  background: rgba(79,70,229,0.2);
  padding: 2px 6px; border-radius: 4px;
  margin-left: 4px;
  font-family: var(--font);
}

.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-section { padding: 0 16px; margin-bottom: 8px; }
.nav-section-title {
  font-size: 10px; font-weight: 700; color: var(--text-light);
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 8px 8px 4px;
  font-family: var(--font);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-sidebar); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  margin-bottom: 2px;
  font-family: var(--font);
  letter-spacing: 0.1px;
}
.nav-item:hover, .nav-item.active {
  background: var(--bg-sidebar-hover);
  color: var(--text-sidebar-active);
  text-decoration: none;
}
.nav-item.active { background: var(--primary); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto;
  background: var(--danger); color: white;
  font-size: 10px; padding: 1px 6px; border-radius: 20px;
  font-family: var(--font);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title {
  font-size: 19px; font-weight: 700; flex: 1;
  font-family: var(--font); letter-spacing: -0.2px;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.page-content { padding: 24px; flex: 1; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
  outline: none;
}
.theme-toggle.dark { background: var(--primary); }
.theme-toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.theme-toggle.dark::after { transform: translateX(20px); }
.theme-toggle-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  font-family: var(--font);
}
.theme-icon { font-size: 16px; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px; font-weight: 700;
  font-family: var(--font); letter-spacing: -0.1px;
}

/* ===== STATS CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-icon.blue   { background: #EFF6FF; color: #3B82F6; }
.stat-icon.green  { background: #F0FDF4; color: #10B981; }
.stat-icon.orange { background: #FFFBEB; color: #F59E0B; }
.stat-icon.purple { background: #F5F3FF; color: #8B5CF6; }
.stat-icon.red    { background: #FEF2F2; color: #EF4444; }
[data-theme="dark"] .stat-icon.blue   { background: rgba(59,130,246,0.15); }
[data-theme="dark"] .stat-icon.green  { background: rgba(16,185,129,0.15); }
[data-theme="dark"] .stat-icon.orange { background: rgba(245,158,11,0.15); }
[data-theme="dark"] .stat-icon.purple { background: rgba(139,92,246,0.15); }
[data-theme="dark"] .stat-icon.red    { background: rgba(239,68,68,0.15); }

.stat-value {
  font-size: 27px; font-weight: 700; line-height: 1;
  font-family: var(--font); letter-spacing: -0.5px;
}
.stat-label {
  font-size: 13px; color: var(--text-muted); margin-top: 2px;
  font-family: var(--font);
}
.stat-change {
  font-size: 12px; color: var(--secondary); margin-top: 4px;
  font-family: var(--font);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.2px;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; text-decoration: none; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); text-decoration: none; }
.btn-success { background: var(--secondary); color: white; }
.btn-success:hover { background: #059669; color: white; text-decoration: none; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; color: white; text-decoration: none; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 14px; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
  font-family: var(--font);
}
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text);
  background: var(--bg-input);
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-family: var(--font); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; font-family: var(--font); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* Code/monospace inside tables stays monospaced */
td code, th code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  font-family: var(--font);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-primary { background: #EEF2FF; color: var(--primary); }
.badge-success { background: #F0FDF4; color: #059669; }
.badge-warning { background: #FFFBEB; color: #D97706; }
.badge-danger  { background: #FEF2F2; color: #DC2626; }
.badge-info    { background: #EFF6FF; color: #2563EB; }
.badge-gray    { background: var(--bg); color: var(--text-muted); }
[data-theme="dark"] .badge-primary { background: rgba(79,70,229,0.2); }
[data-theme="dark"] .badge-success { background: rgba(16,185,129,0.2); color: #34D399; }
[data-theme="dark"] .badge-warning { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .badge-danger  { background: rgba(239,68,68,0.2); color: #F87171; }
[data-theme="dark"] .badge-gray    { background: rgba(255,255,255,0.08); }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px;
  font-family: var(--font);
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: #F0FDF4; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger  { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.1); color: #6EE7B7; border-color: rgba(16,185,129,0.3); }
[data-theme="dark"] .alert-danger  { background: rgba(239,68,68,0.1); color: #FCA5A5; border-color: rgba(239,68,68,0.3); }

/* ===== PROJECT CARDS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.project-card-cover {
  height: 140px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden; position: relative;
}
.project-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-card-body { padding: 16px; }
.project-card-category {
  font-size: 11px; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 6px; font-family: var(--font);
}
.project-card-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 8px; color: var(--text);
  font-family: var(--font);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-abstract {
  font-size: 13px; color: var(--text-muted);
  font-family: var(--font);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 12px;
}
.project-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-light);
  font-family: var(--font);
}
.project-card-price {
  font-size: 17px; font-weight: 700; color: var(--secondary);
  font-family: var(--font);
}
.project-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header {
  padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title {
  font-size: 18px; font-weight: 700;
  font-family: var(--font); letter-spacing: -0.2px;
}
.modal-close {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--text-muted);
}
.modal-body { padding: 20px 24px; font-family: var(--font); }
.modal-footer { padding: 0 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ===== AUTH PAGES ===== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
}
.auth-left {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; color: white; text-align: center;
}
.auth-left h1 {
  font-size: 44px; font-weight: 800; margin-bottom: 16px;
  font-family: var(--font); letter-spacing: -0.5px;
}
.auth-left p { font-size: 18px; opacity: 0.9; max-width: 400px; font-family: var(--font); }
.auth-features { margin-top: 40px; text-align: left; display: flex; flex-direction: column; gap: 16px; }
.auth-feature { display: flex; align-items: center; gap: 12px; font-size: 15px; font-family: var(--font); }
.auth-feature-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.auth-right {
  width: 480px;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo .name {
  font-size: 30px; font-weight: 800; color: var(--primary);
  font-family: var(--font); letter-spacing: 0.5px;
}
.auth-logo .tagline { font-size: 13px; color: var(--text-muted); font-family: var(--font); }
.auth-title {
  font-size: 23px; font-weight: 700; margin-bottom: 4px;
  font-family: var(--font); letter-spacing: -0.3px;
}
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; font-family: var(--font); }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); font-family: var(--font); }
.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.role-option {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; cursor: pointer; text-align: center; transition: var(--transition);
}
.role-option:hover, .role-option.selected { border-color: var(--primary); background: #EEF2FF; }
.role-option .role-icon { font-size: 24px; margin-bottom: 6px; }
.role-option .role-name { font-size: 14px; font-weight: 700; font-family: var(--font); }
.role-option .role-desc { font-size: 11px; color: var(--text-muted); font-family: var(--font); }
[data-theme="dark"] .role-option:hover,
[data-theme="dark"] .role-option.selected { background: rgba(79,70,229,0.15); }

/* ===== PUBLIC / LANDING ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 64px;
  display: flex; align-items: center; gap: 24px;
}
.navbar-brand {
  font-size: 23px; font-weight: 800; color: var(--primary);
  font-family: var(--font); letter-spacing: 0.3px;
}
.navbar-links { display: flex; gap: 20px; flex: 1; margin-left: 20px; }
.navbar-links a {
  font-size: 14px; color: var(--text-muted); font-weight: 600;
  font-family: var(--font);
}
.navbar-links a:hover { color: var(--primary); text-decoration: none; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }

.hero {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
  padding: 80px 40px;
  text-align: center;
  color: white;
}
.hero h1 {
  font-size: 54px; font-weight: 800; line-height: 1.1; margin-bottom: 20px;
  font-family: var(--font); letter-spacing: -1px;
}
.hero p {
  font-size: 20px; opacity: 0.9; max-width: 600px;
  margin: 0 auto 36px; font-family: var(--font);
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.search-bar {
  display: flex; max-width: 600px; margin: 40px auto 0;
  background: white; border-radius: 50px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-bar input {
  flex: 1; padding: 14px 20px; border: none; outline: none;
  font-size: 15px; color: #1e293b; font-family: var(--font);
}
.search-bar button {
  padding: 14px 28px; background: var(--primary); color: white;
  border: none; cursor: pointer; font-size: 15px; font-weight: 700;
  font-family: var(--font);
}
.section { padding: 60px 40px; }
.section-title {
  font-size: 29px; font-weight: 700; margin-bottom: 8px;
  font-family: var(--font); letter-spacing: -0.4px;
}
.section-sub { color: var(--text-muted); margin-bottom: 32px; font-family: var(--font); }
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px;
}
.category-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  cursor: pointer; transition: var(--transition);
}
.category-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.category-icon { font-size: 32px; margin-bottom: 8px; }
.category-name { font-size: 13px; font-weight: 700; color: var(--text); font-family: var(--font); }
.category-count { font-size: 11px; color: var(--text-muted); font-family: var(--font); }

/* ===== NOTIFICATION BELL ===== */
.notif-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px;
}
.notif-badge {
  position: absolute; top: 0; right: 0;
  background: var(--danger); color: white;
  font-size: 9px; width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font);
}
.notif-dropdown {
  position: absolute; top: 48px; right: 0;
  width: 320px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 200;
  display: none;
}
.notif-dropdown.open { display: block; }
.notif-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; font-family: var(--font);
}
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #EEF2FF; }
[data-theme="dark"] .notif-item.unread { background: rgba(79,70,229,0.1); }
.notif-item-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; font-family: var(--font); }
.notif-item-msg { font-size: 12px; color: var(--text-muted); font-family: var(--font); }
.notif-item-time { font-size: 11px; color: var(--text-light); margin-top: 4px; font-family: var(--font); }

/* ===== SEARCH BAR (topbar) ===== */
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-input-wrap input {
  padding: 8px 14px 8px 36px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 13px; color: var(--text); outline: none; width: 200px;
  font-family: var(--font);
  transition: width 0.2s;
}
.search-input-wrap input:focus { width: 280px; border-color: var(--primary); }
.search-input-wrap .search-icon {
  position: absolute; left: 10px; color: var(--text-muted); font-size: 16px;
}

/* ===== UPLOAD ===== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px; text-align: center;
  cursor: pointer; transition: var(--transition);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: #EEF2FF; }
.upload-zone-icon { font-size: 36px; margin-bottom: 8px; }
.upload-zone-text { font-size: 14px; color: var(--text-muted); font-family: var(--font); }
.upload-zone-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; font-family: var(--font); }

/* ===== AVATAR ===== */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 15px;
  font-family: var(--font);
}

/* ===== TABS ===== */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
  transition: var(--transition); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 24px; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: var(--font);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.page-btn:hover { background: var(--primary); color: white; border-color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .hero h1 { font-size: 34px; }
  .section { padding: 40px 20px; }
  .navbar { padding: 0 20px; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ===== MISC UTILITIES ===== */
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--danger); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.w-full { width: 100%; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; font-family: var(--font);
}

/* Progress bar */
.progress { background: var(--border); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); transition: width 0.3s; }

/* Star rating */
.stars { color: #F59E0B; font-size: 16px; letter-spacing: 1px; }

/* Toast notifications */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px; z-index: 9999;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-lg); min-width: 280px;
  display: flex; align-items: center; gap: 10px;
  animation: slideInRight 0.3s ease;
  font-size: 14px; font-family: var(--font);
}
.toast.success { border-left: 4px solid var(--secondary); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 24px; cursor: pointer; color: var(--text);
}
@media (max-width: 768px) { .mobile-menu-btn { display: block; } }