
            :root {
                --font-family-sans-serif: 'Vazirmatn', sans-serif; --border-radius-sm: 0.3rem; --border-radius-md: 0.5rem; --border-radius-lg: 0.8rem; --shadow-sm: 0 2px 4px rgba(0,0,0,0.05); --shadow-md: 0 5px 15px rgba(0,0,0,0.1); --shadow-lg: 0 10px 30px rgba(0,0,0,0.1); --transition-base: all 0.2s ease-in-out;
            }
            body { font-family: var(--font-family-sans-serif); margin: 0; direction: rtl; line-height: 1.65; font-size: 15px; overflow-x: hidden; } /* Added overflow-x: hidden */
            .auth-page-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; box-sizing: border-box; }
            .auth-container { padding: 0; border-radius: var(--border-radius-lg); width:100%; max-width:450px; text-align:center; border: none !important; box-shadow: none !important;} /* [FIX] Removed padding/border/shadow from outer container */
            .auth-container .logo-icon { width: 60px; height: 60px; margin-bottom: 20px; }
            .auth-container h1 { font-weight: 700; font-size: 26px; margin-bottom:10px; }
            .auth-container p.subtitle { font-size:16px; margin-bottom:25px; line-height: 1.7;}
            .form-group { margin-bottom: 22px; text-align: right; }
            .form-group label { font-weight:500; font-size:14px; display: block; margin-bottom: 8px;}
            .form-group input[type='tel'], .form-group input[type='text'], .form-group input[type='password'],
            .form-section input[type='text'], .form-section input[type='number'], .form-section textarea, .form-section select, .form-control {
                width: 100%; padding: 12px 16px; border-radius: var(--border-radius-md); font-size: 15px; box-sizing: border-box; transition: var(--transition-base); border: 1px solid;
            }
            .form-group input[type='tel'] { direction: ltr; text-align: left; }
            .form-group input[name='code'] { text-align: center; letter-spacing: 4px; font-size: 18px; padding: 10px; }
            button.submit-btn, .form-section button[type='submit'], .button-link, .theme-toggle-btn {
                font-weight: 500; transition: var(--transition-base); padding: 12px 22px; border:none; cursor:pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            }
            button.submit-btn:active, .form-section button[type='submit']:active { transform: translateY(1px); }
            .message { border: 1px solid transparent; font-weight:500; border-radius: var(--border-radius-md); padding:14px 18px; margin-bottom:20px; font-size:14px; text-align: right; display: flex; align-items: center; gap: 10px;}
            .message::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 18px; }
            .message.error::before { content: '\f071'; } .message.success::before { content: '\f058'; } .message.info::before { content: '\f05a'; } .message.warning::before { content: '\f071'; }
            .page-links { margin-top: 30px; } .page-links a { font-weight: 500; font-size: 14px; text-decoration: none; margin: 0 8px; }
            .admin-app-body { display: flex; } .admin-layout { display: flex; width: 100%; min-height: 100vh; }
            .admin-sidebar {
                width: 270px;
                display: flex;
                flex-direction: column;
                position:fixed;
                right:0;
                top:0;
                bottom:0;
                z-index:1000;
                transition: var(--transition-base), width 0.2s ease-in-out; /* Added width transition */
            }
            .admin-sidebar.collapsed {
                width: 70px;
            }
            .admin-sidebar.collapsed .sidebar-header span {
                opacity: 0; /* Fade out text */
                visibility: hidden; /* Hide completely */
                transition: opacity 0.1s ease, visibility 0s linear 0.1s;
            }
            .admin-sidebar.collapsed .sidebar-header .logo-icon,
            .admin-sidebar.collapsed .sidebar-header .logo-image { /* Apply to both icon and image */
                 margin: 0 auto; /* Center logo when collapsed */
            }
            .admin-sidebar.collapsed .sidebar-nav a {
                justify-content: center;
                gap: 0;
                 padding: 14px 10px; /* Adjust padding for icon only */
            }
            .admin-sidebar.collapsed .sidebar-nav a span {
                 display: none; /* Hide text */
                 /* Removed opacity/visibility transition for span as display:none handles it */
            }
            .admin-sidebar.collapsed .sidebar-toggle-btn .fa-chevron-left {
                transform: rotate(180deg);
            }
            .sidebar-header { padding: 25px 20px; text-align: center; display:flex; align-items:center; justify-content:center; gap:12px; height: 70px; box-sizing: border-box;}
            .sidebar-header .logo-icon { width:30px; height:30px;}
            .sidebar-header .logo-image { max-height: 36px; max-width: 100%; object-fit: contain; } /* Ensure logo image scales */
            .sidebar-header span { font-size: 20px; font-weight: 600; white-space: nowrap; opacity: 1; visibility: visible; transition: opacity 0.1s ease, visibility 0s linear 0s; } /* Fade in text */
            .sidebar-toggle-btn {
                position: absolute;
                left: -15px; /* Position relative to sidebar edge */
                top: 50%;
                transform: translateY(-50%);
                background-color: var(--primary-color);
                color: white;
                border: none;
                width: 30px;
                height: 30px;
                border-radius: 50%;
                box-shadow: var(--shadow-md);
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: var(--transition-base);
                z-index: 1001;
            }
            .sidebar-toggle-btn:hover {
                transform: translateY(-50%) scale(1.1);
            }
            .sidebar-nav { flex-grow: 1; padding-top: 15px; overflow-y: auto; overflow-x: hidden; } /* Hide horizontal scroll */
            .sidebar-nav a {
                display: flex;
                align-items: center;
                padding: 14px 25px;
                text-decoration: none;
                font-weight: 500;
                transition: var(--transition-base);
                font-size:15px;
                border-right: 4px solid transparent;
                margin-bottom: 4px;
                gap: 12px;
                white-space: nowrap; /* Prevent text wrapping */
            }
             .sidebar-nav a span {
                 opacity: 1;
                 visibility: visible;
                 transition: opacity 0.1s ease, visibility 0s linear 0s; /* Match text fade */
             }
            .nav-icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; } /* Prevent icon shrinking */
            .sidebar-footer { padding: 20px; text-align:center; margin-top: auto; }
            .logout-link { display: block; padding: 11px 15px; border-radius: var(--border-radius-md); text-decoration: none; font-weight: 500; margin-top:12px; text-align:center; width: 100%;}
            .logout-link-icon { color: var(--danger-color) !important; font-size: 1.5rem !important; }
            .theme-toggle-btn-sidebar { width: 100%; padding: 10px 15px; font-size: 14px;}
            .admin-main-content {
                flex-grow: 1;
                padding: 0;
                margin-right: 270px;
                transition: margin-right 0.2s ease-in-out; /* Match sidebar width transition */
                display: flex;
                flex-direction: column;
                position: relative;
                z-index: 1;
            }
            .admin-main-content.shifted {
                margin-right: 70px;
            }
            .main-content-header {
                padding: 20px 30px;
                height: 70px;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                position: sticky; /* Sticky header */
                top: 0;
                z-index: 999;
                /* NEW: Flex settings for mobile toggle */
                justify-content: space-between; /* [FIX] Changed to space-between for button positioning */
                gap: 20px;
            }
            .page-title-main { font-weight:600; font-size:22px; margin:0;}
            .content-wrapper { padding: 25px 30px;}
            .card { border-radius: var(--border-radius-lg); margin-bottom: 30px; overflow: hidden; }
            .card-header { padding: 1.1rem 1.5rem; margin-bottom: 0; font-size: 1.2rem; font-weight: 600; }
            .card-body { padding: 1.5rem; }
            .table-wrapper { overflow-x: auto; border-radius: var(--border-radius-md); }
            table { border-collapse: separate; border-spacing: 0; width:100%; font-size: 14px;}
            th, td { padding: 14px 18px; text-align: right; vertical-align: middle;}
            th { font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
            td .profile-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-left: 10px; vertical-align: middle;}
            td .account-details span { display: block; font-size: 0.85em; opacity: 0.8; }
            td input[type='checkbox'] { margin-left: 10px; vertical-align: middle; width:18px; height:18px; cursor: pointer;}
            .form-group input[type='number'] { direction: ltr; text-align: left; } /* ADDED */
            .form-section { border-radius:var(--border-radius-md); padding:25px; margin-bottom:25px;}
            .form-section h2, .form-section h3 { font-weight:600; font-size:18px; padding-bottom:12px; margin-bottom:20px; margin-top: 0;}
            .form-section textarea { min-height: 80px; resize: vertical; }
            .batch-results { margin-top: 20px; padding:20px; border-radius: var(--border-radius-md); max-height: 300px; overflow-y: auto; font-size: 13.5px; line-height:1.7;}
            .batch-results h4 { margin-top:18px; margin-bottom:8px; font-size: 16px; font-weight:600;}
            .batch-results hr { margin: 12px 0; border:0; height: 1px; }
            .status-badge { padding: 4px 10px; border-radius: var(--border-radius-sm); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px;}
            .status-badge .fas { font-size: 11px;}
            .action-form-fields { margin-top: 20px; padding: 20px; border-radius: var(--border-radius-md); }
            .pagination { display: flex; justify-content: center; padding: 0; list-style: none; margin-top: 25px; }
            .pagination li { margin: 0 4px; }
            .pagination li a, .pagination li span { display: block; padding: 8px 14px; text-decoration: none; border-radius: var(--border-radius-sm); font-weight:500; font-size: 14px; transition: var(--transition-base);}
            .pagination li a:hover { background-color: #e9ecef; }
            .pagination li.active span { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
            .pagination li.disabled span { color: var(--text-muted-color); border-color: var(--border-color); background-color: var(--bg-table-header); }
            .search-form { margin-bottom: 25px; display:flex; gap:12px; align-items:center; }
            .search-form input[type='text'] { flex-grow:1; padding:11px 15px; font-size:14px; border-radius:var(--border-radius-md);}
            .search-form button { padding:11px 18px; font-size:14px; border-radius:var(--border-radius-md); }
            .button-link { padding: 7px 12px; font-size: 13px; text-decoration:none; border-radius:var(--border-radius-sm); margin: 2px; font-weight:500;}
            .theme-toggler-container { margin-top:25px; text-align:center; }
            .theme-toggle-btn { padding: 9px 15px; font-size: 13px;}
            th input[type='checkbox'] { margin: 0 auto; display: block;}
            .api-hash-display { font-family: monospace; font-size: 0.9em; word-break: break-all;}
            .status-toggle-btn.active { background-color: var(--success-color); color: white; }
            .status-toggle-btn.inactive { background-color: var(--secondary-color); color: white; }
            .status-toggle-btn:hover { opacity: 0.8; }
            .code-block { background-color: var(--bg-table-header); border: 1px solid var(--border-color); padding: 15px; border-radius: var(--border-radius-md); margin: 15px 0; direction: ltr; text-align: left; font-family: monospace; white-space: pre-wrap; word-break: break-all; font-size: 14px;}
            
            /* Enhanced styles for Status Grid Items (Optimized for graphics) */
            .status-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 20px;
                margin-bottom: 20px;
            }
            .status-item {
                padding: 20px;
                border-radius: var(--border-radius-lg);
                border: 1px solid var(--border-color);
                box-shadow: 0 4px 10px rgba(0,0,0,0.05);
                transition: var(--transition-base);
                text-align: right;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                min-height: 80px; 
                position: relative; /* For the left border */
            }
            .status-item:hover {
                box-shadow: 0 6px 15px rgba(0,0,0,0.1);
                transform: translateY(-2px);
            }
            .status-item strong {
                display: block;
                font-size: 0.9em;
                color: var(--text-muted-color);
                margin-bottom: 5px;
                display: flex;
                align-items: center;
                gap: 8px;
            }
            .status-item span {
                display: block;
                font-weight: 700;
                font-size: 1.2rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            
            /* Status Specific Colors (for better contrast/graphics) */
            .status-success { border-right: 5px solid var(--success-color); }
            .status-error { border-right: 5px solid var(--danger-color); }
            .status-info { border-right: 5px solid var(--info-color); }
            
            /* New styles for top horizontal navigation */
            .top-horizontal-nav {
                background-color: var(--bg-main-content-header); /* Same as header */
                padding: 10px 20px;
                display: flex;
                justify-content: flex-start; /* Align items to the start (right in RTL) */
                align-items: center;
                gap: 80px; /* Increased gap for better spacing */
                border-bottom: 1px solid var(--border-sidebar);
                box-shadow: var(--shadow-sm);
                position: sticky; /* Make it sticky */
                top: 70px; /* Position below the main header */
                z-index: 998; /* Lower z-index than main header */
                flex-wrap: wrap; /* Allow items to wrap on smaller screens */
            }

            .top-horizontal-nav .nav-item {
                position: relative;
                flex-shrink: 0; /* Prevent items from shrinking too much */
            }

            .top-horizontal-nav .nav-item a {
                display: flex;
                align-items: center;
                padding: 8px 15px;
                text-decoration: none;
                font-weight: 500;
                color: var(--text-color);
                transition: all 0.2s ease-in-out;
                border-radius: var(--border-radius-sm);
            }

            .top-horizontal-nav .nav-item a:hover {
                background-color: var(--sidebar-bg-hover-color);
                color: var(--sidebar-text-hover-color);
            }

            .top-horizontal-nav .nav-item.active a {
                background-color: var(--sidebar-active-bg-color);
                color: var(--sidebar-active-text-color);
            }

            .top-horizontal-nav .nav-item .nav-icon {
                margin-left: 8px; /* Space between icon and text */
            }

            /* Dropdown specific styles */
            .top-horizontal-nav .dropdown,
            .user-top-nav .dropdown {
                position: relative;
            }

            .top-horizontal-nav .dropdown .dropdown-toggle,
            .user-top-nav .dropdown .dropdown-toggle {
                cursor: pointer;
                padding: 8px 15px;
            }
            .top-horizontal-nav .dropdown-menu,
            .user-top-nav .dropdown-menu {
                display: none;
                position: absolute;
                background-color: var(--bg-card);
                min-width: 200px; /* Increased min-width for better content display */
                box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Stronger shadow for graphical appeal */
                border-radius: var(--border-radius-md); /* More rounded corners */
                z-index: 1000; /* Ensure dropdown is above content */
                top: calc(100% + 10px); /* Position further below the toggle for visual separation */
                right: 0; /* Align to the right in RTL */
                padding: 12px 0; /* Increased padding */
                border: 1px solid var(--border-card);
                opacity: 0;
                transform: translateY(10px);
                transition: opacity 0.3s ease-out, transform 0.3s ease-out; /* Smoother transition */
                pointer-events: none; /* Prevent interaction when hidden */
            }

            .user-profile-info-card {
                padding: 20px !important;
                display: flex;
                flex-direction: column;
                gap: 15px;
                min-width: 250px;
            }

            .user-profile-info-card .profile-info-row {
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size: 14px;
                color: var(--text-color);
            }
            .user-profile-info-card .profile-info-row i {
                color: var(--primary-color);
                margin-left: 8px;
                font-size: 16px;
            }

            .top-horizontal-nav .dropdown:hover .dropdown-menu,
            .top-horizontal-nav .dropdown.show .dropdown-menu,
            .user-top-nav .dropdown:hover .dropdown-menu,
            .user-top-nav .dropdown.show .dropdown-menu { /* .show class for JS toggle */
                display: block;
                opacity: 1;
                transform: translateY(0);
                pointer-events: all;
            }

            .top-horizontal-nav .dropdown-menu .dropdown-item,
            .user-top-nav .dropdown-menu .dropdown-item {
                display: flex;
                align-items: center;
                padding: 10px 20px; /* Increased padding for dropdown items */
                text-decoration: none;
                color: var(--text-color);
                font-weight: 500;
                transition: background-color 0.2s ease, color 0.2s ease;
            }

            .top-horizontal-nav .dropdown-menu .dropdown-item:hover,
            .user-top-nav .dropdown-menu .dropdown-item:hover {
                background-color: var(--sidebar-bg-hover-color);
                color: var(--sidebar-text-hover-color);
            }

            .top-horizontal-nav .dropdown-menu .dropdown-item.active,
            .user-top-nav .dropdown-menu .dropdown-item.active {
                background-color: var(--sidebar-active-bg-color);
                color: var(--sidebar-active-text-color);
            }

            .top-horizontal-nav .dropdown-arrow,
            .user-top-nav .dropdown-arrow {
                margin-left: 8px; /* Space for the arrow */
                font-size: 0.8em;
                transition: transform 0.2s ease;
            }

            .top-horizontal-nav .dropdown.show .dropdown-arrow,
            .user-top-nav .dropdown.show .dropdown-arrow {
                transform: rotate(180deg);
            }

            /* Adjust main content area to account for the top bar */


            /* Remove the second navigation bar */


            /* Ensure content starts below the top header */
            .content-wrapper {
                padding-top: 25px;
            }

            /* New user top nav */
            .user-top-nav {
                background-color: var(--bg-main-content-header);
                padding: 10px 20px;
                display: flex;
                justify-content: flex-end; /* Align items to the left in RTL */
                align-items: center;
                gap: 20px;
                border-bottom: 1px solid var(--border-sidebar);
                box-shadow: var(--shadow-sm);
                position: sticky;
                top: 70px; /* Position below main header */
                z-index: 998; /* Lower than main header */
            }

            .user-top-nav .user-profile-info {
                display: flex;
                align-items: center;
                gap: 15px;
                color: var(--text-color);
            }

            .user-top-nav .user-nav-icons {
                display: flex;
                align-items: center;
                gap: 25px; /* Increased gap */
            }

            .user-top-nav .nav-icon-link {
                color: var(--text-color);
                opacity: 0.8;
                font-size: 1.5rem; /* Increased size */
                transition: opacity 0.2s ease, transform 0.2s ease;
            }
            .user-top-nav .nav-icon-link:hover {
                opacity: 1;
                transform: scale(1.1);
            }
            .user-top-nav .dropdown-toggle .nav-icon {
                font-size: 1.5rem; /* Increased size for dropdown icons */
                margin-left: 0;
            }
            
            /* --- START: [NEW] CSS برای دکمه بازگشت ادمین --- */
            .btn-return-admin {
                background-color: var(--warning-color);
                color: var(--warning-text-color) !important; /* Force text color */
                font-weight: 600;
                padding: 8px 15px;
                border-radius: var(--border-radius-md);
                text-decoration: none;
                transition: var(--transition-base);
                flex-shrink: 0; 
                order: 2; /* Position it on the left side (or end in RTL flex) */
                display: inline-flex;
                align-items: center;
                gap: 8px;
            }
            .btn-return-admin:hover {
                background-color: var(--warning-color); 
                opacity: 0.9;
                transform: translateY(-1px);
                box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            }
            .btn-return-admin i {
                transform: scaleX(-1); /* Reverse arrow direction to point to admin panel */
            }
            /* --- END: [NEW] CSS برای دکمه بازگشت ادمین --- */
            
            /* --- NEW CSS for Sidebar Group Header --- */
            .sidebar-nav .sidebar-group-header {
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                padding: 10px 25px 5px;
                color: var(--text-muted-color);
                opacity: 0.8;
            }
            .admin-sidebar.collapsed .sidebar-nav .sidebar-group-header {
                display: none; /* Hide group header when collapsed */
            }
            /* --- END NEW CSS for Sidebar Group Header --- */


            /* New styles for mobile sidebar toggle button */
            .mobile-sidebar-toggle-btn {
                display: none; /* Hidden by default on desktop */
                background: none;
                border: none;
                font-size: 24px;
                color: var(--text-color);
                cursor: pointer;
                padding: 0;
                order: -1; /* Place it before the title in the flex header */
            }

            .mobile-menu-backdrop {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.5);
                z-index: 9990; /* High z-index, below sidebar */
            }
            
            /* Responsive adjustments for smaller screens */
            @media (max-width: 1024px) {
                .admin-sidebar {
                    width: 200px; /* Smaller sidebar */
                }
                 .admin-sidebar.collapsed {
                     width: 60px; /* Adjusted collapsed width */
                 }
                .admin-main-content {
                    margin-right: 200px; /* Adjust margin for smaller sidebar */
                }
                 .admin-main-content.shifted {
                     margin-right: 60px; /* Adjusted shifted margin */
                 }
                .top-horizontal-nav {
                    padding: 8px 15px;
                    gap: 10px;
                     top: 70px; /* Keep below main header */
                }
                .top-horizontal-nav .nav-item a {
                    padding: 6px 10px;
                    font-size: 14px;
                }
            }
            
            /* --- START: [FIX] NEW TABLE & ACTION STYLES (for admin_manage_blog_posts) --- */
            .blog-actions {
                 display: flex;
                 flex-direction: row; /* Always show as row */
                 flex-wrap: wrap; /* Allow wrapping */
                 gap: 5px;
                 justify-content: flex-end;
            }
            /* Ensure the Comment badge text is visible */
            /* [NEW FIX] Ensure status badges display correctly in table cells */
            .table-wrapper table td .status-badge {
                 white-space: nowrap;
                 margin: 2px 0;
            }
            
            /* Hide verbose text on mobile for action buttons */
            @media (max-width: 768px) {
                /* [CRITICAL FIX] Hiding text for tight mobile view */
                .blog-actions a span, .blog-actions a.delete span, .blog-actions a.details span {
                    display: none; /* Hide button text */
                }
                .blog-actions a {
                    padding: 6px 8px; /* Smaller button padding */
                    font-size: 10px;
                }
                
                /* Optionally reduce padding on image column */
                .table-wrapper table th:nth-child(1),
                .table-wrapper table td:nth-child(1) {
                    padding: 8px 10px;
                }
                .table-wrapper table th:nth-child(2),
                .table-wrapper table td:nth-child(2) {
                    /* Title column: allow it to take more space */
                    max-width: 150px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
                
                /* Hide Slug and Date Created on smaller mobile screens */
                /* Columns: 1=تصویر, 2=عنوان, 3=اسلاگ, 4=لایک, 5=بازدید, 6=نظرات, 7=تاریخ ایجاد, 8=اقدامات */
                .table-wrapper table th:nth-child(3),
                .table-wrapper table td:nth-child(3), /* اسلاگ */
                .table-wrapper table th:nth-child(7),
                .table-wrapper table td:nth-child(7) { /* تاریخ ایجاد */
                    display: none;
                }
                
                /* [NEW FIX] Shrink Likes and Views columns slightly */
                .table-wrapper table th:nth-child(4),
                .table-wrapper table td:nth-child(4), /* لایک */
                .table-wrapper table th:nth-child(5),
                .table-wrapper table td:nth-child(5) { /* بازدید */
                    padding: 8px 10px;
                }
                
                /* [NEW FIX] Ensure comments column takes minimal space while remaining readable */
                 .table-wrapper table th:nth-child(6),
                 .table-wrapper table td:nth-child(6) {
                     min-width: 80px; /* Ensure a minimum width */
                     padding: 8px 10px;
                     text-align: center;
                 }
                 
                 /* [NEW FIX] Button container alignment */
                 .blog-actions {
                     justify-content: center;
                     align-items: center;
                     padding: 0;
                 }
            }
            /* --- END: [FIX] NEW TABLE & ACTION STYLES --- */

            /* Refactored Mobile Layout (Below 768px) */
            @media (max-width: 768px) {
                /* 1. Show mobile toggle and remove desktop toggle's fixed behavior */
                .mobile-sidebar-toggle-btn {
                    display: block; /* Show the hamburger menu on mobile */
                }
                /* Hide desktop collapse button on mobile */
                .admin-sidebar .sidebar-toggle-btn {
                    display: none;
                }

                /* 2. Configure Sidebar for mobile slide-in */
                .admin-sidebar {
                    position: fixed; /* Fixed position on mobile */
                    width: 250px; /* Standard mobile menu width */
                    right: -250px; /* Initially off-screen */
                    top: 0;
                    bottom: 0;
                    height: 100vh;
                    z-index: 9999; /* Highest z-index for the sidebar */
                    box-shadow: -5px 0 15px rgba(0,0,0,0.4);
                    transition: right 0.3s ease-in-out; /* Only transition right */
                    border-left: 1px solid var(--border-sidebar); /* Separator when open */
                    border-right: none; /* Remove desktop border */
                }
                .admin-sidebar.mobile-open {
                    right: 0; /* Slide in */
                }
                /* Ensure desktop collapse class doesn't interfere on mobile */
                 /* Remove collapsed styles effect on mobile */
                 .admin-sidebar.collapsed,
                 .admin-sidebar.collapsed .sidebar-header span,
                 .admin-sidebar.collapsed .sidebar-header .logo-icon,
                 .admin-sidebar.collapsed .sidebar-header .logo-image,
                 .admin-sidebar.collapsed .sidebar-nav a,
                 .admin-sidebar.collapsed .sidebar-nav a span {
                    /* Reset styles that affect mobile view */
                    width: 250px;
                    opacity: 1;
                    visibility: visible;
                    justify-content: flex-start; /* Reset nav link alignment */
                    padding: 14px 25px; /* Reset nav link padding */
                    display: flex; /* Ensure span is displayed */
                    margin: 0; /* Reset logo margin */
                 }
                 .admin-sidebar.collapsed .sidebar-nav a span {
                     display: inline; /* Ensure text is visible */
                 }
                 .admin-sidebar.collapsed .sidebar-nav .sidebar-group-header {
                    display: block; /* Restore group header display on mobile open */
                }


                /* 3. Main Content: Full width, no margin */
                .admin-main-content {
                    margin-right: 0; /* Full width */
                    padding-bottom: 50px; /* Extra padding for mobile scrolling */
                    transition: none; /* Disable margin transition on mobile */
                }
                .admin-main-content.shifted {
                    margin-right: 0; /* Ignore desktop 'shifted' class on mobile */
                }

                /* 4. Top Navigation (User & Admin): Hide on mobile */
                 .top-horizontal-nav, .user-top-nav {
                     display: none;
                 }


                .main-content-header {
                    position: sticky; /* Keep it sticky */
                    top: 0;
                    padding: 15px 15px; /* Smaller header padding */
                    height: auto; /* Let height adjust */
                    min-height: 60px; /* Ensure minimum height */
                    z-index: 990; /* Below sidebar */
                    justify-content: space-between; /* [FIX] Space between title/toggle and button */
                }
                .page-title-main {
                     font-size: 18px; /* Smaller title */
                     margin-right: 10px; /* Space from toggle button */
                }
                
                .content-wrapper {
                    padding: 15px; /* Smaller padding on mobile */
                }
                
                /* Adjust forms and tables on mobile */
                .search-form {
                    flex-direction: column;
                    align-items: stretch;
                }
                .search-form input[type='text'] {
                    width: 100%;
                }
                .search-form button {
                     width: 100%;
                }
                .table-wrapper {
                    border-radius: 0; /* No rounding */
                    border-left: none;
                    border-right: none;
                }
                th, td {
                    padding: 10px 12px;
                }

                /* Auth Page Layout */
                .auth-page-body {
                    padding: 10px;
                }
                .auth-container {
                    max-width: 100%;
                }
                /* Mobile adjustment for return button */
                .btn-return-admin {
                    font-size: 13px;
                    padding: 6px 10px;
                    order: 3; /* Move it to the very end on mobile, after title */
                }
            }

            /* Ensure desktop collapse logic is only for wider screens */
            @media (min-width: 769px) {
                .mobile-sidebar-toggle-btn {
                    display: none;
                }
                /* Restore top nav bars for desktop */
                 .top-horizontal-nav, .user-top-nav {
                     display: flex; /* Or initial display value */
                 }
            }


            /* Styles for the modal */
            .modal {
                display: none; /* Hidden by default */
                position: fixed;
                z-index: 2000; /* High z-index to be on top of everything */
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                overflow: auto;
                background-color: rgba(0, 0, 0, 0.4);
                justify-content: center;
                align-items: center;
            }

            .modal-content {
                background-color: var(--bg-card);
                padding: 30px;
                border-radius: var(--border-radius-lg);
                box-shadow: var(--shadow-lg);
                width: 90%;
                max-width: 400px;
                text-align: center;
                position: relative;
                animation-name: animatetop;
                animation-duration: 0.4s;
            }

            .close-btn {
                color: var(--text-muted-color);
                position: absolute;
                top: 10px;
                right: 15px;
                font-size: 28px;
                font-weight: bold;
                cursor: pointer;
            }

            .close-btn:hover,
            .close-btn:focus {
                color: var(--text-color);
                text-decoration: none;
            }

            .modal-content h3 {
                font-size: 24px;
                font-weight: 600;
                margin-bottom: 10px;
            }

            .modal-content p {
                font-size: 16px;
                line-height: 1.5;
                margin-bottom: 20px;
            }

            .modal-buttons {
                display: flex;
                justify-content: center;
                gap: 15px;
            }

            .modal-buttons .confirm-btn {
                background-color: var(--danger-color);
                color: white;
                padding: 12px 25px;
                border-radius: var(--border-radius-md);
                text-decoration: none;
                transition: background-color 0.2s ease;
            }

.modal-buttons .confirm-btn:hover {
                background-color: var(--danger-color-hover);
            }

            .modal-buttons .cancel-btn {
                background-color: var(--secondary-color);
                color: white;
                border: none;
                cursor: pointer;
                padding: 12px 25px;
                border-radius: var(--border-radius-md);
                transition: background-color 0.2s ease;
            }

            .modal-buttons .cancel-btn:hover {
                background-color: var(--secondary-color-hover);
            }

            /* Animations */
            @keyframes animatetop {
                from { top: -300px; opacity: 0; }
                to { top: 0; opacity: 1; }
            }
            
            /* --- START: NEW BLOG STYLES (Public) --- */
            
/* --- START: ENHANCED BLOG STYLES (Public) - FULLY RESPONSIVE WITH IMAGE RESIZE FIX --- */

/* 1. Blog List Layout and Grid */
.blog-list-container {
    padding: 40px 20px !important; 
    margin: 0 auto;
    width: 95%; 
    max-width: 1300px; 
}
.posts-grid {
     display: grid; 
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
     gap: 30px; 
}

/* 2. Post Card Styling */
.post-card {
    border: 1px solid var(--border-card);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    display: flex; 
    flex-direction: column; 
}
.post-card:hover {
     transform: translateY(-8px); 
     box-shadow: 0 12px 30px rgba(0,0,0,0.18); 
}
.post-card .post-image-wrapper {
    overflow: hidden;
    height: 200px; 
    border-bottom: 1px solid var(--border-color);
}
.post-card img {
    width: 100%;
    height: 100% !important; 
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.5s ease; 
}
.post-card:hover img {
    transform: scale(1.1); 
}
.post-card .card-content {
    padding: 20px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}
.post-card h2 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--text-color); 
}
.post-card h2 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s;
}
.post-card h2 a:hover {
    color: var(--primary-color) !important;
}
.post-card .excerpt {
    font-size: 14px;
    color: var(--text-muted-color);
    margin-bottom: 15px;
    flex-grow: 1;
}

