/* ============================================
   CAPTAIN HAZEM ADMIN DASHBOARD
   Premium Islamic Prayer Tracking Dashboard
   ============================================ */

/* ============== CSS VARIABLES ============== */
:root {
    /* Primary Colors - Emerald/Teal Islamic Theme */
    --primary-50: #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-300: #6ee7b7;
    --primary-400: #34d399;
    --primary-500: #10b981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-800: #065f46;
    --primary-900: #064e3b;
    
    /* Gold Accent */
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;
    
    /* Dark Theme Base (Default) */
    --bg-primary: #0f1419;
    --bg-secondary: #1a2332;
    --bg-tertiary: #232d3f;
    --text-primary: #ffffff;
    --text-secondary: #8899a6;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(26, 35, 50, 0.9);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Glass Effects */
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(16, 185, 129, 0.15);
    
    /* Typography */
    --font-arabic: 'IBM Plex Sans Arabic', 'Amiri', 'Segoe UI', system-ui, sans-serif;
    --font-main: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 400ms ease;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Header Height */
    --header-height: 64px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e5e7eb;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Islamic Geometric Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.08), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.06), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04), transparent 60%);
    pointer-events: none;
    z-index: 0;
    transition: opacity var(--transition-normal);
}

[data-theme="light"] body::before {
    opacity: 0.5;
}

/* ============== TOP NAVIGATION ============== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] .top-nav {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.nav-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

[data-theme="light"] .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-400);
}

.nav-link-icon {
    font-size: 1rem;
}

.nav-link-badge {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-timestamp {
    text-align: right;
    display: none;
}

@media (min-width: 1024px) {
    .nav-timestamp {
        display: block;
    }
}

.nav-timestamp span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-timestamp strong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold-400);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
}

.refresh-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-600);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.refresh-btn:hover {
    background: var(--primary-500);
    transform: scale(1.05);
}

.refresh-btn.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px;
    z-index: 100;
    display: none;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-menu .nav-link {
    width: 100%;
    padding: 14px 16px;
    justify-content: flex-start;
}

/* ============== MAIN CONTENT ============== */
.main-content {
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    padding: 24px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.content-area {
    max-width: 1600px;
    margin: 0 auto;
}

/* ============== CARDS ============== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
}

[data-theme="light"] .card {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title .icon {
    font-size: 1.25rem;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

/* ============== STAT CARDS ============== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stats-grid.stats-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

.stats-grid.stats-grid-8 {
    grid-template-columns: repeat(8, 1fr);
}

@media (max-width: 1400px) {
    .stats-grid.stats-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    .stats-grid.stats-grid-8 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid.stats-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid.stats-grid-8 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color, var(--primary-500)), transparent);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .stat-card-icon {
    background: rgba(0, 0, 0, 0.04);
}

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.stat-card-trend.up {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.stat-card-trend.down {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============== TODAY'S ACTIVITY SECTION ============== */
.today-activity-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.today-activity-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .today-activity-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .today-activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.today-activity-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: all var(--transition-normal);
}

.today-activity-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.3);
}

.today-activity-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.today-activity-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-400);
    line-height: 1.2;
}

.today-activity-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============== TOTAL PRAYERS CARD ============== */
.total-prayers-card {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.12) 0%, 
        rgba(6, 95, 70, 0.2) 50%,
        rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.total-prayers-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.total-prayers-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.total-prayers-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.total-prayers-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.total-prayers-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.total-prayers-count {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-300) 0%, var(--gold-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .total-prayers-count {
        font-size: 2.5rem;
    }
}

.prayers-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.prayer-mini-stat {
    flex: 1 1 calc(20% - 12px);
    min-width: 80px;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .prayer-mini-stat {
        flex: 1 1 calc(33.333% - 12px);
    }
}

@media (max-width: 480px) {
    .prayer-mini-stat {
        flex: 1 1 calc(50% - 12px);
    }
}

.prayer-mini-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prayer-mini-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.on-time-ratio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

.ratio-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ratio-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.ratio-dot.on-time { background: var(--success); }
.ratio-dot.qada { background: var(--gold-500); }

.ratio-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ratio-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ============== CHARTS ============== */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    position: relative;
    height: 280px;
}

/* ============== ACTIVITY & PERFORMERS ROW ============== */
.activity-performers-grid {
    display: grid;
    grid-template-columns: minmax(300px, 40%) 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .activity-performers-grid {
        grid-template-columns: 1fr;
    }
}

