/* modern-theme.css - V3 Corrected by Gemini */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #6B62E2;
    --secondary-color: #00D2D3;
    --bg-color: #F8F9FA;
    --panel-bg: #FFFFFF;
    --sidebar-bg: #2C3A47;
    --sidebar-link-color: #CED6E0;
    --sidebar-link-hover: #FFFFFF;
    --text-color: #2F3542;
    --text-muted: #808080;
    --border-color: #E9ECEF;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lifted: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================
   Main Layout (CORRECTED)
   ================================= */
.admin-wrapper {
    display: flex;
    align-items: flex-start; /* Aligns items to the top */
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: sticky; /* Correct positioning */
    top: 0;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.admin-content-wrapper {
    width: 100%;
    /* All margins removed to fix the gap */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures content wrapper takes at least full height */
}

/* Important: This rule for RTL must NOT have a margin */
html[dir="rtl"] .admin-content-wrapper {
    margin-right: 0; /* Ensures no gap */
}

/* =================================
   Header & User Info
   ================================= */
.admin-header {
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #F8F9FA;
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
}

.user-info span {
    font-weight: 700;
    color: var(--text-color);
}
.user-info span::before {
    font-family: "Font Awesome 6 Free";
    content: '\f007';
    font-weight: 900;
    margin-right: 8px;
    color: var(--primary-color);
}
html[dir="rtl"] .user-info span::before {
    margin-right: 0;
    margin-left: 8px;
}
.admin-lang-switcher a, .logout-btn {
    text-decoration: none;
    font-weight: 700;
    color: var(--text-muted);
    padding: 5px 8px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.admin-lang-switcher a:hover {
    background-color: var(--primary-color);
    color: white;
}
.logout-btn:hover {
    background-color: #E74C3C;
    color: white;
}

/* =================================
   Sidebar (CORRECTED)
   ================================= */
.sidebar-logo {
    padding: 20px 25px; /* Added padding back */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo a {
    display: block; /* Ensures it takes up the full space */
    color: white;
    text-decoration: none;
    font-size: 22px; /* Corrected size */
    font-weight: 700;
    word-wrap: break-word;
}

.sidebar-nav ul {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 25px;
    color: var(--sidebar-link-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 4px 10px;
    border-radius: 8px;
    position: relative;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-link-hover);
}

.sidebar-nav a.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

/* =================================
   Dashboard & Content
   ================================= */
.admin-main-content {
    flex-grow: 1;
}
.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px;
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.stat-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lifted);
}

.stat-card .card-icon {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 4.5em;
    color: #000;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: all 0.4s ease;
}

html[dir="rtl"] .stat-card .card-icon {
    right: auto;
    left: 25px;
    transform: rotate(15deg);
}

.stat-card:hover .card-icon {
    opacity: 0.1;
    transform: rotate(0) scale(1.1);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 22px;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

.stat-card p {
    margin: 0 0 25px 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 15px;
    z-index: 2;
    position: relative;
}

.stat-card a {
    text-decoration: none;
    font-weight: 700;
    color: var(--primary-color);
    display: inline-block;
    padding: 8px 18px;
    border-radius: 50px;
    background-color: #F8F9FA;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.stat-card:hover a {
    color: white;
    background-image: var(--primary-gradient);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    border-color: transparent;
}

/* =================================
   Forms & Tables
   ================================= */
.content-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--panel-bg);
    box-shadow: var(--shadow-soft);
    border-radius: var(--border-radius);
    overflow: hidden;
}
.content-table th, .content-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
html[dir="rtl"] .content-table th, html[dir="rtl"] .content-table td {
    text-align: right;
}
.content-table thead th {
    background-color: #F8F9FA;
    font-weight: 700;
    font-size: 14px;
    color: var(--sidebar-bg);
}
.content-table tbody tr:hover {
    background-color: #F1F3F5;
}
.content-table tbody tr:last-child td {
    border-bottom: none;
}
.content-form {
    background-color: var(--panel-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}
.content-form .form-group {
    margin-bottom: 25px;
}
.content-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 15px;
}
.content-form input[type="text"],
.content-form input[type="number"],
.content-form input[type="file"],
.content-form textarea,
.content-form select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.content-form input:focus, .content-form textarea:focus, .content-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 105, 255, 0.2);
}

