/* --- AESTHETIC THEME VARIABLES --- */
:root {
    --bg-body: #f0f4f8;       
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-header: rgba(255, 255, 255, 0.9);
    --bg-main: #ffffff;
    --bg-secondary: rgba(248, 250, 252, 0.8);
    --text-main: #1e293b;     
    --text-sub: #64748b;      
    --border: rgba(255, 255, 255, 0.6);
    --shadow-card: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-header: rgba(15, 23, 42, 0.85);
    --bg-main: #1e293b;
    --bg-secondary: rgba(30, 41, 59, 0.5);
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
}

/* --- SWEETALERT Z-INDEX OVERRIDE --- */
.swal2-container {
    z-index: 999999 !important;
}

/* --- BASE --- */
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    transition: background-color 0.5s ease, color 0.3s ease;
    overflow-x: hidden;
    overflow-y: scroll;
    background-attachment: fixed;
    background-image: radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.1) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
}

/* --- HEADER (CENTERED LOGO) --- */
header {
    background: var(--bg-header) !important; 
    backdrop-filter: blur(20px); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    padding: 10px 0; 
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
}

.header-top { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 95%; 
    max-width: 1800px; 
    margin: 0 auto; 
    position: relative; 
}

.header-left { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    min-width: 0; 
}

.header-center { 
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
    text-align: center; 
}

.header-center h1 { 
    margin: 0; 
    font-size: 20px !important; 
    font-weight: 800; 
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    white-space: nowrap; 
}

.header-center p { 
    margin: 0; 
    font-size: 9px !important; 
    color: var(--text-sub); 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    font-weight: 600; 
    opacity: 0.8; 
}

.header-right { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
    gap: 10px; 
}

/* Festival theme classes (safe override) */
header.festival-independence,
header.festival-republic {
    background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%) !important;
}
header.festival-independence {
    border-bottom: 3px solid #000080 !important;
}
header.festival-diwali {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6347) !important;
}
header.festival-eid {
    background: linear-gradient(135deg, #00A86B, #FFFFFF, #FFD700) !important;
}
header.festival-holi {
    background: linear-gradient(135deg, #FF1493, #FFD700, #00CED1, #32CD32) !important;
}
.header-top { display: flex; align-items: center; justify-content: space-between; width: 95%; max-width: 1800px; margin: 0 auto; position: relative; }
.header-right { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }

/* --- HEADER BUTTONS --- */
.head-btn { background: var(--bg-body); border: 1px solid var(--border); color: var(--text-main); padding: 6px 15px; border-radius: 50px; font-size: 11px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; text-decoration: none; }
.head-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn-money { background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-money:hover { transform: scale(1.05); }

/* --- THEME TOGGLE --- */
#theme-toggle { background: var(--bg-body); border: 1px solid var(--border); color: var(--text-main); width: 35px; height: 35px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.4s; }
#theme-toggle:hover { transform: rotate(180deg) scale(1.1); }

/* --- FIXED: WORK VIEW (FULL SCREEN APP) --- */
#work-view {
    display: none;
    flex-direction: column;
    position: fixed; /* Takes over whole screen */
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000000;
    z-index: 5000; /* Stays on top of everything */
}
/* ADAPTIVE TOOLBAR - SMART COLOR DETECTION */
#toolbar { 
    background: rgba(100, 100, 100, 0.7) !important; /* Neutral gray default */
    backdrop-filter: blur(10px) !important; 
    padding: 10px 20px !important; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; 
    display: flex !important; 
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 100;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

/* DEFAULT TOOLBAR TEXT COLORS */
#toolbar #back-btn {
    color: white !important; /* Default white text on gray background */
}

#toolbar #tool-title {
    color: white !important; /* Default white text on gray background */
}

/* TOOLBAR BRAND SECTION */
#toolbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: 15px !important;
    pointer-events: none !important;
}

#toolbar-logo {
    width: 24px !important;
    height: 24px !important;
    border-radius: 4px !important;
    object-fit: contain !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 2px !important;
}

/* Fallback when logo fails to load */
#toolbar-logo[src=""], #toolbar-logo:not([src]) {
    display: none !important;
}

#toolbar-brand-text {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: white !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    white-space: nowrap !important;
}

/* WHITE TOOLBAR MODE (for dark services) */
#toolbar.white-mode { 
    background: rgba(255, 255, 255, 0.9) !important; 
    backdrop-filter: blur(10px) !important; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* BLACK TOOLBAR MODE (for light services) */
