:root {
    --primary-color: #4f46e5;
    --secondary-color: #6366f1;
    --light-bg: #f8f9fa;
    --sidebar-bg: #111827;
    --sidebar-link-color: #9ca3af;
    --sidebar-link-hover: #ffffff;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* --- Sidebar Styles --- */
.sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: -260px;
    height: 100vh;
    z-index: 999;
    background: var(--sidebar-bg);
    color: #fff;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}
body.sidebar-open .sidebar {
    left: 0;
}
.sidebar-header {
    padding: 1.5rem;
    background: #1f2937;
    text-align: center;
}
.sidebar-header h3 {
    color: #fff;
    font-weight: 700;
}
.sidebar-menu {
    padding: 1rem 0;
}
.sidebar-menu .menu-header {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
}
.sidebar-menu a {
    padding: 0.9rem 1.5rem;
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--sidebar-link-color);
    display: block;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #1f2937;
    color: var(--sidebar-link-hover);
    border-left-color: var(--primary-color);
}
.sidebar-menu a i {
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* --- Main Content Styles --- */
.main-content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
}

/* --- Top Header / Navbar --- */
.top-header {
    padding: 0.75rem 1.5rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sidebar-toggler {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #333;
}

/* --- Overlay for Mobile --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}
body.sidebar-open .sidebar-overlay {
    display: block;
}

/* --- NEW & IMPROVED WELCOME BANNER STYLE --- */
.welcome-banner {
    background: linear-gradient(105deg, #ca4c4c 0%, #7c3aed 100%);
    border-radius: 1rem;
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.4);
    transition: transform 0.3s ease;
}
.welcome-banner:hover {
    transform: translateY(-5px);
}
.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: movePattern 20s linear infinite;
    opacity: 0.5;
}
@keyframes movePattern {
    from { transform: translate(0, 0); }
    to { transform: translate(-100px, 100px); }
}

/* --- THIS IS THE FIX FOR THE BUTTON --- */
/* Lifts the text and button above the background pattern */
.welcome-banner h1,
.welcome-banner p,
.welcome-banner .btn {
    position: relative;
    z-index: 1;
}
/* --- END OF FIX --- */

.welcome-banner h1 {
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.welcome-banner p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.welcome-banner .btn {
    transition: all 0.3s ease;
}
.welcome-banner .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* --- Dashboard Info Cards --- */
.info-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.15);
}
.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* --- Recent Activity --- */
.activity-item {
    background-color: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px -5px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}
.activity-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px -5px rgba(0,0,0,0.1);
}
.activity-item .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}
.activity-item .score {
    font-weight: 700;
    color: #1e293b;
}