/* =================================
   Responsive & Mobile
   ================================= */
.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sidebar-bg);
}

@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed; /* Switch to fixed for mobile overlay */
        z-index: 1000;
        transform: translateX(-100%);
    }
    html[dir="rtl"] .admin-sidebar {
        transform: translateX(100%);
    }
    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.3);
    }
    .mobile-sidebar-toggle {
        display: block;
    }
}

/* =================================
   Image & General Fixes
   ================================= */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.form-thumbnail {
    max-width: 250px;
    margin-top: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}
/* =================================
   Modern Form & Tabs Layout (NEW)
   ================================= */

/* Tab Navigation */
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}
.tab-link {
    padding: 15px 25px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    color: var(--text-muted);
    position: relative;
    transition: color 0.3s ease;
}
.tab-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.tab-link.active {
    color: var(--primary-color);
}
.tab-link.active::after {
    transform: scaleX(1);
}

/* Tab Content */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Section Cards */
.form-section-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
    overflow: hidden; /* To keep border-radius on children */
}
.form-section-card-header {
    background-color: #F8F9FA;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}
.form-section-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--sidebar-bg);
}
.form-section-card-body {
    padding: 25px;
}

/* Improved Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* Color Picker & Input Groups */
.input-group-lang {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.input-group-lang-color {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 20px;
    align-items: flex-end;
}
.input-group-lang-color .form-group {
    margin-bottom: 0;
}
.form-group input[type="color"] {
    padding: 5px;
    height: 54px; /* Match input height */
}

/* Enhanced File Uploader */
.file-uploader {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}
.file-uploader:hover {
    border-color: var(--primary-color);
}
.file-uploader-label {
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}
.file-uploader-label i {
    margin-right: 8px;
}
.file-uploader input[type="file"] {
    display: none;
}
.file-preview-wrapper {
    margin-top: 15px;
    position: relative;
    display: inline-block;
}
.btn-remove-media {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #E74C3C;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
}
.btn-remove-media:hover {
    background-color: #c0392b;
}

/* Sticky Save Button */
.form-actions-sticky {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 70%, rgba(255, 255, 255, 0));
    padding: 20px 30px;
    margin: 0 -30px -30px -30px; /* Counteract padding of parent */
    text-align: right;
}
html[dir="rtl"] .form-actions-sticky {
    text-align: left;
}
.form-actions-sticky .btn {
    padding: 12px 30px;
    font-size: 16px;
}
/* =================================
   Settings Page Grid Layout (FINAL)
   ================================= */

.settings-page-grid {
    display: grid;
    grid-template-columns: 240px 1fr; /* Sidebar navigation and main content */
    gap: 30px;
    align-items: flex-start;
}

/* --- Left-Side Navigation --- */
.settings-nav {
    position: sticky;
    top: 20px;
}
.settings-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.settings-nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}
html[dir="rtl"] .settings-nav-menu a {
    border-left: none;
    border-right: 4px solid transparent;
}
.settings-nav-menu a:hover {
    background-color: #F8F9FA;
    color: var(--text-color);
}
.settings-nav-menu a.active {
    background-color: #f1f0ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}
html[dir="rtl"] .settings-nav-menu a.active {
    border-right-color: var(--primary-color);
}
.settings-nav-menu a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* --- Right-Side Content Cards --- */
.content-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
}
.content-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}
.content-card-header .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #f1f0ff;
    color: var(--primary-color);
    font-size: 20px;
}
.content-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--sidebar-bg);
}
.content-card-body {
    padding: 30px;
}

/* =================================
   Final Tabbed Content Layout
   ================================= */

.tab-container {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden; /* Important for keeping radius */
}