#toolbar.black-mode { 
    background: rgba(0, 0, 0, 0.8) !important; 
    backdrop-filter: blur(10px) !important; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

#back-btn { 
    background: transparent !important; 
    backdrop-filter: none !important;
    border: none !important; 
    padding: 8px 16px !important; 
    border-radius: 50px !important; 
    cursor: pointer !important; 
    font-weight: 600 !important; 
    font-size: 14px !important;
    color: white !important; 
    display: flex !important; 
    align-items: center !important; 
    gap: 8px !important; 
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: none !important;
    font-family: 'Poppins', sans-serif !important;
    position: relative !important;
    z-index: 9999 !important;
}

/* WHITE MODE - Dark text for light toolbar */
#toolbar.white-mode #back-btn {
    color: #1f2937 !important;
}

#toolbar.white-mode #back-btn:hover { 
    background: rgba(59, 130, 246, 0.8) !important;
    color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
    border-radius: 50px !important;
}

/* WHITE MODE - Brand colors for light toolbar */
#toolbar.white-mode #toolbar-brand-text {
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* BLACK MODE - Light text for dark toolbar */
#toolbar.black-mode #back-btn {
    color: white !important;
}

/* BLACK MODE - Brand colors for dark toolbar */
#toolbar.black-mode #toolbar-brand-text {
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* MOBILE RESPONSIVE - TOOLBAR BRAND */
@media (max-width: 768px) {
    #toolbar-brand {
        margin-left: 8px !important;
        gap: 6px !important;
    }
    
    #toolbar-logo {
        width: 20px !important;
        height: 20px !important;
    }
    
    #toolbar-brand-text {
        font-size: 12px !important;
        letter-spacing: 0.3px !important;
    }
}

@media (max-width: 480px) {
    #toolbar-brand-text {
        font-size: 11px !important;
        letter-spacing: 0.2px !important;
    }
}

#back-btn:hover { 
    background: rgba(59, 130, 246, 0.8) !important;
    color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
    border-radius: 50px !important;
}

#back-btn:active {
    transform: scale(0.98) !important;
}

/* Option to hide toolbar title - only show back button */
#toolbar.back-only #tool-title {
    display: none;
}

#toolbar.back-only {
    justify-content: flex-start;
}

#back-btn i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#back-btn:hover i {
    transform: translateX(-3px);
}

iframe { 
    flex-grow: 1; 
    width: 100%; 
    border: none; 
    opacity: 0; 
    transition: opacity 0.5s ease-in-out; 
}

/* --- ENHANCED: STYLISH LOGIN MODAL WITH ANIMATIONS --- */
#auth-container {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.8); 
    backdrop-filter: blur(15px) saturate(120%);
    z-index: 99999;
    display: none; 
    justify-content: center; 
    align-items: flex-end;
    animation: fadeInOverlay 0.4s ease;
}

@media (min-width: 769px) {
    #auth-container {
        align-items: center;
    }
}

.auth-box {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.98), rgba(30, 30, 30, 0.95)); 
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15); 
    padding: 40px 35px; 
    border-radius: 30px 30px 0 0;
    width: 100%; 
    max-width: 450px; 
    text-align: center; 
    position: relative;
    box-shadow: 
        0 -20px 60px rgba(0,0,0,0.6),
        0 -10px 30px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUpBottomEnhanced 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    animation: shimmer 2s infinite;
}

@media (min-width: 769px) {
    .auth-box {
        border-radius: 25px;
        animation: scaleInEnhanced 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 45px 40px;
    }
}

.auth-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.auth-box p {
    animation: fadeInUp 0.6s ease 0.3s both;
}

