/* ============================================
   LeadFlow CRM - Main Stylesheet
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --dark: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }

/* ============ APP WRAPPER ============ */
.app-wrapper { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    overflow: hidden;
}

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

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px;
    flex-shrink: 0;
}
.brand-name { color: white; font-weight: 700; font-size: 15px; display: block; }
.brand-sub { color: rgba(255,255,255,.45); font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

.sidebar-toggle {
    background: rgba(255,255,255,.08);
    border: none; color: white;
    width: 30px; height: 30px;
    border-radius: 6px;
    cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,.15); }

.user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}
.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.user-name { color: white; font-size: 13px; font-weight: 600; display: block; }
.user-role-badge {
    background: rgba(99,102,241,.35);
    color: #a5b4fc;
    font-size: 10px; font-weight: 600;
    padding: 1px 7px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .5px;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-section-title {
    color: rgba(255,255,255,.3);
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    padding: 12px 8px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 13.5px; font-weight: 500;
    transition: var(--transition);
    position: relative;
    margin-bottom: 2px;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(99,102,241,.4);
}
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.logout-btn { color: rgba(255,255,255,.5) !important; }
.logout-btn:hover { background: rgba(239,68,68,.2) !important; color: #fca5a5 !important; }

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

/* ============ TOPBAR ============ */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.mobile-toggle { display: none; background: none; border: none; font-size: 18px; color: var(--gray-600); cursor: pointer; }
.page-title h1 { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.breadcrumb-nav { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-500); }
.breadcrumb-nav a { color: var(--primary); text-decoration: none; }
.breadcrumb-nav span { color: var(--gray-400); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 7px 14px;
    transition: var(--transition);
}
.topbar-search:focus-within { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.topbar-search i { color: var(--gray-400); font-size: 13px; }
.topbar-search input { border: none; background: none; outline: none; font-size: 13px; width: 180px; color: var(--gray-700); }

.notif-btn {
    width: 38px; height: 38px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
    color: var(--gray-600);
    transition: var(--transition);
}
.notif-btn:hover { background: var(--primary-light); color: var(--primary); }
.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger); border-radius: 50%;
    border: 2px solid white;
}

.topbar-profile .profile-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}
.topbar-profile .profile-avatar:hover { box-shadow: 0 0 0 3px var(--primary-light); }

/* ============ CONTENT AREA ============ */
.content-area { padding: 24px; flex: 1; }

/* ============ STATS CARDS ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card.blue::before { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--warning), #fcd34d); }
.stat-card.red::before { background: linear-gradient(90deg, var(--danger), #fb923c); }

.stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.stat-icon.blue { background: #ede9fe; color: var(--primary); }
.stat-icon.green { background: #d1fae5; color: var(--success); }
.stat-icon.yellow { background: #fef3c7; color: var(--warning); }
.stat-icon.red { background: #fee2e2; color: var(--danger); }

.stat-value { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.stat-change { font-size: 12px; font-weight: 600; margin-top: 8px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ============ CARDS ============ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-100);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.card-body { padding: 22px; }

/* ============ TABLE ============ */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    background: var(--gray-50);
    padding: 11px 14px;
    text-align: left;
    font-size: 11.5px; font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase; letter-spacing: .6px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700); font-size: 13.5px;
}
tbody tr { transition: var(--transition); }
tbody tr:hover { background: var(--gray-50); }
tbody tr:last-child td { border-bottom: none; }