/* --- Tab Navigation Bar --- */
.tabs-navigation {
    display: flex;
    background-color: #F8F9FA;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap; /* Allow tabs to wrap on small screens */
}

.tab-button {
    flex: 1; /* Make tabs share space equally */
    padding: 15px 20px;
    border: none;
    background: none;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: var(--text-color);
}

.tab-button.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* --- Tab Content Area --- */
.tab-content-area {
    padding: 30px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-pane.active {
    display: block;
}

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

/* --- Internal Sections inside each Tab --- */
.content-section {
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.content-section-header {
    margin: -25px -25px 25px -25px; /* Pull header to edges */
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
    background-color: #F8F9FA;
}

.content-section-header h4 {
    margin: 0;
    font-size: 17px;
    color: var(--sidebar-bg);
}

/* Make form elements inside look good */
.input-group-lang { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.input-group-lang-color { display: grid; grid-template-columns: 1fr 1fr 100px; gap: 20px; align-items: flex-end; }
.input-group-lang-color .form-group { margin-bottom: 0; }
.form-group input[type="color"] { padding: 5px; height: 54px; }
/* =================================
   Modern Table View Layout
   ================================= */

.content-container-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 10px; /* Add slight padding around the table */
}

.content-table th {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    background-color: #F8F9FA;
}

.content-table td {
    padding: 20px;
    font-weight: 500;
    vertical-align: middle;
}

.content-table tbody tr:hover {
    background-color: #f1f0ff; /* Light purple hover */
}

.content-table .btn-action i {
    margin-right: 5px;
}
html[dir="rtl"] .content-table .btn-action i {
    margin-right: 0;
    margin-left: 5px;
}
/* =================================
   Card-Based Item List Layout (for News/Sources etc.)
   ================================= */

.item-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between cards */
}

.item-card {
    display: flex;
    align-items: center;
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
    border-color: var(--primary-color);
}

.item-card-image {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.item-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area nicely */
}

html[dir="rtl"] .item-card-image {
    margin-right: 0;
    margin-left: 20px;
}

.item-card-content {
    flex-grow: 1;
}

.item-card-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.item-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.item-card-meta .category-badge {
    background-color: #e9ecef;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.item-card-actions {
    display: flex;
    gap: 10px;
}
/* =================================
   Modern Grid Layout (for Services etc.)
   ================================= */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.service-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden; /* To keep radius on children */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}

.service-card-header {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
}

/* Dark overlay for better text readability */
.service-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
}

.service-card-header h4 {
    margin: 0;
    font-size: 20px;
    position: relative; /* To be on top of the overlay */
    z-index: 2;
}

.service-card-body {
    padding: 20px;
    flex-grow: 1; /* Pushes the footer down */
}

.service-card-body p {
    margin: 0;
    color: var(--text-muted);
}

.service-card-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: #F8F9FA;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
/* =================================
   Two-Column CRUD Layout (for Partners etc.)
   ================================= */

.crud-grid-container {
    display: grid;
    grid-template-columns: 1fr 400px; /* Main content and a sidebar form */
    gap: 30px;
    align-items: flex-start;
}
/* For RTL, swap the columns */
html[dir="rtl"] .crud-grid-container {
    grid-template-columns: 400px 1fr;
}

.list-container, .form-container {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}
.container-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}
.container-header h3 {
    margin: 0;
    font-size: 18px;
}
.container-body {
    padding: 25px;
}

/* Partner List Styles */
.partner-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.partner-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.partner-item:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}
.partner-logo {
    width: 80px;
    height: 50px;
    flex-shrink: 0;
    margin-right: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}
html[dir="rtl"] .partner-logo {
    margin-right: 0;
    margin-left: 15px;
}
.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.partner-info {
    flex-grow: 1;
}
.partner-info strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
}
.partner-info small {
    color: var(--text-muted);
}
.partner-actions {
    display: flex;
    gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .crud-grid-container {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
    /* On RTL, the form is first, so we use flex to reorder */
    html[dir="rtl"] .crud-grid-container {
        display: flex;
        flex-direction: column-reverse;
    }
}
/* =================================
   Story Cards Grid Layout
   ================================= */

.story-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}