.close-auth {
    position: absolute !important; 
    top: 20px !important; 
    right: 25px !important; 
    font-size: 28px !important; 
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease !important;
    z-index: 10;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-auth:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

.auth-input { 
    width: 100%; 
    padding: 16px 20px; 
    margin-top: 15px; 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    background: rgba(255, 255, 255, 0.05); 
    color: white; 
    outline: none; 
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.auth-input:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-input.error { 
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-container { 
    width: 100%;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.error-message { 
    color: #ef4444; 
    font-size: 13px; 
    margin-top: 8px; 
    margin-left: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message::before {
    content: '⚠';
    font-size: 14px;
}

.auth-btn { 
    width: 100%; 
    padding: 16px; 
    border-radius: 12px; 
    border: none; 
    background: linear-gradient(135deg, #3b82f6, #2563eb, #1d4ed8); 
    color: white; 
    font-weight: 600; 
    cursor: pointer; 
    margin-top: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb, #1d4ed8, #1e40af);
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:active {
    transform: translateY(0);
}

/* Enhanced Animations */
@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUpBottomEnhanced {
    from {
        transform: translateY(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

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

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

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

/* Link Styles */
.auth-box span[onclick] {
    color: #3b82f6 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
}

.auth-box span[onclick]:hover {
    color: #60a5fa !important;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3) !important;
}

.auth-box p[onclick] {
    color: #3b82f6 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    animation: fadeInUp 0.6s ease 0.7s both;
}

.auth-box p[onclick]:hover {
    color: #60a5fa !important;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3) !important;
}

/* --- REST OF STYLES (Grid, Cards, Footer, etc.) --- */
#dashboard-container { width: 95%; max-width: 1800px; margin: 0 auto; padding-bottom: 100px; }
#menu-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 40px !important; padding: 10px 20px !important; }
.greeting-section { padding: 15px 20px 5px 20px; animation: fadeIn 1s ease; }
.greeting-title { font-size: 22px; font-weight: 800; background: linear-gradient(90deg, #60a5fa, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0; }
.greeting-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; font-weight: 500; }
.hero-banner { 
    margin: 20px; 
    background: linear-gradient(135deg, #2563eb, #7c3aed); 
    border-radius: 24px; 
    padding: 25px; 
    color: white; 
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.5); 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    transition: transform 0.3s, opacity 0.3s ease-in-out; 
    opacity: 1;
}
.hero-banner:hover { transform: translateY(-2px); }
.hero-text h3 { margin: 0; font-size: 18px; font-weight: 700; transition: opacity 0.3s ease-in-out; }
.hero-text p { margin: 5px 0 0; font-size: 12px; opacity: 0.9; transition: opacity 0.3s ease-in-out; }
.hero-badge { background: #facc15; color: black; font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px; margin-right: 8px; vertical-align: middle; transition: background 0.3s ease-in-out; }
.hero-icon { font-size: 45px; color: rgba(255,255,255,0.25); transform: rotate(-10deg); transition: all 0.3s ease-in-out; }
.card { background: var(--bg-card); backdrop-filter: blur(15px); border: 1px solid var(--border); border-radius: 24px; padding: 20px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: var(--shadow-card); position: relative; cursor: pointer; height: 100%; transition: all 0.5s; opacity: 0; animation: fadeInUp 0.8s forwards; animation-delay: calc(var(--i) * 0.05s); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.card:hover { transform: translateY(-12px) scale(1.03); box-shadow: var(--shadow-hover); border-color: rgba(255, 255, 255, 0.4); z-index: 10; }
.icon-tile { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 14px; transition: 0.3s; }
.card:hover .icon-tile { transform: scale(1.1) rotate(5deg); }
.card.green .icon-tile { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.card.blue .icon-tile { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.card.orange .icon-tile { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.card.rose .icon-tile { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.3); }
.card.purple .icon-tile { background: rgba(168, 85, 247, 0.15); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }
.card.teal .icon-tile { background: rgba(20, 184, 166, 0.15); color: #14b8a6; border: 1px solid rgba(20, 184, 166, 0.3); }
.card.red .icon-tile { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.card.gold .icon-tile { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.card.cyan .icon-tile { background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.3); }
.card.indigo .icon-tile { background: rgba(99, 102, 241, 0.15); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.3); }
.card.navy .icon-tile { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; border: 1px solid rgba(14, 165, 233, 0.3); }
.card.admin .icon-tile { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.card-content span { display: block; font-weight: 700; font-size: 13px; color: var(--text-main); margin-bottom: 4px; }
.card-desc { font-size: 10px; color: var(--text-sub); font-weight: 500; opacity: 0.8; }
.category-header { width: 100%; grid-column: 1 / -1; margin-top: 30px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 10px; opacity: 0; animation: fadeIn 1s ease forwards; }
.category-header h3 { margin: 0; font-size: 16px; color: #fbbf24; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; background: linear-gradient(90deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.badge { position: absolute; top: 10px; right: 10px; font-size: 9px; font-weight: 800; padding: 3px 10px; border-radius: 50px; color: white; z-index: 5; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.badge-new { background: #ef4444; } .badge-fire { background: #facc15; color: black; } .badge-hot { background: #f97316; } .badge-free { background: #10b981; } .badge-login { background: #6366f1; } 
.login-btn-top { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; border: none; padding: 8px 24px; border-radius: 50px; font-weight: 700; cursor: pointer; font-size: 12px; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); transition: transform 0.2s; }
.login-btn-top:hover { transform: scale(1.05); }
.services-menu-wrapper { position: relative; width: 100%; max-width: 250px; margin: 0 auto 25px auto; z-index: 50; }
.services-trigger { width: 100%; padding: 12px 24px; background: var(--bg-card); backdrop-filter: blur(10px); border: 1px solid var(--border); color: var(--text-main); border-radius: 50px; cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-card); transition: all 0.3s; }
.services-trigger:hover { border-color: #3b82f6; transform: translateY(-2px); box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.3); }
.services-dropdown { position: absolute; top: 120%; left: 0; width: 100%; background: var(--bg-header); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 20px 50px -10px rgba(0,0,0,0.3); max-height: 0; overflow: hidden; transition: 0.4s; opacity: 0; }
.services-dropdown.active { max-height: 400px; overflow-y: auto; opacity: 1; padding: 10px 0; }
.service-list-item { padding: 12px 24px; font-size: 13px; color: var(--text-main); cursor: pointer; display: flex; align-items: center; gap: 12px; transition: 0.2s; border-bottom: 1px solid var(--border); }
.service-list-item:hover { background: rgba(59, 130, 246, 0.1); color: #3b82f6; padding-left: 30px; }
footer { margin-top: 50px; padding: 30px; text-align: center; color: var(--text-sub); border-top: 1px solid var(--border); background: var(--bg-card); backdrop-filter: blur(10px); border-radius: 30px 30px 0 0; }
.contact-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-body); border: 1px solid var(--border); padding: 6px 18px; border-radius: 50px; margin: 5px; font-size: 11px; color: var(--text-main); font-weight: 600; transition: 0.3s; }
.contact-pill:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.fab-container { position: fixed; bottom: 30px; right: 30px; z-index: 997; display: flex; flex-direction: column-reverse; align-items: center; gap: 15px; }
.fab-main { width: 60px; height: 60px; background: linear-gradient(135deg, #10b981, #059669); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 26px; box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4); cursor: pointer; transition: transform 0.4s; }
.fab-main:hover { transform: scale(1.1); }
.fab-main.active { transform: rotate(45deg); background: #ef4444; }
.fab-options { display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(20px) scale(0.8); pointer-events: none; transition: 0.3s; }
.fab-options.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.fab-item { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none; transition: 0.3s; }
.fab-wa { background: #25D366; } .fab-call { background: #3b82f6; }
.hidden { display: none !important; }


/* --- MOBILE BOTTOM NAVIGATION (APP-LIKE) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: none; /* Hidden by default on desktop */
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 12px;
    color: var(--text-sub);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    flex: 1;
    max-width: 80px;
}

.bottom-nav .nav-item i {
    font-size: 22px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav .nav-item span {
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav .nav-item.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.bottom-nav .nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav .nav-item:active {
    transform: scale(0.95);
}

/* Show bottom nav only on mobile */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex; /* Only show on mobile */
    }
    
    /* Add padding to body to prevent content from being hidden behind bottom nav */
    body {
        padding-bottom: 80px;
    }
    
    #dashboard-container {
        padding-bottom: 20px;
    }
}

/* Explicitly hide on desktop */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Ripple effect on tap */
.bottom-nav .nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.bottom-nav .nav-item:active::before {
    width: 100px;
    height: 100px;
}


/* --- RECENTLY USED SECTION --- */
.recently-used-section {
    margin: 20px;
    padding: 15px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.recently-used-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.recently-used-section .section-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.recently-used-section .section-header h3 i {
    color: #3b82f6;
    font-size: 16px;
}

.clear-recent-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-recent-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

.recently-used-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.recently-used-scroll::-webkit-scrollbar {
    height: 4px;
}

.recently-used-scroll::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 10px;
}

.recently-used-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.recently-used-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-sub);
}

.recent-card {
    min-width: 110px;
    max-width: 110px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.recent-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.recent-card .icon-tile {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.recent-card:hover .icon-tile {
    transform: scale(1.1) rotate(5deg);
}

.recent-card-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recent-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #3b82f6;
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}


/* --- NETWORK STATUS BAR --- */
.network-status-bar {
    position: fixed;
    top: -60px;
    left: 0;
    right: 0;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    z-index: 100000;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.network-status-bar.show {
    top: 0;
}

.network-status-bar.offline {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.network-status-bar.online {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}


/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.toast.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
}

.toast.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
}

.toast.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
}

.toast.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
}

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

.toast.hiding {
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideDown {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@media (max-width: 768px) {
    #toast-container {
        bottom: 90px;
    }
}


/* --- SKELETON LOADING --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.1) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

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

.skeleton-card {
    width: 100%;
    height: 180px;
    border-radius: 24px;
    margin-bottom: 18px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 12px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
    padding: 20px;
}


/* --- RESPONSIVE TABLE CARDS (MOBILE) --- */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: visible;
    }
    
    thead {
        display: none;
    }
    
    tbody {
        display: block;
    }
    
    tr {
        display: block;
        margin-bottom: 15px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--border);
    }
    
    td:last-child {
        border-bottom: none;
    }
    
    td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-sub);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    td:not([data-label])::before {
        content: '';
    }
}



    
    /* Adjust FAB position on mobile to avoid bottom nav */
    .fab-container {
        bottom: 90px;
        right: 20px;
    }
    
    /* Fix header layout for mobile - KEEP EVERYTHING IN ONE LINE */
    .header-top {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 50px !important;
    }
    
    .header-left {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        order: 1 !important;
        min-width: 0 !important;
    }
    
    .header-center {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-align: center !important;
        order: 2 !important;
        z-index: 10 !important;
    }
    
    .header-center h1 {
        font-size: 22px !important;
        white-space: nowrap !important;
        text-align: center !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .header-center p {
        font-size: 10px !important;
        text-align: center !important;
        line-height: 1.1 !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
    
    .header-right {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        order: 3 !important;
        margin-left: 0 !important;
    }
    
    /* Make buttons smaller on mobile but keep them visible */
    #lang-toggle,
    #theme-toggle,
    #notif-bell,
    #install-pwa-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
        padding: 6px !important;
        min-width: 32px !important;
    }
    
    /* FAQ button smaller text */
    .header-left button[onclick*="faq.html"] {
        padding: 6px 10px !important;
        height: 32px !important;
        font-size: 11px !important;
    }
    
    .header-left button[onclick*="faq.html"] span {
        display: none !important;
    }
    
    /* Login button smaller */
    .login-btn-top {
        padding: 6px 12px !important;
        font-size: 11px !important;
        height: 32px !important;
    }
    
    /* Trophy container smaller */
    #trophy-container {
        transform: scale(0.8) !important;
    }
    
    /* Online counter smaller */
    #online-counter {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }
    
    /* Make header buttons smaller on mobile */
    #lang-toggle,
    #theme-toggle,
    #notif-bell,
    #install-pwa-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
        margin-right: 0 !important;
    }
    
    .login-btn-top {
        padding: 6px 16px !important;
        font-size: 11px !important;
    }
    
    /* Ensure header doesn't overflow */
    header {
        padding: 10px 0 !important;
    }
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px !important;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typingBounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}


/* --- WORK VIEW LOADER --- */
#work-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    z-index: 10;
    gap: 20px;
}

#work-loader .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#work-loader::after {
    content: 'Loading...';
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#app-frame {
    width: 100%;
    height: 100%;
    border: none;
    transition: opacity 0.3s ease;
}


/* --- GLOBAL LOADING OVERLAY (for page navigation) --- */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    gap: 20px;
}

#global-loader .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#global-loader p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

/* CONSOLIDATED TOOL TITLE STYLING */
#tool-title {
    font-weight: 600;
    font-size: 16px;
    color: white !important;
    letter-spacing: -0.3px;
    text-align: center;
    flex: 1;
    display: block !important;
    transition: color 0.3s ease !important;
}

/* WHITE MODE - Dark text for light toolbar */
#toolbar.white-mode #tool-title {
    color: #1f2937 !important;
}

/* BLACK MODE - Light text for dark toolbar */
#toolbar.black-mode #tool-title {
    color: white !important;
}
/* HOME BUTTON SPECIFIC STYLING */
#back-btn:hover i {
    transform: scale(1.1) !important;
}

/* Override any previous arrow-left transforms */
#back-btn i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* --- MODAL OVERLAY STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.close-modal {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

/* --- PROFILE MENU SPECIFIC STYLES --- */
.profile-option:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- FORM STYLES FOR MODALS --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-body);
    color: var(--text-main);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* --- RESPONSIVE MODAL --- */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
    }
}
/* --- ENHANCED NOTIFICATION SYSTEM STYLES --- */

