/* ═══════════════════════════════════════════════════════
   ACP Robot Club — Modern Design System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99,102,241,0.1);
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16,185,129,0.1);
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;
  --info: #3b82f6;
  --dark: #0f172a;
  --darker: #020617;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active: rgba(99,102,241,0.15);
  --body-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.06);
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--body-bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

a { text-decoration: none; transition: color var(--transition); }

::selection { background: var(--primary); color: #fff; }

/* ─── ANIMATIONS ─────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── SCROLL TO TOP ──────────────────────────────── */
.scroll-top-btn {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px);
  transition: all var(--transition);
  pointer-events: none;
}
.scroll-top-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-xl); }

/* ─── BUTTONS ────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.875rem;
  border-radius: var(--radius-sm); padding: 0.5rem 1.125rem;
  transition: all var(--transition); border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
  line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); color: #fff; }
.btn-outline-primary { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { border: 1.5px solid var(--border); color: var(--text-muted); background: transparent; }
.btn-outline-secondary:hover { background: var(--body-bg); border-color: var(--text-muted); color: var(--text); }
.btn-outline-danger { border: 1.5px solid var(--danger); color: var(--danger); background: transparent; }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,0.3); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-sm { padding: 0.35rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }

/* ─── FORMS ──────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem; font-size: 0.9rem;
  transition: all var(--transition); background: var(--card-bg); color: var(--text);
  font-family: 'Inter', sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}
.form-control::placeholder { color: var(--text-light); }
.form-label { font-weight: 500; font-size: 0.85rem; color: var(--text); margin-bottom: 0.375rem; }
.form-text { font-size: 0.8rem; color: var(--text-muted); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--primary-light); }

/* ─── CARDS ──────────────────────────────────────── */
.card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  background: transparent; border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem; font-weight: 600; font-size: 0.95rem;
}

/* ─── TABLES ─────────────────────────────────────── */
.table { color: var(--text); }
.table thead th {
  background: var(--body-bg); border-bottom: 2px solid var(--border);
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); padding: 0.75rem;
}
.table td { padding: 0.75rem; vertical-align: middle; border-color: var(--border); }
.table-hover tbody tr { transition: background var(--transition); }
.table-hover tbody tr:hover { background: var(--primary-light); }