/* ============ BADGES ============ */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px; font-weight: 600;
    white-space: nowrap;
}
.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-contacted { background: #e0e7ff; color: #4338ca; }
.badge-interested { background: #d1fae5; color: #065f46; }
.badge-followup { background: #fef3c7; color: #92400e; }
.badge-converted { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-info { background: #cffafe; color: #164e63; }
.badge-admin { background: #ede9fe; color: #5b21b6; }
.badge-manager { background: #dbeafe; color: #1e40af; }
.badge-telecaller { background: #fef3c7; color: #78350f; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none; cursor: pointer;
    font-size: 13.5px; font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(99,102,241,.4); transform: translateY(-1px); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; box-shadow: 0 4px 12px rgba(16,185,129,.4); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--gray-800);
    background: white;
    transition: var(--transition);
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%; max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(.95) translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 800px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    position: sticky; top: 0; background: white; z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.modal-close {
    width: 32px; height: 32px;
    background: var(--gray-100);
    border: none; border-radius: 50%;
    cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* ============ ALERT ============ */
.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13.5px; font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #cffafe; color: #164e63; border: 1px solid #a5f3fc; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; padding: 0; font-size: 13px; }

/* ============ PAGINATION ============ */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 20px 0; }
.page-btn {
    width: 34px; height: 34px;
    border: 1.5px solid var(--gray-200);
    background: white; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--gray-600);
    cursor: pointer; text-decoration: none;
    transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ============ FILTER BAR ============ */
.filter-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    flex: 1; min-width: 200px; max-width: 320px;
    transition: var(--transition);
}
.search-box:focus-within { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-light); }
.search-box i { color: var(--gray-400); font-size: 13px; }
.search-box input { border: none; background: none; outline: none; font-size: 13px; width: 100%; }
.filter-select {
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white; font-size: 13px;
    color: var(--gray-700); cursor: pointer;
    transition: var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.filter-bar .ms-auto { margin-left: auto; }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--gray-400);
}
.empty-state i { font-size: 52px; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--gray-500); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ============ DASHBOARD GRID ============ */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.dashboard-grid .col-span-2 { grid-column: span 2; }

/* ============ ACTIVITY FEED ============ */
.activity-item {
    display: flex; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--gray-700); }
.activity-time { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }

/* ============ LEAD DETAIL ============ */
.lead-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.detail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); }
.detail-value { font-size: 13.5px; color: var(--gray-800); font-weight: 500; }

/* ============ AVATAR GROUP ============ */
.avatar-sm {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 12px;
}

/* ============ PROGRESS BAR ============ */
.progress { background: var(--gray-100); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .6s ease; }
.progress-bar.primary { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.progress-bar.success { background: linear-gradient(90deg, var(--success), #34d399); }
.progress-bar.warning { background: linear-gradient(90deg, var(--warning), #fcd34d); }

/* ============ TABS ============ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; }
.tab-btn {
    padding: 10px 20px;
    background: none; border: none; cursor: pointer;
    font-size: 13.5px; font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============ NOTIFICATION PANEL ============ */
.notif-panel {
    position: fixed; right: -340px; top: 0;
    width: 340px; height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: 300;
    transition: right .3s ease;
    display: flex; flex-direction: column;
}
.notif-panel.open { right: 0; }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 700; font-size: 15px;
}
.notif-header button { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 16px; }
.notif-list { flex: 1; overflow-y: auto; padding: 10px; }
.notif-empty { text-align: center; padding: 40px 20px; color: var(--gray-400); }
.notif-empty i { font-size: 36px; margin-bottom: 10px; display: block; }
.notif-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--primary-light); }
.notif-item-text { font-size: 13px; color: var(--gray-700); }
.notif-item-time { font-size: 11px; color: var(--gray-400); margin-top: 3px; }

.overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 250;
    display: none;
}
.overlay.show { display: block; }

/* ============ LOGIN PAGE ============ */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.auth-container { width: 100%; max-width: 420px; }
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}
.auth-logo {
    text-align: center; margin-bottom: 32px;
}
.auth-logo-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-size: 26px; margin-bottom: 12px;
}
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--gray-900); }
.auth-logo p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.auth-form .form-label { font-size: 13px; }
.auth-submit { width: 100%; padding: 12px; font-size: 15px; margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--gray-500); }

/* ============ SUPER ADMIN ============ */
.sa-topbar { background: linear-gradient(135deg, #1e1b4b, #312e81); color: white; }
.sa-topbar .page-title h1 { color: white; }

/* ============ CHARTS ============ */
.chart-container { position: relative; height: 260px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid .col-span-2 { grid-column: span 1; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .sidebar { left: -var(--sidebar-width); }
    .sidebar.mobile-open { left: 0; }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex; }
    .topbar-search { display: none; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .content-area { padding: 16px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ============ UTILITIES ============ */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-400); }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.gap-2 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ============ LOADING ============ */
.spinner {
    width: 20px; height: 20px;
    border: 2.5px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ SIDEBAR COLLAPSED ============ */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-details,
.sidebar.collapsed .nav-badge { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed + .main-content { margin-left: var(--sidebar-collapsed); }
