    :root {
        --primary-color: #116066;        
        --primary-dark: #d8f3f5;        
        --secondary-color: #0F2F2F;    
        --background-color: #e0e0e03f;    
        --sidebar-bg: #1f9199;          
        --sidebar-link-color: #c7c7c7; 
        --sidebar-link-hover-bg: #fff; 
        --sidebar-link-active-color: #FFFFFF; 
    }

    .btn-primary {
    --bs-btn-color: rgb(1, 76, 82);
    --bs-btn-bg: #d8f3f5;
    --bs-btn-border-color: #d8f3f5;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0a58ca;
    --bs-btn-active-border-color: #0a53be;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #0d6efd;
    --bs-btn-disabled-border-color: #0d6efd;
}


.bg-warning {
    --bs-bg-opacity: 1;
    background-color: #f1c40f !important;
}

.bg-danger {
    --bs-bg-opacity: 1;
    background-color: #e04141 !important;
}





        body { 
            font-family: 'iransansx', sans-serif; 
            background-color: var(--background-color);
            overflow-x: hidden; /* Prevent horizontal scroll */
        }
        .navbar-brand, h1, h2, h3, h4, h5, h6, .btn {
            font-family: 'ModamVF', sans-serif;
        }

        a {
            color: rgba(var(--secondary-color), var(--bs-link-opacity, 1));
            text-decoration: unset;
        }
        .wrapper {
            display: flex;
            width: 100%;
            align-items: stretch;
            background: var(--background-color);
            font-family: 'iransansx', sans-serif;
        }

        /* --- Sidebar --- */
        #sidebar {
            min-width: 250px;
            max-width: 250px;
            background: var(--sidebar-bg);
            color: #fff;
            transition: all 0.3s ease-in-out;
            position: fixed;
            top: 0;
            right: 0;
            height: 100vh;
            z-index: 999;
            box-shadow: -4px 0 20px rgba(0,0,0,0.15);
            border-left: 1px solid rgba(255,255,255,0.05);
            border-radius: 1rem 0 0 1rem;
        }

        #sidebar.collapsed {
            margin-right: -170px; /* 250px - 80px */
        }

        #sidebar .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            text-align: center;
            font-weight: 600;
            font-size: 1.2rem;
            letter-spacing: 0.5px;
        }

        #sidebar ul.components {
            padding: 20px 0;
        }

        #sidebar ul li a {
            padding: 12px 20px;
            font-size: 1.1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--sidebar-link-color);
            text-decoration: none;
            border-radius: 0.6rem;
            margin: 4px 12px;
            transition: all 0.25s ease-in-out;
        }

        #sidebar ul li a:hover {
            color: #13737a;
            background: var(--sidebar-link-hover-bg);
            transform: translateX(-5px);
        }

        #sidebar ul li.active > a {
            color: var(--primary-color);
            background: var(--sidebar-link-active-color);
            box-shadow: inset -2px -2px 6px rgba(255,255,255,0.15),
                        inset 2px 2px 6px rgba(0,0,0,0.2);
        }

        /* --- Content --- */
        #content {
            width: 100%;
            padding: 30px;
            min-height: 100vh;
            transition: all 0.3s ease-in-out;
            margin-right: 250px;
        }

        #content.sidebar-collapsed {
            margin-right: 80px;
        }

        /* --- Mobile --- */
        @media (max-width: 768px) {
            #sidebar {
                margin-right: -250px; 
            }
            #sidebar.active {
                margin-right: 0;
            }
            #sidebar.collapsed {
                margin-right: -250px;
            }
            #content {
                margin-right: 0 !important;
            }
            .overlay {
                display: none;
                position: fixed;
                width: 100vw;
                height: 100vh;
                background: rgba(0, 0, 0, 0.7);
                z-index: 998;
                opacity: 0;
                transition: all 0.5s ease-in-out;
            }
            .overlay.active {
                display: block;
                opacity: 1;
            }
        }

        /* --- Cards --- */
        .card {
            border: none;
            border-radius: 2rem;
            corner-shape: squircle;
            background: #fff;
            box-shadow: 0 6px 20px rgba(0,0,0,0.08);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 24px rgba(0,0,0,0.12);
        }

        /* --- Floating Back Button --- */
        .float-back-btn {
            position: fixed;
            width: 55px;
            height: 55px;
            bottom: 25px;
            left: 25px;
            background: #0f2f2fa3;
            color: #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            text-decoration: none;
            z-index: 1000;
            box-shadow: 0 6px 16px rgba(0,0,0,0.25);
            transition: all 0.3s ease-in-out;
        }
        .float-back-btn:hover {
            background: var(--primary-color);
            transform: scale(1.1) rotate(-5deg);
        }

        /* --- Headings --- */
        h2.fw-bold.mb-0 {
            font-size: 1rem !important;
            font-weight: 700;
            color: var(--secondary-color);
            letter-spacing: 0.5px;
        }

        /* وقتی سایدبار collapse شد */
        #sidebar.collapsed {
            width: 80px;
            min-width: 80px;
            max-width: 80px;
            margin-right: 0; /* دیگه margin منفی نزن */
            overflow: hidden;
            text-align: center;
            transition: all 0.3s ease-in-out;
        }

        /* لینک‌ها در حالت collapsed */
        #sidebar.collapsed ul li a {
            justify-content: center; /* آیکون وسط چین */
            padding: 12px;
        }

        /* متن لینک مخفی بشه */
        #sidebar.collapsed ul li a .link-text {
            display: none;
        }

        /* هدر هم جمع بشه */
        #sidebar.collapsed .sidebar-header h3 {
            display: none;
        }

        #sidebar.collapsed .sidebar-header img {
            width: 40px; /* لوگو کوچیک‌تر */
            height: auto;
        }

        .form-control:focus {
            color: var(--bs-body-color);
            background-color: var(--bs-body-bg);
            border-color: var(--sidebar-bg);
            outline: 0;
            box-shadow: 0 0 0 .25rem rgba(114, 220, 208, 0.25);
        }

        textarea#content{
            margin-right: 0;
            min-height: 30vh;
        }