/* Activity Feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Top Performers - Horizontal Scroll */
.performers-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.performers-scroll::-webkit-scrollbar {
    height: 6px;
}

.performers-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-full);
}

.performers-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-600);
    border-radius: var(--radius-full);
}

.performers-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.performer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all var(--transition-normal);
}

.performer-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.performer-rank {
    font-size: 1.25rem;
    width: 32px;
    text-align: center;
}

.performer-info {
    flex: 1;
    min-width: 0;
}

.performer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.performer-location {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.performer-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.performer-stat {
    text-align: center;
}

.performer-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-400);
}

.performer-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============== CHAT MONITOR - 3 PANEL LAYOUT ============== */
.chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 0;
    height: calc(100vh - var(--header-height) - 48px);
    max-height: calc(100vh - var(--header-height) - 48px);
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

@media (max-width: 1200px) {
    .chat-layout {
        grid-template-columns: 280px 1fr;
    }
    .chat-context-panel {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .chat-list-panel {
        height: 400px;
    }
    .chat-view-panel {
        height: 500px;
    }
}

/* Chat List Panel */
.chat-list-panel {
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.chat-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.chat-list-item {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-theme="light"] .chat-list-item {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.chat-list-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .chat-list-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.chat-list-item.active {
    background: rgba(16, 185, 129, 0.1);
}

.chat-list-item.unread {
    background: rgba(59, 130, 246, 0.12);
    border-left: 3px solid var(--info);
}

[data-theme="light"] .chat-list-item.unread {
    background: rgba(59, 130, 246, 0.08);
}

.chat-item-avatar {
    position: relative;
}

.chat-item-avatar .unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--info);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    animation: pulse 2s infinite;
}

.chat-item-avatar .paused-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.7rem;
    background: var(--warning);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}

.chat-list-item.paused {
    opacity: 0.7;
}

.paused-label {
    color: var(--warning);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.chat-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chat-item-name.unread {
    font-weight: 700;
}

.chat-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-item-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.chat-item-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat View Panel */
.chat-view-panel {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.2) 0%, var(--bg-primary) 100%);
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

[data-theme="light"] .chat-view-panel {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, #f0f0f0 100%);
}