/* --- Color Helpers --- */
.bg-success-soft { background-color: #f0fdf4; }
.bg-warning-soft { background-color: #fffbeb; }

/* --- Desktop Styles --- */
@media (min-width: 992px) {

    /* 1. पूरी वेबसाइट का फोंट साइज छोटा करें */
    html, body {
        font-size: 13px !important;
    }

    /* 2. Main Container की पैडिंग कम करें */
    main.p-4 {
        padding: 1rem !important; /* साइड से जगह कम करें */
    }

    /* 1. Global Text Size Reduction for Mobile */
    body {
        font-size: 13px !important; /* Standard size 16px se 13px kar diya */
    }

    p, span, div, li, a {
        font-size: 13px; /* Ensure all text follows suit */
    }

    /* Reduce Heading Sizes */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.2rem !important; }
    h4 { font-size: 1.1rem !important; }
    h5 { font-size: 1rem !important; }
    h6 { font-size: 0.9rem !important; }
    .small, small { font-size: 0.75rem !important; }

    /* 2. Fix Dashboard Welcome Banner Size */
    .welcome-banner {
        border-radius: 10px !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important; /* मोबाइल पर सेंटर अच्छा लगता है */
    }

    /* Banner Heading (Welcome Name) */
    .welcome-banner h1,
    .welcome-banner .display-5,
    .welcome-banner .display-4 {
        font-size: 1.5rem !important; /* हेडिंग का साइज काफी कम किया */
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.2 !important;
    }

    /* Banner Subheading (Ready to crack...) */
    .welcome-banner p,
    .welcome-banner .fs-5,
    .welcome-banner .lead {
        font-size: 0.9rem !important; /* टेक्स्ट साइज छोटा किया */
        margin-bottom: 1rem !important;
        line-height: 1.4 !important;
    }

    /* Banner Button */
    .welcome-banner .btn {

        padding: 0.8rem 1.5rem !important;
        font-size: 0.8rem !important;
        width: 100% !important; /* मोबाइल पर बटन फुल चौड़ाई का अच्छा दिखेगा */
    }

    /* 3. Reduce Card Sizes & Padding */
    .card {
        margin-bottom: 1rem !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }
    .card-body {
        padding: 1rem !important; /* Card ke andar ka space kam kiya */
    }

    /* कार्ड टाइटल्स */
    .card-title, h5 {
        font-size: 1rem !important;
        font-weight: 600 !important;
    }

    .card-text, p {
        font-size: 0.85rem !important;
    }

    .icon-box {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }

    /* 6. Bootstrap की डिफ़ॉल्ट बड़ी पैडिंग को रोकें */
    .p-4, .p-5, .py-5 {
        padding: 1.5rem !important;
    }

    .mb-4, .mb-5 {
        margin-bottom: 1rem !important;
    }

    /* 4. Sidebar Toggler & Header Adjustment */
    .top-header {
        padding-top: 20px !important; /* 40px जगह ऊपर छोड़ी */
        height: auto !important;
        min-height: 70px !important; /* Header की ऊंचाई थोड़ी बढ़ाई */
        align-items: flex-start !important; /* आइटम्स को ऊपर से align करें */
    }
    .navbar-brand img {
        width: 30px;
        height: 30px;
    }

    /* यूजर नाम/आइकन को भी थोड़ा एडजस्ट करें */
    .top-header .ms-auto {
        margin-top: 5px !important;
    }

    /* Sidebar (Menu) को भी Header के नीचे से शुरू करें */
    .sidebar {
        top: 0 !important;
        padding-top: 40px !important; /* साइडबार में भी ऊपर जगह छोड़ी */
        z-index: 1050 !important;
    }

    /* Overlay को पूरे स्क्रीन पर रखें */
    .sidebar-overlay {
        z-index: 1040 !important;
    }



    .sidebar {
        left: 0;
    }
    .main-content {
        width: calc(100% - 260px);
        margin-left: 260px;
    }
    .sidebar-toggler {
        margin-top: 5px !important;
        display: none;
    }
    .sidebar-overlay {
        display: none !important;
    }
    body.sidebar-open .sidebar {
        left: 0;
    }
}


/* =================================================================
   2. MOBILE STYLES (मोबाइल के लिए - बैनर और टेक्स्ट छोटा)
   (max-width: 768px means screens SMALLER than tablets)
   ================================================================= */
@media (max-width: 768px) {

    /* --- A. हेडर फिक्स (Status Bar Issue) --- */
    .top-header {
        padding-top: 45px !important; /* ऊपर जगह छोड़ी */
        padding-bottom: 10px !important;
        height: auto !important;
        align-items: flex-start !important;
    }

    .sidebar {
        padding-top: 50px !important;
        z-index: 1050;
    }

    /* --- B. टेक्स्ट साइज फिक्स --- */
    html, body {
        font-size: 13px !important; /* पूरी साइट का टेक्स्ट छोटा किया */
    }

    h1, .display-5, .display-4 {
        font-size: 1.6rem !important; /* बड़ी हेडिंग्स छोटी कीं */
        line-height: 1.2;
    }

    h3 { font-size: 1.3rem !important; }
    h5 { font-size: 1.1rem !important; }
    p, .lead { font-size: 0.9rem !important; }

    /* --- C. बैनर साइज फिक्स (Aggressive) --- */
    .welcome-banner {
        padding: 1.5rem 1rem !important; /* बैनर के अंदर की जगह (Padding) बहुत कम की */
        border-radius: 12px !important;
        margin-bottom: 1.5rem !important;
        min-height: auto !important; /* फालतू हाइट हटाई */
        text-align: center !important;
    }

    /* बैनर का नाम (Welcome...) */
    .welcome-banner h1,
    .welcome-banner .display-5 {
        font-size: 1.5rem !important; /* नाम छोटा किया */
        margin-bottom: 0.5rem !important;
        font-weight: 700 !important;
    }

    /* बैनर का सब-टेक्स्ट (Ready to crack...) */
    .welcome-banner p,
    .welcome-banner .lead,
    .welcome-banner .fs-5 {
        font-size: 0.85rem !important; /* डिटेल्स बहुत छोटी कीं */
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
        opacity: 0.9;
    }

    /* बैनर का बटन */
    .welcome-banner .btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
        width: 100% !important; /* बटन को फुल चौड़ाई दी */
        display: block;
    }

    /* --- D. कार्ड्स फिक्स --- */
    .card-body {
        padding: 1rem !important;
    }
    .icon-box {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
        margin-right: 0.8rem !important;
    }

    /* --- E. Spacing Fixes --- */
    .p-4, .p-5 {
        padding: 1rem !important;
    }
    .mb-4, .mb-5 {
        margin-bottom: 1rem !important;
    }

    /* Founder Image Fix for Mobile Footer */
    .founder-img {
        width: 60px !important;
        height: 60px !important;
    }
}

