/* ============================================================
   SKIET SOCIAL CRM — FUTURISTIC 2028 THEME
   High-level, premium light theme with glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Core Colors */
  --accent:        #6366f1;
  --accent-2:      #8b5cf6;
  --accent-3:      #06b6d4;
  --accent-glow:   rgba(99,102,241,0.15);
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  /* Light Theme */
  --bg:            #f0f2ff;
  --bg-2:          #e8eaf8;
  --card-bg:       #ffffff;
  --card-bg-2:     #f8f9ff;
  --sidebar-bg:    #0f0f23;
  --sidebar-text:  rgba(255,255,255,0.75);
  --sidebar-active:#6366f1;
  --topbar-bg:     rgba(255,255,255,0.85);
  --text:          #1a1a2e;
  --text-muted:    #6b7280;
  --border:        rgba(99,102,241,0.12);
  --border-2:      rgba(99,102,241,0.25);
  --shadow:        0 4px 24px rgba(99,102,241,0.08);
  --shadow-lg:     0 8px 40px rgba(99,102,241,0.15);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     24px;
}

[data-theme="dark"] {
  --bg:            #07071a;
  --bg-2:          #0d0d28;
  --card-bg:       #111128;
  --card-bg-2:     #16163a;
  --topbar-bg:     rgba(11,11,35,0.9);
  --text:          #e2e8f0;
  --text-muted:    #94a3b8;
  --border:        rgba(99,102,241,0.15);
  --border-2:      rgba(99,102,241,0.3);
  --shadow:        0 4px 24px rgba(0,0,0,0.3);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; opacity: 0.5; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: 240px;
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  left: 0; top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  border-right: 1px solid rgba(99,102,241,0.1);
  background-image: 
    radial-gradient(ellipse at 20% 0%, rgba(99,102,241,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.1) 0%, transparent 50%);
}

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-logo { display: flex; align-items: center; gap: 10px; }

.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.95rem; color: #fff; letter-spacing: 1px; }
.brand-sub  { font-size: 0.6rem; color: rgba(255,255,255,0.4); letter-spacing: 2px; text-transform: uppercase; }

.sidebar-toggle-btn {
  background: none; border: none; color: rgba(255,255,255,0.4);
  cursor: pointer; padding: 4px; font-size: 0.85rem;
  display: none;
}

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }

.nav-section-label {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 2px;
  color: rgba(255,255,255,0.25); text-transform: uppercase;
  padding: 12px 10px 6px; margin-top: 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--sidebar-text); text-decoration: none;
  font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s; position: relative;
  margin-bottom: 2px;
}
.nav-item i { width: 18px; text-align: center; font-size: 0.85rem; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.15));
  color: #fff;
  border: 1px solid rgba(99,102,241,0.3);
}
.nav-item.active i { color: var(--accent); }

.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 700; padding: 2px 6px;
  border-radius: 20px; min-width: 18px; text-align: center;
}

/* Sidebar user */
.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.03);
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.user-info { flex: 1; overflow: hidden; }
.user-name { display: block; font-size: 0.8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.4); }
.user-logout { color: rgba(255,255,255,0.3); font-size: 0.85rem; transition: color 0.2s; }
.user-logout:hover { color: var(--danger); }

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 999; backdrop-filter: blur(4px);
}

/* ---- MAIN LAYOUT ---- */
.main-wrapper {
  margin-left: 240px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ---- TOPBAR ---- */
.topbar {
  height: 60px; background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}

.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 6px; }

.topbar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem; display: none; padding: 8px;
}

.topbar-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--text); }

.topbar-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; transition: all 0.2s; position: relative;
}
.topbar-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.topbar-profile {
  width: 36px; height: 36px; border-radius: 10px;
  border: 2px solid var(--border); background: none;
  cursor: pointer; overflow: hidden; padding: 0;
  transition: border-color 0.2s;
}
.topbar-profile:hover { border-color: var(--accent); }
.tp-avatar {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; color: #fff;
}

/* IST Clock */
#istClock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--text-muted);
  background: var(--bg-2); padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  white-space: nowrap;
}

/* ---- PAGE CONTENT ---- */
.page-content { padding: 24px; flex: 1; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 0;
  line-height: 1.2;
}
.page-subtitle { color: var(--text-muted); font-size: 0.82rem; margin: 2px 0 0; }