.story-card-logo {
    padding: 30px 20px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F9FA;
}

.story-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.story-card-body {
    padding: 20px;
    flex-grow: 1;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.story-card-body h4 {
    margin: 0;
    font-size: 18px;
}

.story-card-actions {
    background-color: #F8F9FA;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
/* =================================
   Testimonial Cards Layout
   ================================= */

.testimonial-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 4px solid var(--panel-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.testimonial-position {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.testimonial-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 5px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
html[dir="rtl"] .testimonial-actions {
    right: auto;
    left: 15px;
}

.testimonial-card:hover .testimonial-actions {
    opacity: 1;
}
/* =================================
   FAQ Accordion List Layout
   ================================= */

.faq-container {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-sort-order {
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-title {
    flex-grow: 1;
    font-weight: 700;
    color: var(--text-color);
}

.faq-actions {
    display: flex;
    gap: 10px;
}
/* =================================
   Franchise Cards Grid Layout
   ================================= */

.franchise-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.franchise-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}

.franchise-card-logo {
    padding: 25px 20px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F9FA;
    border-bottom: 1px solid var(--border-color);
}

.franchise-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.franchise-card-body {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
}

.franchise-card-body h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.franchise-card-body .industry-badge {
    display: inline-block;
    background-color: #e0e7ff;
    color: #4338ca;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.franchise-card-actions {
    background-color: #F8F9FA;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}
/* =================================
   Property Cards Grid Layout
   ================================= */

.property-card {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}

.property-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    color: white;
}

/* Dark overlay for better text readability */
.property-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 70%);
}

.property-card-image h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    position: relative;
    z-index: 2;
}

.property-card-image .category-badge {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    align-self: flex-start; /* Positions badge at the top of the text block */
}

.property-card-actions {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #F8F9FA;
    border-top: 1px solid var(--border-color);
}
/* =================================
   Advanced Data Table with Controls
   ================================= */

.controls-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}
html[dir="rtl"] .controls-bar {
    justify-content: flex-start;
}

.search-form {
    position: relative;
}

.search-form input {
    width: 300px;
    padding-left: 40px;
}
html[dir="rtl"] .search-form input {
    padding-left: 15px;
    padding-right: 40px;
}

.search-form i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
html[dir="rtl"] .search-form i {
    left: auto;
    right: 15px;
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-new { background-color: #dbeafe; color: #1e40af; }
.status-contacted { background-color: #d1fae5; color: #065f46; }

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    user-select: none;
}
.page-link {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.page-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}
.page-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}
.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}
/* =================================
   Advanced Data Table with Controls
   ================================= */

.controls-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}
html[dir="rtl"] .controls-bar {
    justify-content: flex-start;
}

.search-form {
    position: relative;
}

.search-form input {
    width: 300px;
    padding-left: 40px;
}
html[dir="rtl"] .search-form input {
    padding-left: 15px;
    padding-right: 40px;
}

.search-form i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
html[dir="rtl"] .search-form i {
    left: auto;
    right: 15px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    user-select: none;
}
.page-link {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.page-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}
.page-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}
.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}
/* =================================
   Admin Role Badges
   ================================= */

.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Style for 'superadmin' role */
.role-superadmin {
    background-color: #e0e7ff; /* Light Indigo */
    color: #4338ca; /* Dark Indigo */
}

/* A default style for any other roles you might add */
.role-admin, .role-editor {
    background-color: #d1fae5; /* Light Green */
    color: #065f46; /* Dark Green */
}
/* =================================
   Panel Selector Page (UPGRADED)
   ================================= */

.panel-selector-page {
    background-color: #2f405f; /* Dark Navy Blue */
    color: white;
    overflow: hidden;
}