/* ─── BADGES ─────────────────────────────────────── */
.badge { font-weight: 500; font-size: 0.75rem; padding: 0.3em 0.7em; border-radius: 6px; }
.badge-present { background: rgba(16,185,129,0.12); color: #059669; }
.badge-absent { background: rgba(239,68,68,0.12); color: #dc2626; }
.badge-late { background: rgba(245,158,11,0.12); color: #d97706; }
.badge-excused { background: rgba(100,116,139,0.12); color: #475569; }
.badge-accent { background: rgba(16,185,129,0.12); color: #059669; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.bg-accent { background: var(--accent) !important; }

/* ─── ALERTS / TOASTS ────────────────────────────── */
.alert { border: none; border-radius: var(--radius-sm); font-size: 0.9rem; padding: 0.875rem 1.125rem; animation: slideDown 0.3s ease; }
.alert-success { background: rgba(16,185,129,0.1); color: #065f46; border-left: 4px solid var(--accent); }
.alert-danger { background: rgba(239,68,68,0.1); color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: rgba(245,158,11,0.1); color: #92400e; border-left: 4px solid var(--warning); }
.alert-info { background: rgba(59,130,246,0.1); color: #1e40af; border-left: 4px solid var(--info); }

/* ═══════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(99,102,241,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(16,185,129,0.1) 0%, transparent 50%);
}
.login-card {
  width: 100%; max-width: 420px; border: none; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); position: relative; z-index: 1;
}
.login-card .card-body { padding: 2.5rem; }
.login-logo { font-size: 2rem; font-weight: 800; color: var(--dark); }
.login-logo span { color: var(--primary); }

/* ═══════════════════════════════════════════════════
   LANDING PAGE — NAVBAR
   ═══════════════════════════════════════════════════ */
.landing-nav {
  background: rgba(15,23,42,0.85); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition-slow);
}
.landing-nav.scrolled {
  background: rgba(15,23,42,0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  padding: 0.5rem 0;
}
.landing-nav .navbar-brand {
  font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: -0.02em;
}
.landing-nav .brand-accent { color: var(--accent); }
.landing-nav .nav-link {
  color: rgba(255,255,255,0.7); font-weight: 500; font-size: 0.9rem;
  padding: 0.5rem 0.875rem !important; border-radius: var(--radius-sm);
  transition: all var(--transition); position: relative;
}
.landing-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.landing-nav .nav-link.active { color: var(--accent); }
.landing-nav .navbar-toggler { outline: none; box-shadow: none; }
.landing-nav .navbar-toggler:focus { box-shadow: none; }

/* ═══════════════════════════════════════════════════
   LANDING PAGE — HERO
   ═══════════════════════════════════════════════════ */
.hero-section {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(30,27,75,0.88)),
              url('/static/img/hero-bg.jpg') center/cover no-repeat;
  color: #fff; padding-top: 80px; position: relative; overflow: hidden;
}
.hero-section::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 100px;
  background: linear-gradient(to top, var(--body-bg), transparent);
}
.hero-section h1 {
  font-size: 4rem; font-weight: 900; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 1.25rem;
}
.hero-section h1 .accent { color: var(--accent); }
.hero-section .lead {
  font-size: 1.2rem; font-weight: 400; color: rgba(255,255,255,0.75);
  line-height: 1.7; max-width: 540px;
}
.hero-section .tagline {
  font-size: 1rem; color: rgba(255,255,255,0.5); margin-top: 0.75rem;
  font-weight: 400;
}
.hero-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

/* ═══════════════════════════════════════════════════
   LANDING PAGE — SECTIONS
   ═══════════════════════════════════════════════════ */
.section-title {
  font-weight: 800; font-size: 2rem; letter-spacing: -0.02em;
  position: relative; display: inline-block; margin-bottom: 0.75rem;
}
.section-title::after {
  content: ''; display: block; width: 48px; height: 4px;
  background: var(--accent); border-radius: 2px; margin-top: 0.5rem;
}
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; }
.section-title-white { color: #fff; }
.section-title-white::after { background: var(--accent); }

.about-section { padding: 6rem 0; }
.programs-section {
  padding: 6rem 0; background: var(--dark); color: #fff;
}
.program-card {
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: var(--radius) !important; background: rgba(255,255,255,0.04) !important;
  transition: all var(--transition-slow); overflow: hidden;
}
.program-card:hover {
  transform: translateY(-6px); border-color: rgba(16,185,129,0.3) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3); background: rgba(255,255,255,0.07) !important;
}
.program-card .card-body { padding: 1.75rem; }
.program-card .card-title { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.program-card .text-white-50 { color: rgba(255,255,255,0.5) !important; font-size: 0.9rem; }

.announcements-section { padding: 6rem 0; }
.announcement-card {
  border: none; border-left: 4px solid var(--primary);
  border-radius: var(--radius) !important; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.announcement-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.announcement-card .pinned-badge {
  background: var(--accent); color: #fff; font-size: 0.7rem;
  padding: 2px 10px; border-radius: 20px; font-weight: 600;
}

.gallery-section { padding: 6rem 0; background: #f8fafc; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  position: relative; cursor: pointer; box-shadow: var(--shadow);
  transition: all var(--transition-slow);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff; padding: 1.25rem 1rem 1rem; font-size: 0.9rem;
  transform: translateY(4px); opacity: 0;
  transition: all var(--transition);
}
.gallery-item:hover .caption { transform: translateY(0); opacity: 1; }

.contact-section { padding: 6rem 0; }
.contact-info-card {
  border: none; border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important; transition: all var(--transition);
}
.contact-info-card:hover { box-shadow: var(--shadow-lg) !important; }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-child { border-bottom: none; }
.contact-item i {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-sm); flex-shrink: 0; font-size: 1rem;
}
.contact-item strong { font-size: 0.85rem; color: var(--text); }
.contact-item p { font-size: 0.9rem; margin: 0.125rem 0 0; }

.landing-footer {
  background: var(--dark); color: rgba(255,255,255,0.5);
  padding: 2rem 0; text-align: center; font-size: 0.9rem;
}
.landing-footer a { color: rgba(255,255,255,0.5); }
.landing-footer a:hover { color: var(--accent); }

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

/* Sidebar */
.sidebar {
  width: 260px; background: var(--sidebar-bg); color: var(--sidebar-text);
  position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto;
  z-index: 100; transition: transform var(--transition-slow);
  border-right: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.sidebar-brand {
  padding: 1.25rem 1.5rem; font-size: 1.15rem; font-weight: 800;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-brand span { color: var(--accent); }
.sidebar-brand i { color: var(--accent); font-size: 1.3rem; }
.sidebar-menu { list-style: none; padding: 0.5rem 0; margin: 0; }
.sidebar-menu .menu-label {
  padding: 1.25rem 1.5rem 0.375rem; font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.25);
}
.sidebar-menu a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1.5rem; color: var(--sidebar-text);
  text-decoration: none; font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition); border-left: 3px solid transparent;
  border-radius: 0;
}
.sidebar-menu a:hover {
  color: #fff; background: var(--sidebar-hover);
  border-left-color: rgba(255,255,255,0.1);
}
.sidebar-menu a.active {
  color: #fff; background: var(--sidebar-active);
  border-left-color: var(--primary);
}
.sidebar-menu a i { width: 20px; text-align: center; font-size: 1rem; }

/* Main Content */
.main-content { margin-left: 260px; flex: 1; min-height: 100vh; }

/* Top Bar */
.top-bar {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.top-bar .page-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }

.content-area { padding: 1.5rem; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 99; backdrop-filter: blur(4px); transition: opacity var(--transition);
}
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════════
   DASHBOARD STATS
   ═══════════════════════════════════════════════════ */
.stat-card {
  border: none; border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important; transition: all var(--transition);
  overflow: hidden; position: relative;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg) !important; }
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.stat-card .stat-value {
  font-size: 1.75rem; font-weight: 800; color: var(--dark);
  letter-spacing: -0.02em;
}
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════
   DASHBOARD CARDS
   ═══════════════════════════════════════════════════ */
.dashboard-card {
  border: none; border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important; overflow: hidden;
}
.dashboard-card .card-header {
  background: transparent; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 0.95rem; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.dashboard-card .card-body { padding: 1.25rem; }

/* ═══════════════════════════════════════════════════
   PROGRESS BAR (GRADES)
   ═══════════════════════════════════════════════════ */
.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.progress-bar { border-radius: 4px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-bar.score-high { background: linear-gradient(90deg, #10b981, #059669); }
.progress-bar.score-mid { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-bar.score-low { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* ═══════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════ */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff; flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.8rem; }
.avatar-primary { background: linear-gradient(135deg, var(--primary), #818cf8); }
.avatar-accent { background: linear-gradient(135deg, var(--accent), #34d399); }
.avatar-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.avatar-danger { background: linear-gradient(135deg, #ef4444, #f87171); }

/* ═══════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 3rem 1.5rem; color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h5 { font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; max-width: 360px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem;
}
.page-header h4 { font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.page-header .breadcrumb { margin: 0; font-size: 0.8rem; }
.page-header .breadcrumb-item a { color: var(--primary); }

/* ═══════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════ */
.filter-bar {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════
   SETUP PAGE
   ═══════════════════════════════════════════════════ */
.setup-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  padding: 2rem;
}
.setup-card {
  width: 100%; max-width: 560px; border: none; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.setup-card .card-body { padding: 2.5rem; }

/* ═══════════════════════════════════════════════════
   ERROR PAGE
   ═══════════════════════════════════════════════════ */
.error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; background: var(--body-bg);
}
.error-page .error-code {
  font-size: 8rem; font-weight: 900; color: var(--border);
  line-height: 1; letter-spacing: -0.05em;
}

/* ═══════════════════════════════════════════════════
   DETAIL PAGE
   ═══════════════════════════════════════════════════ */
.detail-header {
  display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem;
}
.detail-header .info h4 { font-weight: 700; margin: 0; }
.detail-header .info p { color: var(--text-muted); margin: 0; font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hero-section h1 { font-size: 2.5rem; }
  .hero-section .lead { font-size: 1.05rem; }
  .section-title { font-size: 1.65rem; }
}
@media (max-width: 767.98px) {
  .hero-section h1 { font-size: 2rem; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .stat-card .stat-value { font-size: 1.4rem; }
  .content-area { padding: 1rem; }
  .top-bar { padding: 0.625rem 1rem; }
}
@media (max-width: 575.98px) {
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
}

/* ─── UTILITY ────────────────────────────────────── */
.text-accent { color: var(--accent) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-400 { font-weight: 400; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }

/* ─── COLLABORATION ──────────────────────────────── */
.collab-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 991.98px) {
  .collab-layout {
    grid-template-columns: 1fr;
  }
}

.card-hover {
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid var(--card-border);
}
.card-hover:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99,102,241,0.1);
  transform: translateY(-2px);
}

/* Chat */
.collab-chat .card {
  border: 1px solid var(--card-border);
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.chat-msg-self {
  flex-direction: row-reverse;
}
.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.chat-msg-body {
  max-width: 280px;
  min-width: 0;
}
.chat-msg-self .chat-msg-body {
  text-align: right;
}
.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.chat-msg-self .chat-msg-header {
  flex-direction: row-reverse;
}
.chat-msg-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}
.chat-msg-time {
  font-size: 0.65rem;
  color: var(--text-light);
}
.chat-msg-text {
  font-size: 0.85rem;
  line-height: 1.45;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--body-bg);
  color: var(--text);
  word-wrap: break-word;
}
.chat-msg-self .chat-msg-text {
  background: var(--primary);
  color: #fff;
}

/* Post card */
.post-card .card-body {
  transition: background var(--transition);
}
.post-card .card-body:hover {
  background: rgba(99,102,241,0.02);
}

.min-w-0 { min-width: 0; }