.tags-list {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-card .tag-link {
     background-color: var(--primary-color);
     color: white !important; 
     padding: 4px 10px;
     border-radius: var(--border-radius-sm);
     font-size: 12px;
     text-decoration: none;
     transition: background-color 0.2s;
     font-weight: 500;
     white-space: nowrap;
}
.post-card .tag-link:hover {
    background-color: var(--primary-color-hover);
}

.card-footer-meta {
     display: flex; 
     justify-content: space-between; 
     font-size: 13px; 
     color: var(--text-muted-color); 
     border-top: 1px dashed var(--border-color); 
     padding-top: 10px; 
     margin-top: 15px;
     align-items: center;
}
.card-footer-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.card-footer-meta .fa-heart { 
    color: var(--danger-color);
    transition: transform 0.2s;
}
.post-card:hover .fa-heart {
    transform: scale(1.1);
}

/* 3. Blog Post Detail Styles */
.blog-container {
     width: 95%; 
     max-width: 900px; 
     margin: 40px auto; 
     background-color: var(--bg-card);
     border-radius: var(--border-radius-lg); 
     box-shadow: 0 5px 20px rgba(0,0,0,0.1); 
     padding: 50px !important;
     direction: rtl;
}
.post-image-detail {
    width: 100%; 
    max-height: 400px; 
    object-fit: cover; 
    border-radius: var(--border-radius-md); 
    margin-bottom: 30px;
    border: 1px solid var(--border-color); 
}
.post-title-main { 
    font-size: 38px; 
    font-weight: 700; 
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.3;
}
.post-meta {
    font-size: 14px; 
    color: var(--text-muted-color); 
    margin-bottom: 30px; 
    display: flex; 
    gap: 25px; 
    align-items: center; 
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.post-meta i {
    margin-left: 5px;
    color: var(--info-color);
}

/* Post Content Typography */
.post-content {
    line-height: 1.8; 
    font-size: 17px; 
    margin-bottom: 40px; 
    padding-top: 20px;
}
.post-content p {
     margin-bottom: 25px;
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
     font-weight: 700;
     margin-top: 40px;
     margin-bottom: 20px;
     border-right: 5px solid var(--primary-color); 
     padding-right: 18px;
     color: var(--text-color);
}
.post-content h1 { font-size: 30px; }
.post-content h2 { font-size: 26px; }
.post-content h3 { font-size: 22px; }
.post-content h4 { font-size: 19px; }

/* [ENHANCED] Responsive Images Fix */
.post-content img, .post-image-detail {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-sizing: border-box;
    display: block;
    margin: 0 auto 20px;
}
.post-image-detail {
    max-height: 400px;
    object-fit: cover;
}
.post-content img {
    max-height: 500px;
    object-fit: contain;
}

/* Blockquote Styling (نقل قول) */
.post-content blockquote {
    margin: 20px 0;
    padding: 15px 25px;
    border-right: 5px solid var(--secondary-color);
    background-color: var(--bg-table-header); 
    color: var(--text-muted-color);
    font-style: italic;
    border-radius: var(--border-radius-md);
}

/* Code Block Styling */
.post-content pre {
    background-color: #2c2c2e; 
    color: #e0e0e0; 
    padding: 15px;
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    font-family: monospace;
    font-size: 14px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Like Section */
.like-section {
     text-align: center; 
     margin-bottom: 20px; 
     padding: 15px 0; /* Reduced padding/margin for inline display */
     border-top: 1px solid var(--border-color); 
     border-bottom: none; /* Removed bottom border */
     background-color: transparent; /* Removed background color */
     border-radius: 0;
     display: flex;
     justify-content: flex-start; /* Aligned left (RTL: Right) */
     align-items: center;
     gap: 15px;
     flex-wrap: wrap;
}
.like-section button {
     padding: 8px 15px; /* Smaller buttons */
     font-size: 14px;
     background-color: var(--danger-color);
     color: white;
     border: none;
     border-radius: var(--border-radius-md);
     cursor: pointer;
     transition: background-color 0.2s;
     display: inline-flex;
     align-items: center;
     gap: 8px;
}
.like-section button:hover {
     background-color: var(--danger-color-hover);
}
.like-section .like-count {
     font-size: 14px; /* Smaller count */
     font-weight: 600;
     color: var(--text-color);
}
.like-section .fa-heart {
     color: white; /* Heart icon is white on red button */
     font-size: 16px;
}
#toggle-comments-btn {
    background: var(--info-color);
}
#toggle-comments-btn:hover {
    background: var(--info-color-hover);
}


/* =================================================================
 * 4. Quora-Like Comment Styles - Final Refinement (Inline, Collapsible)
 * ================================================================= */
 
/* Main Comment Section Container (Now hidden by default and below the post) */
.comments-section-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out; /* Smooth slide down/up */
}
.comments-section-wrapper.open {
    max-height: 5000px; /* Large enough to show content */
    margin-top: 30px;
}