/* Header Integration */
.selector-header {
    padding: 15px 30px;
    position: absolute;
    top: 0; left: 0; width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0));
}
.selector-header .logo {
    font-size: 22px;
    font-weight: 700;
}
/* Use the same user-info style from the main panel for consistency */
.selector-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.selector-header .user-info span, .selector-header .user-info a {
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Main Container */
.panel-selector-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 100vh;
}

.panel-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.4s ease;
}
.panel-card::before { /* Background Image Element */
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: inherit;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.panel-card:hover::before {
    transform: scale(1.1);
}

.panel-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(18, 18, 18, 0.7);
    transition: background-color 0.4s ease;
}
.panel-card:hover .panel-overlay {
    background-color: rgba(107, 98, 226, 0.8); /* Use primary color on hover */
}

.panel-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    transition: transform 0.4s ease;
}
.panel-card:hover .panel-content {
    transform: translateY(-20px);
}
.panel-content .panel-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.8;
    transition: all 0.4s ease;
}
.panel-card:hover .panel-content .panel-icon {
    opacity: 1;
    transform: scale(1.1);
}
.panel-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}
.panel-content p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.8;
}

.panel-cta {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 10px);
    background-color: white;
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
}
.panel-card:hover .panel-cta {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .panel-selector-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }
    .panel-card {
        height: 60vh;
        min-height: 400px;
    }
}
/* =================================
   Login Page Styles (UPGRADED)
   ================================= */

.login-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: 100vh;
}

.login-visual {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(../assets/images/placeholder-egypt.jpg);
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.login-visual h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.login-visual p {
    font-size: 18px;
    opacity: 0.8;
}

.login-form-panel {
    background-color: var(--panel-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 10px 0;
}

.login-container .subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 25px;
    position: relative;
}

.login-form label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.login-form input {
    width: 100%;
    padding: 15px 15px 15px 45px; /* Add padding for icon */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 105, 255, 0.2);
}

.login-form .form-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(2px); /* Adjust vertical alignment */
    color: var(--text-muted);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background-image: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 992px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }
    .login-visual {
        display: none; /* Hide visual panel on smaller screens */
    }
}
/* =================================
   Two-Column Form Layout Fix
   ================================= */

/* Defines the two-column grid for edit pages */
.crud-grid-container {
    display: grid;
    /* The main content takes up remaining space, the sidebar is 400px */
    grid-template-columns: 1fr 400px; 
    gap: 30px;
    align-items: flex-start;
}
/* For RTL, we swap the columns */
html[dir="rtl"] .crud-grid-container {
    grid-template-columns: 400px 1fr;
}

/* This is the main content column (left) */
.form-main-content {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Adds space between cards in this column */
}

/* This is the sidebar column (right) */
.form-sidebar {
    position: sticky; /* Makes the sidebar stick on scroll */
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Adds space between cards in this column */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .crud-grid-container {
        grid-template-columns: 1fr; /* Stack the columns on smaller screens */
    }
    html[dir="rtl"] .crud-grid-container {
        /* On RTL, re-order the stacked columns so form is first */
        display: flex;
        flex-direction: column-reverse;
    }
    .form-sidebar {
        position: relative;
        top: 0;
    }
}
/* =================================
   Live Preview Form Layout
   ================================= */

.preview-card-container {
    position: sticky;
    top: 20px;
}

.preview-card-container .franchise-card {
    /* We can reuse the franchise card style we already have! */
    pointer-events: none; /* Make it non-clickable */
    box-shadow: var(--shadow-lifted); /* Make it stand out */
}

.preview-card-container .placeholder-text {
    color: var(--text-muted);
    font-style: italic;
}
/* =================================
   Dynamic Form Fields (for Property Details)
   ================================= */

.details-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.btn-add-detail {
    margin-top: 15px;
    background-color: #e9ecef;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.btn-add-detail:hover {
    background-color: #d1d5db;
}
/* =================================
   Inner Form Tabs for Edit Pages
   ================================= */