.chat-messages-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="light"] .chat-messages-header {
    background: rgba(255, 255, 255, 0.8);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-header-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-header-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Scrollbar styles for chat areas */
.chat-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.chat-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-list::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .chat-list::-webkit-scrollbar-thumb,
[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .chat-list::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Telegram-style Chat Bubbles */
.chat-bubble {
    max-width: 70%;
    padding: 6px 12px;
    border-radius: 12px;
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 4px;
}

/* User/Human messages - LEFT side, dark gray */
.chat-bubble.user {
    background: #3b3b3b;
    color: #ffffff;
    align-self: flex-start;
    border-radius: 12px 12px 12px 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .chat-bubble.user {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Bot/AI messages - RIGHT side, green like Telegram */
.chat-bubble.assistant {
    background: #DCF8C6;
    color: #1a1a1a;
    align-self: flex-end;
    border-radius: 12px 12px 4px 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .chat-bubble.assistant {
    background: #d9fdd3;
}

.chat-bubble-time {
    font-size: 0.65rem;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 4px;
    text-align: right;
}

.chat-bubble.user .chat-bubble-time {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .chat-bubble.user .chat-bubble-time {
    color: rgba(0, 0, 0, 0.45);
}

/* Date Separator */
.chat-date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

.chat-date-separator span {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

[data-theme="light"] .chat-date-separator span {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
}

/* Chat Context Panel (User Info) */
.chat-context-panel {
    border-left: 1px solid var(--glass-border);
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.context-section {
    margin-bottom: 24px;
}

.context-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.context-user-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.context-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.context-user-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.context-user-id {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.context-prayers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.period-day-badge {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6px 10px;
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    color: #f9a8d4;
    margin-bottom: 4px;
}

[data-theme="light"] .period-day-badge {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: #db2777;
}

.paused-day-badge {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fca5a5;
    margin-bottom: 4px;
}

[data-theme="light"] .paused-day-badge {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

/* Context Deeds Grid */
.context-deeds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.context-deed-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

[data-theme="light"] .context-deed-item {
    background: rgba(0, 0, 0, 0.03);
}

.context-deed-item.done {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.deed-icon {
    font-size: 1rem;
}

.deed-label {
    flex: 1;
    color: var(--text-secondary);
}

.deed-status {
    font-weight: 600;
    color: var(--text-muted);
}

.context-deed-item.done .deed-status {
    color: #10b981;
}

.context-prayer-item {
    position: relative;
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

[data-theme="light"] .context-prayer-item {
    background: rgba(0, 0, 0, 0.03);
}

.context-prayer-item.completed {
    background: rgba(16, 185, 129, 0.15);
}

.context-prayer-item.on-time {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.context-prayer-item.qada {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="light"] .context-prayer-item.on-time {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .context-prayer-item.qada {
    background: rgba(245, 158, 11, 0.15);
}

.context-prayer-icon {
    font-size: 1rem;
    margin-bottom: 2px;
}

.context-prayer-name {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.context-prayer-status {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.context-prayer-item.on-time .context-prayer-status {
    color: #10b981;
}

.context-prayer-item.qada .context-prayer-status {
    color: #f59e0b;
}

.context-prayer-time {
    font-size: 0.55rem;
    color: var(--text-muted);
}

.context-stats-grid {
    display: grid;
    gap: 8px;
}

.context-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.context-stat-label {
    color: var(--text-secondary);
}

.context-stat-value {
    color: var(--primary-400);
    font-weight: 600;
}

/* ============== FORM ELEMENTS ============== */
.input-group {
    position: relative;
}

.input-group .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

[data-theme="light"] .form-input {
    background: rgba(0, 0, 0, 0.03);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    padding: 10px 36px 10px 14px;
    background: rgba(255, 255, 255, 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5l-4-4h8l-4 4z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* ============== BADGES ============== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-400);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-400);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* ============== AVATAR ============== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }

.avatar-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: white;
}

.avatar-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: white;
}

/* ============== TABLES ============== */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ============== FILTERS BAR ============== */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.filter-chip.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary-500);
    color: var(--primary-400);
}

/* ============== PRAYER STATUS ICONS ============== */
.prayer-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.prayer-status.on-time {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.prayer-status.qada {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.prayer-status.pending {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.prayer-status.missed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ============== FEATURE ICONS ============== */
.feature-icons {
    display: flex;
    gap: 6px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.feature-icon.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-400);
}

/* ============== STREAK BADGE ============== */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-400);
}

.streak-badge .fire {
    font-size: 1rem;
}

/* ============== PRAYER ANALYTICS CARDS ============== */
.prayer-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .prayer-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .prayer-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.prayer-breakdown-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.prayer-breakdown-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.prayer-breakdown-card.excellent::before { background: var(--success); }
.prayer-breakdown-card.good::before { background: var(--gold-500); }
.prayer-breakdown-card.needs-work::before { background: var(--danger); }

.prayer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.prayer-percentage {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.prayer-percentage.excellent { color: var(--success); }
.prayer-percentage.good { color: var(--gold-400); }
.prayer-percentage.needs-work { color: #f87171; }

.prayer-trend {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ============== PAGINATION ============== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.page-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-500);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============== USER DRAWER ============== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.user-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    z-index: 201;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ============== MAP ============== */
.map-container {
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

#map {
    height: 100%;
    width: 100%;
}

.leaflet-container {
    background: var(--bg-primary);
}

.leaflet-tile-pane {
    filter: brightness(0.7) contrast(1.1) saturate(0.8);
}

[data-theme="light"] .leaflet-tile-pane {
    filter: none;
}

/* ============== CALENDAR ============== */
.calendar-header {
    text-align: center;
    padding: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.08);
}

.calendar-day.perfect {
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary-400);
}

.calendar-day.partial {
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold-400);
}

.calendar-day.missed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ============== EMPTY STATES ============== */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* ============== SKELETON LOADERS ============== */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.04) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.04) 25%, 
        rgba(0, 0, 0, 0.08) 50%, 
        rgba(0, 0, 0, 0.04) 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============== ANIMATIONS ============== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in { animation: fadeIn 0.4s ease-out; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }
.animate-slide-in { animation: slideIn 0.3s ease-out; }

/* ============== TOAST NOTIFICATIONS ============== */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-secondary);
}

/* ============== VIEW SECTIONS ============== */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* ============== SCROLLBAR ============== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    
    .user-drawer {
        width: 100%;
        max-width: 100%;
    }
}