.comments-section {
    padding-top: 0; 
    margin-top: 0;
    border-top: none; 
}
 
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.comment-item {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-card);
    transition: box-shadow 0.2s;
    position: relative;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Indentation for replies (level-1 is the first reply level) */
.comment-item.level-1 {
    margin-right: 20px;
    border-right: 3px solid var(--info-color);
    border-left: 1px solid var(--border-color); 
    padding: 15px; 
    background-color: var(--bg-table-header); 
}
.comment-item.level-2 {
    margin-right: 40px;
    border-right: 3px solid var(--secondary-color);
    border-left: 1px solid var(--border-color);
    padding: 15px;
    background-color: var(--bg-table-header);
}
.reply-section .comment-item {
    margin-top: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color); 
    background-color: var(--bg-card); 
    padding: 10px;
}
.reply-section .comment-item.level-1, .reply-section .comment-item.level-2 {
    margin-right: 0; 
    border-right: none; 
    background-color: var(--bg-card);
}


.comment-author-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px; 
}

.comment-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

.comment-header {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    cursor: default; 
}

.comment-author-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 15px;
    white-space: nowrap; 
}

.comment-meta {
    font-size: 12px;
    color: var(--text-muted-color);
    display: flex;
    align-items: center;
    margin-top: 0; 
}
.comment-meta > span {
    margin-left: 10px;
    display: flex;
    align-items: center;
}
.comment-meta .fa-heart {
    color: var(--danger-color);
}