.form-tab-container {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.form-tabs-nav {
    display: flex;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.form-tab-button {
    flex: 1;
    padding: 15px 10px;
    border: none;
    background: none;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.form-tab-button:hover {
    background-color: var(--border-color);
}

.form-tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.form-tab-pane {
    display: none;
    padding: 25px;
    animation: fadeIn 0.4s ease-in-out;
}

.form-tab-pane.active {
    display: block;
}
/* =================================
   Styles for About Page Manager
   ================================= */

/* --- 1. Page Header & Alerts --- */
.page-header {
    margin-bottom: 30px;
}
.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--sidebar-bg);
}
.alert-success, .alert-error {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    font-weight: 500;
    border: 1px solid transparent;
}
.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}
.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}


/* --- 2. Card & Form Styles --- */
/* The theme already styles .content-card, this part enhances it */
.content-card {
    margin-bottom: 30px;
}
.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Apply theme styles to all inputs/textareas inside a card body */
.content-card-body input[type="text"],
.content-card-body input[type="file"],
.content-card-body textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.content-card-body input:focus,
.content-card-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 105, 255, 0.2);
}


/* --- 3. Button Styles --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-primary {
    background-image: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.btn-danger {
    background-color: #ef4444;
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}


/* --- 4. Features Table (.data-table) --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--panel-bg);
}
.data-table th, .data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
html[dir="rtl"] .data-table th, html[dir="rtl"] .data-table td {
    text-align: right;
}
.data-table thead th {
    background-color: #F8F9FA;
    font-weight: 700;
    font-size: 14px;
    color: var(--sidebar-bg);
}
.data-table tbody tr:hover {
    background-color: #F1F3F5;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table .table-thumbnail {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}


/* --- 5. Team Grid (.item-grid & .grid-item) --- */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}
.grid-item {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}
.grid-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.grid-item .item-info {
    padding: 15px;
}
.grid-item .item-info strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}
.grid-item .item-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}


/* --- 6. Modal Styles (.modal-overlay) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 58, 71, 0.6); /* --sidebar-bg with opacity */
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lifted);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
html[dir="rtl"] .modal-close {
    right: auto;
    left: 15px;
}
.modal-close:hover {
    background-color: #e2e8f0;
    transform: rotate(90deg);
}
.modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    font-size: 20px;
    color: var(--sidebar-bg);
}
.modal-content .form-group {
    margin-bottom: 20px;
}
.modal-content input, .modal-content textarea {
    /* Uses the same styles as defined in section 2 */
}
/* ================================================= */
/* ==== Mobile Sidebar Styles (V2 - Stronger) ==== */
/* ================================================= */

/* إخفاء زر الموبايل على الشاشات الكبيرة */
.mobile-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #333; /* يمكنك تغيير اللون ليناسب تصميمك */
    font-size: 24px; /* حجم الأيقونة */
    cursor: pointer;
    z-index: 1100; /* للتأكد من أنه فوق كل شيء */
    position: relative;
}

/* الأكواد الخاصة بشاشات الموبايل والتابلت */
@media (max-width: 992px) {

    /* إظهار زر الموبايل */
    .mobile-sidebar-toggle {
        display: block;
    }

    /* تعديل القائمة الجانبية لتكون مخفية وجاهزة للظهور */
    .admin-sidebar {
        display: flex !important; /* نستخدم !important للتغلب على أي display:none قديمة */
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh; /* تأخذ 100% من ارتفاع الشاشة */
        width: 280px;
        z-index: 1050;
        background-color: #1a2233; /* تأكد من أن هذا هو لون الخلفية الصحيح */
        transform: translateX(-100%); /* إخفاؤها إلى اليسار */
        transition: transform 0.35s ease;
        visibility: hidden; /* إخفاؤها بالكامل عندما لا تكون نشطة */
    }

    /* عند إضافة كلاس .active، أظهر القائمة */
    .admin-sidebar.active {
        transform: translateX(0);
        visibility: visible; /* إظهارها */
        box-shadow: 0 0 15px rgba(0,0,0,0.2); /* إضافة ظل جميل */
    }

    /* تعديل محتوى الصفحة الرئيسي ليتناسب مع الوضع الجديد */
    .admin-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}