/* ---- CARDS ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  font-weight: 600; font-size: 0.9rem;
}
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--card-bg-2); }

/* Glass card variant */
.card-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.8);
}
[data-theme="dark"] .card-glass {
  background: rgba(17,17,40,0.8);
  border-color: rgba(99,102,241,0.15);
}

/* ---- STAT CARDS ---- */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-card.stat-primary::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.stat-card.stat-success::before { background: linear-gradient(90deg, #10b981, #06b6d4); }
.stat-card.stat-warning::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.stat-card.stat-danger::before  { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.stat-card.stat-info::before    { background: linear-gradient(90deg, #3b82f6, #06b6d4); }

.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 12px;
}
.stat-primary .stat-icon { background: rgba(99,102,241,0.12); color: #6366f1; }
.stat-success .stat-icon { background: rgba(16,185,129,0.12); color: #10b981; }
.stat-warning .stat-icon { background: rgba(245,158,11,0.12); color: #f59e0b; }
.stat-danger  .stat-icon { background: rgba(239,68,68,0.12);  color: #ef4444; }
.stat-info    .stat-icon { background: rgba(59,130,246,0.12);  color: #3b82f6; }

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-change { font-size: 0.72rem; margin-top: 8px; font-weight: 600; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---- TABLES ---- */
.table { color: var(--text); font-size: 0.84rem; }
.table thead th {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding: 10px 16px;
  background: var(--card-bg-2); white-space: nowrap;
}
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--accent-glow); }
.table-hover tbody tr:hover { background: var(--accent-glow); }

/* ---- FORMS ---- */
.form-control, .form-select {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.85rem; padding: 9px 14px;
  transition: all 0.2s; font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-control:focus, .form-select:focus {
  background: var(--card-bg); border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12); outline: none; color: var(--text);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.input-group-text {
  background: var(--bg-2); border: 1.5px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem;
}

/* ---- BUTTONS ---- */
.btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600; font-size: 0.82rem;
  border-radius: var(--radius-sm); padding: 8px 18px;
  transition: all 0.2s; border: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); color: #fff; }
.btn-success { background: linear-gradient(135deg, #10b981, #06b6d4); color: #fff; }
.btn-success:hover { transform: translateY(-1px); color: #fff; }
.btn-danger  { background: linear-gradient(135deg, #ef4444, #f43f5e); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-info    { background: linear-gradient(135deg, #3b82f6, #06b6d4); color: #fff; }

.btn-outline-primary {
  border: 1.5px solid var(--accent); color: var(--accent);
  background: transparent;
}
.btn-outline-primary:hover { background: var(--accent-glow); color: var(--accent); }

.btn-outline-secondary {
  border: 1.5px solid var(--border); color: var(--text-muted);
  background: transparent;
}
.btn-outline-secondary:hover { background: var(--bg-2); color: var(--text); }

.btn-outline-danger { border: 1.5px solid var(--danger); color: var(--danger); background: transparent; }
.btn-outline-danger:hover { background: rgba(239,68,68,0.08); }

.btn-sm  { padding: 5px 12px; font-size: 0.77rem; }
.btn-xs  { padding: 3px 8px;  font-size: 0.72rem; }
.btn-lg  { padding: 12px 28px; font-size: 0.9rem; }

/* ---- BADGES ---- */
.badge {
  font-size: 0.68rem; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; letter-spacing: 0.3px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.bg-primary   { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; }
.bg-success   { background: linear-gradient(135deg, #10b981, #059669) !important; }
.bg-danger    { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.bg-warning   { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.bg-info      { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; }
.bg-secondary { background: rgba(107,114,128,0.15) !important; color: #6b7280 !important; }
.bg-light     { background: var(--bg-2) !important; color: var(--text-muted) !important; }

/* ---- ALERTS ---- */
.alert {
  border-radius: var(--radius-sm); padding: 12px 18px;
  border: 1px solid; font-size: 0.84rem;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); color: #059669; }
.alert-danger  { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); color: #dc2626; }
.alert-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); color: #d97706; }
.alert-info    { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.25); color: #2563eb; }

/* ---- MODALS ---- */
.modal-content {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 24px; }
.modal-body   { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border); padding: 16px 24px; }
.modal-title  { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.btn-close    { filter: none; opacity: 0.5; }
.btn-close:hover { opacity: 1; }

/* ---- DROPDOWNS ---- */
.dropdown-menu {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 6px; font-size: 0.83rem;
}
.dropdown-item {
  border-radius: 8px; padding: 8px 12px; color: var(--text);
  transition: all 0.15s; font-weight: 500;
}
.dropdown-item:hover { background: var(--accent-glow); color: var(--accent); }
.dropdown-divider { border-color: var(--border); margin: 4px 0; }
.dropdown-header { color: var(--text-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* Notification dropdown */
.notif-btn { position: relative; }
.notif-dropdown { width: 320px; padding: 0; }
.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.85rem; }
.notif-view-all { font-size: 0.75rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: var(--accent-glow); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item-title { font-weight: 600; font-size: 0.82rem; color: var(--text); margin-bottom: 2px; }
.notif-item-msg   { font-size: 0.75rem; color: var(--text-muted); }
.notif-item-time  { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.notif-loading    { text-align: center; padding: 20px; color: var(--text-muted); }

/* Profile menu */
.profile-menu { width: 220px; }
.profile-info strong { font-size: 0.85rem; color: var(--text); display: block; }

/* Quick add menu */
.quick-add-menu { width: 200px; }

/* ---- PROGRESS BARS ---- */
.progress {
  background: var(--bg-2); border-radius: 20px; overflow: hidden;
}
.progress-bar {
  border-radius: 20px; transition: width 1s ease;
}
.bg-primary.progress-bar { background: linear-gradient(90deg, #6366f1, #8b5cf6) !important; }
.bg-success.progress-bar { background: linear-gradient(90deg, #10b981, #06b6d4) !important; }
.bg-warning.progress-bar { background: linear-gradient(90deg, #f59e0b, #d97706) !important; }
.bg-danger.progress-bar  { background: linear-gradient(90deg, #ef4444, #f43f5e) !important; }

/* ---- PAGINATION ---- */
.pagination { gap: 4px; }
.page-link {
  border-radius: 8px !important; border: 1px solid var(--border);
  color: var(--text); background: var(--card-bg);
  font-size: 0.8rem; padding: 5px 11px;
  transition: all 0.2s;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.page-item.active .page-link { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; }
.page-item.disabled .page-link { opacity: 0.4; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3rem; color: var(--border); margin-bottom: 16px; opacity: 0.5; }

/* ---- TIMELINE ---- */
.timeline { position: relative; }
.timeline::before { content:''; position:absolute; left:16px; top:0; bottom:0; width:2px; background:var(--border); }
.timeline-item { display:flex; gap:16px; padding-bottom:20px; position:relative; }
.timeline-dot { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:0.75rem; position:relative; z-index:1; }
.timeline-content { flex:1; padding-top:4px; }
.timeline-title { font-weight:600; font-size:0.85rem; }
.timeline-time { font-size:0.72rem; color:var(--text-muted); }

/* ---- KPI WIDGETS ---- */
.kpi-widget {
  background: linear-gradient(135deg, var(--card-bg), var(--card-bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
}
.kpi-widget::after {
  content: ''; position: absolute;
  right: -20px; bottom: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--accent-glow);
}

/* ---- LOGIN PAGE ---- */
.login-wrapper {
  min-height: 100vh; display: flex;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f0f23 100%);
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(139,92,246,0.1) 0%, transparent 60%);
  position: relative; overflow: hidden;
}
.login-wrapper::before {
  content: ''; position: absolute; inset: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(99,102,241,0.03) 60px, rgba(99,102,241,0.03) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(99,102,241,0.03) 60px, rgba(99,102,241,0.03) 61px);
}
.login-left { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; }
.login-right { width: 480px; background: rgba(255,255,255,0.97); display: flex; align-items: center; justify-content: center; padding: 48px; }
[data-theme="dark"] .login-right { background: rgba(17,17,40,0.97); }
.login-brand { margin-bottom: 40px; text-align: center; }
.login-brand-icon { width: 64px; height: 64px; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; margin: 0 auto 16px; box-shadow: 0 10px 30px rgba(99,102,241,0.4); }
.login-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--text); }
.login-subtitle { color: var(--text-muted); font-size: 0.85rem; }
.login-form-wrapper { width: 100%; max-width: 380px; }

/* ---- CHARTS ---- */
canvas { max-width: 100%; }

/* ---- AVATAR ---- */
.avatar-xs { width:28px; height:28px; border-radius:8px; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:0.7rem; flex-shrink:0; }
.avatar-sm { width:36px; height:36px; border-radius:10px; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:0.8rem; flex-shrink:0; }
.avatar-md { width:44px; height:44px; border-radius:12px; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:0.9rem; flex-shrink:0; }
.avatar-lg { width:60px; height:60px; border-radius:16px; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1.1rem; flex-shrink:0; }
.avatar-circle { width:44px; height:44px; border-radius:50%; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:0.9rem; flex-shrink:0; }

/* ---- ONLINE DOT ---- */
.online-dot { width:10px; height:10px; border-radius:50%; background:#22c55e; border:2px solid var(--card-bg); }
.offline-dot { width:10px; height:10px; border-radius:50%; background:#6b7280; border:2px solid var(--card-bg); }

/* ---- LEADERBOARD ---- */
.leaderboard-rank { font-size:1.4rem; width:40px; text-align:center; flex-shrink:0; }

/* ---- PULSE ANIMATION ---- */
.pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.glow { box-shadow: 0 0 20px var(--accent-glow); }

/* ---- BREADCRUMB ---- */
.breadcrumb { font-size: 0.78rem; }
.breadcrumb-item a { color: var(--accent); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ---- LIST GROUP ---- */
.list-group-item {
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text); font-size: 0.84rem; padding: 10px 16px;
  transition: all 0.15s;
}
.list-group-item.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.list-group-item:hover:not(.active) { background: var(--bg-2); }

/* ---- NAV TABS ---- */
.nav-tabs { border-bottom: 1px solid var(--border); gap: 4px; }
.nav-tabs .nav-link {
  color: var(--text-muted); border: none; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 8px 16px; font-size: 0.83rem; font-weight: 600;
  transition: all 0.2s;
}
.nav-tabs .nav-link:hover { color: var(--text); }
.nav-tabs .nav-link.active { color: var(--accent); border-bottom-color: var(--accent); background: none; }

/* ---- CHAT ---- */
.chat-bubble-mine { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-radius: 16px 16px 4px 16px; }
.chat-bubble-theirs { background: var(--card-bg-2); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; }

/* ---- NOTIFICATION POPUP ---- */
#notifPopup {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  max-width: 340px; min-width: 280px;
}
.notif-popup-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--accent);
  padding: 16px; animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
}
.notif-popup-card.urgent { border-left-color: var(--danger); }
.notif-popup-card.success { border-left-color: var(--success); }
.notif-popup-card.chat { border-left-color: #10b981; }
@keyframes slideInRight { from{transform:translateX(120%);opacity:0} to{transform:translateX(0);opacity:1} }

/* ---- HOURLY POPUP ---- */
.hourly-popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px); z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.hourly-popup-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 32px; max-width: 420px; width: 90%;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  text-align: center;
  background-image: radial-gradient(ellipse at top, var(--accent-glow) 0%, transparent 70%);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .sidebar-toggle-btn { display: flex; }
  .topbar-toggle { display: flex; }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 16px; }
  .login-left { display: none; }
  .login-right { width: 100%; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 576px) {
  .stat-card { padding: 16px; }
  .stat-value { font-size: 1.4rem; }
}

/* ---- UTILITIES ---- */
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-heading { font-family: 'Space Grotesk', sans-serif; }
.text-gradient { background: linear-gradient(135deg, #6366f1, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.border-accent { border-color: var(--accent) !important; }
.bg-accent-glow { background: var(--accent-glow); }
.rounded-xl { border-radius: var(--radius) !important; }
.shadow-glow { box-shadow: 0 0 30px rgba(99,102,241,0.2); }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* Table responsive */
.table-responsive { border-radius: var(--radius); overflow: hidden; }

/* Sticky top cards */
.sticky-top { position: sticky; }

/* Select2 like */
select option { background: var(--card-bg); color: var(--text); }