.comment-body p {
    margin: 10px 0 10px 0;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
    white-space: pre-wrap; 
}

.comment-footer {
    display: flex;
    align-items: center;
    gap: 5px; 
    padding-top: 5px;
    border-top: none; 
    margin-top: 10px;
}

.comment-like-btn, .comment-reply-btn {
    background: none;
    border: none;
    color: var(--text-muted-color); 
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 9999px; 
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-reply-btn {
    color: var(--info-color);
}
.comment-like-btn:hover, .comment-reply-btn:hover {
    background-color: var(--bg-table-header);
    color: var(--primary-color);
}

.reply-toggle {
    cursor: pointer;
    font-weight: 500;
    color: var(--info-color);
    margin-left: auto;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 9999px; 
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.reply-toggle:hover {
    background-color: var(--bg-table-header);
}

/* Reply Section Hide/Show (Inner Collapsible) */
.reply-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; 
    margin-top: 15px;
    padding: 10px 0;
    border-top: 1px dashed var(--border-color); 
    padding-right: 0; 
}
.reply-section.open {
    max-height: 1000px; 
    padding-right: 0;
}


/* Comment Form Styles (FIXED for visibility and writability) */
.comment-form {
    padding: 15px; 
    border-radius: var(--border-radius-md);
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
.comment-form .form-group {
    margin-bottom: 10px;
}
.comment-form .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: white; 
    color: var(--text-color); 
    resize: vertical;
    min-height: 80px; 
}
.comment-form .submit-btn {
    width: auto;
    float: left; 
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s;
}
.comment-form .form-group-flex {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.comment-form .form-group-flex .flex-item {
    flex: 1;
}

.reply-to-info {
    padding: 10px;
    background-color: var(--info-color-light);
    border: 1px solid var(--info-color);
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.reply-to-info button {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .comment-item.level-1 {
        margin-right: 10px;
        padding: 10px;
    }
    .comment-item.level-2 {
        margin-right: 20px;
        padding: 10px;
    }
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .comment-meta {
        margin-top: 2px;
    }
    .comment-meta > span {
        margin-left: 5px;
    }
    .comment-form .submit-btn {
        width: 100%;
        float: none;
    }
    .comment-form .form-group-flex {
        flex-direction: column;
    }
}


/* --- END: ENHANCED BLOG STYLES (Public) - FULLY RESPONSIVE WITH IMAGE RESIZE FIX --- */

            /* --- END: NEW BLOG STYLES (Public) --- */
        
            :root {
                --primary-color: #007AFF; --primary-color-hover: #005ECB; --secondary-color: #6c757d; --secondary-color-hover: #5a6268; --success-color: #28a745; --danger-color: #dc3545; --danger-color-hover: #c82333; --warning-color: #ffc107; --warning-text-color: #664d03; --warning-bg-color: #fff3cd; --warning-border-color: #ffecb5; --info-color: #17a2b8; --info-color-hover: #138496;
                /* [NEW] RGB values for opacity */
                --primary-color-rgb: 0, 122, 255;
                --success-color-rgb: 40, 167, 69;
                --danger-color-rgb: 220, 53, 69;
                --info-color-rgb: 23, 162, 184;
                --warning-color-rgb: 255, 193, 7;

                --text-color: #212529; --text-muted-color: #6c757d; --link-color: var(--primary-color); --link-hover-color: var(--primary-color-hover);
                --bg-color: #f8f9fa; --bg-auth-container: #ffffff; --bg-sidebar: #ffffff; --bg-main-content-header: #ffffff; --bg-card: #ffffff; --bg-card-header: #f1f3f5; --bg-table-header: #f1f3f5; --bg-input: #ffffff; --bg-form-section: #ffffff; --bg-batch-results: #f9f9f9; --bg-action-fields: #fdfdfd;
                --border-color: #dee2e6; --border-color-input: #ced4da; --border-color-input-focus: var(--primary-color); --border-sidebar: #e9ecef; --border-card: #e0e0e0; --border-table: #e9ecef; --border-form-section: #e9ecef; --border-batch-results: #e9ecef; --border-action-fields: #e9ecef; --hr-color: #e0e0e0;
                --logo-bg-main: var(--primary-color); --logo-accent-main: #E0F0FF; --sidebar-text-color: #495057; --sidebar-text-hover-color: var(--primary-color); --sidebar-bg-hover-color: #eef6ff; --sidebar-active-text-color: var(--primary-color); --sidebar-active-bg-color: #e6f2ff; --sidebar-active-border-color: var(--primary-color);
                --message-success-text: #0f5132; --message-success-bg: #d1e7dd; --message-success-border: #badbcc; --message-error-text: #842029; --message-error-bg: #f8d7da; --message-error-border: #f5c2c7; --message-info-text: #055160; --message-info-bg: #cff4fc; --message-info-border: #b6effb; --message-warning-text: var(--warning-text-color); --message-warning-bg: var(--warning-bg-color); --message-warning-border: var(--warning-border-color);
                --status-active-text: var(--success-color); --status-active-bg: rgba(40, 167, 69, 0.1); --status-error-text: var(--danger-color); --status-error-bg: rgba(220, 53, 69, 0.1); --status-unknown-text: var(--warning-text-color); --status-unknown-bg: var(--warning-bg-color);
            }
        
            body { background-color: var(--bg-color); color: var(--text-color); }
            /* [FIX] The actual Card should have the shadow/border, not the outer container. */
            .auth-container { background-color: transparent; } 

            .auth-container h1 { color: var(--text-color); } .auth-container p.subtitle { color: var(--text-muted-color); }
            .form-group label { color: var(--text-muted-color); }
            .form-group input[type='tel'], .form-group input[type='text'], .form-group input[type='password'], .form-section input[type='text'], .form-section input[type='number'], .form-section textarea, .form-section select, .form-control { border-color: var(--border-color-input); color: var(--text-color); background-color: var(--bg-input); }
            .form-group input:focus, .form-section input:focus, .form-section input[type='number']:focus, .form-section textarea:focus, .form-section select:focus, .form-control:focus { border-color: var(--border-color-input-focus); box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.2); }
            button.submit-btn, .form-section button[type='submit'] { background-color: var(--primary-color); color: white; }
            button.submit-btn:hover, .form-section button[type='submit']:hover { background-color: var(--primary-color-hover); }
            .message.error { color: var(--message-error-text); background-color: var(--message-error-bg); border-color: var(--message-error-border); }
            .message.success { color: var(--message-success-text); background-color: var(--message-success-bg); border-color: var(--message-success-border); }
            .message.info { color: var(--message-info-text); background-color: var(--message-info-bg); border-color: var(--message-info-border); }
            .message.warning { color: var(--warning-text-color); background-color: var(--warning-bg-color); border-color: var(--warning-border-color); }
            .page-links a { color: var(--link-color); } .page-links a:hover { color: var(--link-hover-color); }
            .admin-sidebar { background-color: var(--bg-sidebar); border-left: 1px solid var(--border-sidebar); box-shadow: 2px 0 10px rgba(0,0,0,0.03);}
            .sidebar-header { border-bottom: 1px solid var(--border-sidebar); } .sidebar-header span { color: var(--primary-color);}
            .sidebar-nav a { color: var(--sidebar-text-color); }
            .sidebar-nav a:hover { background-color: var(--sidebar-bg-hover-color); color: var(--sidebar-text-hover-color); border-right-color: var(--sidebar-text-hover-color);}
            .sidebar-nav a.active { background-color: var(--sidebar-active-bg-color); color: var(--sidebar-active-text-color); border-right-color: var(--sidebar-active-border-color); font-weight:600; }
            .sidebar-footer { border-top: 1px solid var(--border-sidebar); }
            .logout-link { background-color: var(--danger-color); color: white !important; } .logout-link:hover { background-color: var(--danger-color-hover); }
            .admin-main-content { background-color: var(--bg-color); }
            .main-content-header { background-color: var(--bg-main-content-header); border-bottom: 1px solid var(--border-sidebar); box-shadow: var(--shadow-sm); }
            .page-title-main { color: var(--text-color); }
            .card { background-color: var(--bg-card); box-shadow: var(--shadow-md); border: 1px solid var(--border-card); }
            .card-header { background-color: var(--bg-card-header); border-bottom: 1px solid var(--border-card); color: var(--text-color); }
            th, td { border-bottom: 1px solid var(--border-table); color: var(--text-color); }
            th { background-color: var(--bg-table-header); color:var(--text-muted-color); }
            .form-section { background-color: var(--bg-form-section); border: 1px solid var(--border-form-section); }
            .batch-results { background-color: var(--bg-batch-results); border: 1px solid var(--border-batch-results); }
            .batch-results hr { background-color: var(--hr-color); }
            .status-badge.active, .status-badge.success { color: var(--status-active-text); background-color: rgba(40, 167, 69, 0.1); border: 1px solid var(--success-color); }
            .status-badge.error { color: var(--status-error-text); background-color: rgba(220, 53, 69, 0.1); border: 1px solid var(--danger-color); }
            .status-badge.unknown { color: var(--warning-text-color); background-color: var(--warning-bg-color); border: 1px solid var(--warning-border-color); }
            .action-form-fields { background-color: var(--bg-action-fields); border: 1px solid var(--border-action-fields); }
            .logo-bg-color { fill: var(--logo-bg-main); }
            .logo-accent-color { fill: var(--logo-accent-main); }
            .theme-toggle-btn { background-color: var(--bg-input); color: var(--text-color); border: 1px solid var(--border-color); }
            .theme-toggle-btn:hover { background-color: #e9ecef; }
            .pagination li a, .pagination li span { border: 1px solid var(--border-color); color: var(--link-color); background-color: var(--bg-card); }
            .pagination li a:hover { background-color: #e9ecef; }
            .pagination li.active span { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
            .pagination li.disabled span { color: var(--text-muted-color); border-color: var(--border-color); background-color: var(--bg-table-header); }
            .search-form button { background-color: var(--primary-color); color: white; }
            .search-form button:hover { background-color: var(--primary-color-hover); }
            .button-link.details { background-color: var(--info-color); color:white; }
            .button-link.details:hover { background-color: var(--info-color-hover); }
            .button-link.relogin { background-color: var(--warning-color); color: var(--warning-text-color); border: 1px solid var(--warning-border-color); }
            .button-link.relogin:hover { background-color: #ffe033; }
            .button-link.delete { background-color: var(--danger-color); color:white; }
            .button-link.delete:hover { background-color: var(--danger-color-hover); }

            /* New button styles */
            .btn-nav {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 44px; /* Fixed width to make them square */
                height: 44px; /* Fixed height */
                border-radius: var(--border-radius-md);
                background-color: var(--bg-table-header);
                color: var(--text-color);
                transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
                font-size: 1.25rem;
                text-decoration: none;
                border: none;
            }

            .btn-nav:hover {
                background-color: var(--border-color);
                transform: translateY(-2px);
                box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            }

            .btn-nav:active {
                transform: translateY(1px);
            }
        