/* --- Footer Styles --- */
.footer {
    width: 100%;
}
.founder-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #6c757d;
}
.founder-name {
    margin-top: 10px;
    font-weight: 500;
    font-size: 1rem;
}

/* --- Footer Social Icon Styles --- */
.social-icon {
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.social-icon:hover {
    color: var(--primary-color) !important; /* Uses your main brand color on hover */
    transform: scale(1.1);
}

/* --- Gold Icon & Premium Badge Styles --- */
.text-gold {
    color: #FFD700 !important; /* Golden Yellow */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); /* हल्का सा ग्लो */
}

.badge-premium {
    font-size: 0.6rem !important;
    background: linear-gradient(45deg, #FFD700, #FFA500); /* गोल्ड ग्रेडिएंट */
    color: #000 !important;
    font-weight: 700;
    margin-left: auto; /* राइट साइड में धक्का देने के लिए */
    border: 1px solid #e0c200;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: pulseBadge 2s infinite; /* एनिमेटेड इफेक्ट के लिए */
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Sticky Menu Item & Live Badge --- */
.sticky-nav-item {
    position: sticky;
    top: 0; /* टॉप पर चिपक जाएगा */
    z-index: 100; /* बाकी आइटम के ऊपर रहे */
    background-color: var(--sidebar-bg) !important; /* साइडबार का बैकग्राउंड */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* अलग दिखाने के लिए बॉर्डर */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* परछाई ताकि उभरा हुआ दिखे */
}

.badge-live {
    font-size: 0.6rem !important;
    background-color: #ef4444; /* लाल रंग */
    color: white !important;
    font-weight: 700;
    margin-left: auto;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    animation: blinkLive 1.5s infinite; /* ब्लिंक एनीमेशन */
}

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

/* अगर यूजर इस पेज पर एक्टिव है तो स्टाइल */
.sticky-nav-item a.active {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), transparent) !important;
    border-left-color: #ef4444 !important;
}


.sidebar-header {
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-name {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.4rem;
    text-transform: lowercase; /* Professional look ke liye sab small */
}

.brand-tagline {
    font-size: 0.65rem;
    color: var(--sidebar-link-color);
    display: block;
    margin-top: -2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Logo hover effect */
.sidebar-header a:hover .brand-name {
    color: var(--secondary-color);
    transition: 0.3s;
}

.target-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.target-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary-color);
}

#sidebar-goal-text {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}