/* Notification Panel */
#notif-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 380px;
    max-width: 90vw;
    max-height: 600px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    overflow: hidden;
    animation: notificationPanelSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notificationPanelSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Notification Header */
.notif-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
}

.notif-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-header h3 i {
    color: #3b82f6;
    font-size: 18px;
}

#notif-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #10b981;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.notif-close {
    cursor: pointer;
    color: var(--text-sub);
    font-size: 24px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notif-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* Notification Filters */
.notif-filters {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--bg-body);
}

.notif-filter {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-sub);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.notif-filter:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.notif-filter.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Notification List */
.notif-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notif-list::-webkit-scrollbar {
    width: 6px;
}

.notif-list::-webkit-scrollbar-track {
    background: var(--bg-body);
}

.notif-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-sub);
}

/* Notification Items */
.notif-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: notificationItemFadeIn 0.5s ease-out;
}

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

.notif-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(5px);
}

.notif-item.unread {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
}

.notif-item.unread:hover {
    background: rgba(59, 130, 246, 0.12);
}

.notif-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.notif-icon i {
    font-size: 16px;
    color: #3b82f6;
}

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

.notif-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
}

.notif-message {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.4;
    margin-bottom: 8px;
}

.notif-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notif-time {
    font-size: 11px;
    color: var(--text-sub);
    opacity: 0.8;
}

.notif-type-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notif-type-badge.type-transaction {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.notif-type-badge.type-system {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.notif-type-badge.type-alert {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.notif-type-badge.type-service {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.notif-type-badge.type-promotion {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.notif-urgent {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: urgentPulse 1.5s infinite;
}

@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.notif-action {
    margin-top: 8px;
}

.notif-action-btn {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.notif-unread-dot {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: unreadDotPulse 2s infinite;
}

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

/* Empty State */
.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-sub);
}

.notif-empty i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 15px;
    display: block;
}

.notif-empty p {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.notif-empty small {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}

/* Loading State */
.notif-loading {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-sub);
}

.notif-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

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

/* Load More Button */
.notif-load-more {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
}

.notif-load-more button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.notif-load-more button:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Notification Settings Modal */
#notif-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#notif-settings-modal > div {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.settings-section {
    margin-bottom: 25px;
}

.settings-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

.setting-item input[type="time"] {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 14px;
    width: 120px;
}

.setting-item span {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.setting-item small {
    font-size: 12px;
    color: var(--text-sub);
    opacity: 0.8;
    line-height: 1.3;
    display: block;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.save-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.cancel-btn {
    background: var(--bg-body);
    color: var(--text-sub);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

/* Toast Notifications */
.notification-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    max-width: 400px;
    width: 90%;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    cursor: pointer;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: toastSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.notification-toast.priority-urgent {
    animation: toastSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1), urgentShake 0.5s ease-in-out 0.5s;
}

@keyframes urgentShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Notification Badge */
#notif-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    animation: badgePulse 2s infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    #notif-panel {
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .notification-toast {
        top: 20px;
        right: 15px;
        left: 15px;
        width: auto;
        max-width: none;
    }
    
    .notif-filters {
        padding: 10px 12px;
    }
    
    .notif-filter {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .notif-item {
        padding: 14px 16px;
    }
    
    .notif-icon {
        width: 36px;
        height: 36px;
    }
    
    .notif-icon i {
        font-size: 14px;
    }
    
    .notif-title {
        font-size: 13px;
    }
    
    .notif-message {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #notif-settings-modal > div {
        padding: 20px;
        margin: 20px;
        width: auto;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .save-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- TOAST NOTIFICATION SYSTEM --- */
.toast-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #3b82f6;
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    max-width: 400px;
    width: 90%;
    display: none;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.toast-notification.show {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-notification.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 18px;
    opacity: 0.9;
}

.toast-content {
    flex: 1;
    min-width: 0;
    margin-left: 12px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.toast-message {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    margin-top: 2px;
    margin-left: 12px;
    font-size: 14px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 2px;
    border-radius: 4px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive toast */
@media (max-width: 768px) {
    .toast-notification {
        top: 20px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: none;
    }
}

/* Dark theme adjustments for toast */
[data-theme="dark"] .toast-notification {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}