@charset "UTF-8";

/**
 * xeexCMS - Highly Polished Modern Master Stylesheet
 * 100% Offline-Capable, Self-Contained, RTL-Optimized, Tablet/Mobile-Perfect.
 * Fully optimized with premium slate-black dark modes, eye-care light modes, and responsive grids.
 */

/* Custom Local Font fallback styles matching local packed webfonts */
@font-face {
    font-family: 'Vazirmatn';
    src: url('webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* Base Theme Variables definitions */
:root {
    /* Main Accent Colors (Can be overridden server-side inline dynamically) */
    --primary: #6366f1;
    --secondary: #14b8a6;
    
    /* Ultimate Dark Theme: Velvet Slate-Black & Dark Zinc Greys */
    --bg-main: #09090b;
    --bg-surface: #121215;
    --bg-input: #18181b;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --border: #222227;
    --border-hover: #27272a;
    --code-color: #34d399; /* Bright vibrant green for dark mode contrast */
    
    /* Ultimate Dark Premium Overrides */
    --premium-bg: #08080c;
    --premium-card-bg: #111115;
    --premium-text: #ffffff;
    --premium-muted: #9ca3af;
    
    /* Global Dimensions - Sharp flat professional Windows-10 style borders */
    --radius: 0px;
    --radius-sm: 0px;
    --radius-lg: 0px;
    --radius-btn: 0px;
    --radius-input: 0px;
    
    /* Sophisticated Shadows and Transitions */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Vazirmatn', 'Vazir', 'Tahoma', system-ui, -apple-system, sans-serif;
}

/* Standard-for-Eyes Eye-Comfort Light Theme definitions */
:root[data-theme="light"],
body.light-theme {
    --bg-main: #f3f4f6;       /* Clean structured soft gray background so white panels stand out */
    --bg-surface: #ffffff;    /* Pristine card surface elements */
    --bg-input: #f8f9fa;      /* Premium high-end form inputs */
    --text-main: #0f172a;     /* Deep slate blue/black for stellar typography & contrast */
    --text-muted: #475569;    /* Refined slate gray for secondary labels */
    --border: #cbd5e1;        /* Highly-defined slate gray borders for sharp pane boxes */
    --border-hover: #94a3b8;  /* Defined focus/hover borders */
    --code-color: #059669;    /* Crisp high-contrast deep green for light mode readability */
    
    /* Eye-Comfort Light theme premium overlays */
    --premium-bg: #f1f5f9;
    --premium-card-bg: #ffffff;
    --premium-text: #0f172a;
    --premium-muted: #475569;
    
    --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -6px rgba(15, 23, 42, 0.06);
}

/* Base resets & resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Base Typographical Alignments */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

/* Custom Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

code {
    color: var(--code-color);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* High-Fidelity Glassmorphism Navbar */
.navbar {
    background-color: rgba(18, 18, 21, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

/* Glassmorphism light-theme overrides */
:root[data-theme="light"] .navbar,
body.light-theme .navbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand svg {
    transition: var(--transition);
}
.brand:hover svg {
    transform: rotate(15deg);
}

.nav-menu {
    display: flex;
    gap: 12px;
    list-style: none;
    align-items: center;
}
.nav-menu li {
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-menu .btn,
.nav-menu li .btn {
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    height: auto !important;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm) !important;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link.active {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.1);
}
.nav-link:hover {
    color: var(--text-main);
    background-color: var(--bg-input);
}

/* Responsive Navbar Toggle with Hamburger System */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}
.mobile-menu-toggle:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.sidebar-toggle-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}
.sidebar-toggle-btn:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.admin-mobile-controls {
    display: none;
}

/* Sidebar Overlay styling */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    transition: opacity 0.35s ease;
}
.sidebar-overlay.active {
    display: block;
}

@media (max-width: 991px) {
    .navbar-inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }
    .brand {
        order: 1;
    }
    .mobile-menu-toggle {
        display: inline-flex;
        order: 2;
    }
    .admin-mobile-controls {
        display: flex;
        gap: 8px;
        align-items: center;
        order: 2;
    }
    .admin-mobile-controls .mobile-menu-toggle,
    .admin-mobile-controls .sidebar-toggle-btn {
        display: inline-flex;
    }
    .nav-menu {
        display: none !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        order: 3;
        padding-top: 15px;
        border-top: 1px solid var(--border);
    }
    .nav-menu.open {
        display: flex !important;
    }
    .nav-link {
        padding: 10px 14px;
        font-size: 0.9rem;
        width: 100%;
        text-align: right;
    }
    /* Touch-friendly full-width buttons inside header navmenu on mobile */
    .nav-menu li {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 6px;
    }
    .nav-menu li .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* Buttons Component with micro-tactile bounce transitions */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: var(--border);
    color: var(--text-main);
    box-shadow: var(--shadow);
    white-space: nowrap !important;
    word-break: keep-all !important;
    flex-shrink: 0 !important;
}

/* Global Prevention of Button Label Wrapping */
button, 
input[type="submit"], 
input[type="button"], 
.btn, 
.btn-sm, 
.btn-primary, 
.btn-secondary, 
.btn-outline, 
.btn-danger, 
.btn-success, 
.xeex-tab-btn, 
.wysiwyg-btn, 
.block-picker-item,
.xeex-header-block .btn,
.cat-btn-item,
.preset-btn,
.portfolio-filter-btn,
.slider-nav-btn,
.xeex-picker-tab {
    white-space: nowrap !important;
    word-break: keep-all !important;
    flex-shrink: 0 !important;
}
.btn:hover {
    transform: translateY(-1px);
    border-color: var(--border-hover);
}
.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
    background: var(--secondary);
    color: #ffffff !important;
    border-color: var(--secondary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background: var(--bg-input);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.775rem;
    border-radius: var(--radius-sm);
}

.btn-danger {
    background-color: #ef4444;
    color: white !important;
}
.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: #10b981;
    color: white !important;
}
.btn-success:hover {
    background-color: #059669;
}

/* Forms & Inputs with clean focus rings */
.form-group {
    margin-bottom: 24px;
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.form-control {
    width: 100%;
    padding: 12px 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}
.form-control:hover {
    border-color: var(--border-hover);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Theme Toggle Slider */
.theme-switch {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 60px;
    height: 32px;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
.theme-switch input,
.theme-switch input[type="checkbox"],
#theme-trigger {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.theme-switch input::after,
.theme-switch input[type="checkbox"]::after {
    display: none !important;
    content: "" !important;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--border);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}
:root[data-theme="light"] .slider,
body.light-theme .slider {
    background-color: rgba(0, 0, 0, 0.05);
}
.slider-thumb {
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 2.5px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.slider-thumb .sun-icon {
    opacity: 1;
    color: #ffffff;
    font-size: 13px;
    transform: rotate(0deg) scale(1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}
.slider-thumb .moon-icon {
    opacity: 0;
    color: #ffffff;
    font-size: 13px;
    transform: rotate(-90deg) scale(0.6);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}
input:checked + .slider {
    background-color: rgba(21, 23, 42, 0.6);
    border-color: var(--primary);
}
input:checked + .slider .slider-thumb {
    transform: translateX(28px);
    background-color: var(--secondary);
}
input:checked + .slider .slider-thumb .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}
input:checked + .slider .slider-thumb .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1.1);
}

/* Card Component: Minimal border, clean elevations */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}
.card-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

/* Main Dashboard Grid with Bento layout proportions */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: calc(100vh - 72px);
}

.sidebar {
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border);
    padding: 32px 18px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--text-muted);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.925rem;
    transition: var(--transition);
}
.sidebar-link:hover {
    background-color: var(--bg-input);
    color: var(--text-main);
}
.sidebar-link.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 700;
}

.main-content {
    padding: 32px;
    background-color: var(--bg-main);
    overflow-y: auto;
    min-width: 0;
}

/* Adaptive mobile layout for Admin panel */
@media (max-width: 991px) {
    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: calc(100vh - 72px);
        position: relative;
    }
    .sidebar {
        position: fixed !important;
        top: 72px !important;
        right: -280px !important;
        width: 280px !important;
        height: calc(100vh - 72px) !important;
        background-color: var(--bg-surface) !important;
        border-right: none !important;
        border-left: 1px solid var(--border) !important;
        border-bottom: none !important;
        padding: 24px 18px !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        transition: right 0.3s ease-in-out !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: -5px 0 15px rgba(0,0,0,0.15);
    }
    .sidebar.open {
        right: 0 !important;
    }
    .main-content {
        padding: 20px;
        width: 100%;
    }
}

/* Modernized Hero Banner */
.hero {
    text-align: center;
    padding: 80px 24px;
    background: radial-gradient(circle at 50% 120%, rgba(99, 102, 241, 0.08) 0%, transparent 80%), var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 18px;
    font-weight: 850;
    color: var(--text-main);
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 28px auto;
}

/* Bento-style Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Table elements formatted crisp & responsive */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--bg-surface);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th, .table td {
    padding: 16px 20px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}
.table th {
    background-color: var(--bg-input);
    color: var(--text-muted);
    font-weight: 700;
}
.table tr:last-child td {
    border-bottom: none;
}
.table tr:hover {
    background-color: rgba(99, 102, 241, 0.02);
}

/* Beautiful visual Block Creator Editor */
.block-editor-container {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.editor-canvas {
    min-height: 380px;
    background: var(--bg-main);
    border-radius: var(--radius);
    padding: 20px;
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: var(--transition);
}
.editor-canvas.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}

.block-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}
.block-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.block-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.825rem;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--border);
    padding-bottom: 12px;
    margin-bottom: 14px;
}
.block-controls {
    display: flex;
    gap: 6px;
}
.block-badge {
    padding: 4px 10px;
    background: var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Glassmorphic Dialog Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}
.modal.open {
    display: flex;
}
.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Alert Boxes Alert elements */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Utility layout helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.775rem; }
.fw-bold { font-weight: 700; }
.w-full { width: 100%; }

/* Bento structures */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

#pwa-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 18px 26px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

/* ==========================================================================
   ADVANCED TWO-COLUMN GUTENBERG BLOCK EDITOR STYLING
   ========================================================================== */
.block-editor-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 15px;
    align-items: start;
}
@media (max-width: 1024px) {
    .block-editor-wrapper {
        grid-template-columns: 1fr;
    }
}
.block-editor-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.block-editor-main .editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}
.block-editor-main .editor-toolbar button {
    font-weight: bold;
    font-size: 0.75rem;
    padding: 6px 12px;
}
.block-editor-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    background: rgba(99, 102, 241, 0.04);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}
.sidebar-body {
    padding: 20px;
}
.properties-empty {
    text-align: center;
    padding: 40px 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}
.properties-form .form-group {
    margin-bottom: 16px;
}
.properties-form .form-label {
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 6px;
    display: block;
    font-size: 0.8rem;
}
.properties-form .form-control {
    background: var(--bg-main);
    border-color: var(--border);
}
.properties-form .form-control:focus {
    border-color: var(--primary);
}

/* Draggable active feedback */
.block-item {
    border: 1px solid var(--border);
    cursor: grab;
    position: relative;
    box-sizing: border-box;
}
.block-item:active {
    cursor: grabbing;
}
.block-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.02);
}
.block-item.drag-over {
    border-top: 3px solid var(--primary) !important;
    background: rgba(99, 102, 241, 0.05);
}

/* Slider styling */
.form-range {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}
.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Upload drag overlay indicator */
.drag-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    background: rgba(0,0,0,0.1);
    transition: var(--transition);
}
.drag-upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.animate-spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   DESKTOP GRID & DE-LONGIFICATION STYLING
   ========================================================================== */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 991px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 640px) {
    .brand-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PREMIUM VANILLA WYSIWYG LAYOUT STYLING
   ========================================================================== */
.wysiwyg-container {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    width: 100%;
}
.wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
}
.wysiwyg-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.wysiwyg-btn:hover {
    color: var(--text-main);
    background: var(--border-hover);
}
.wysiwyg-btn.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}
.wysiwyg-separator {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 6px;
}
.wysiwyg-editor {
    min-height: 140px;
    max-height: 400px;
    padding: 14px;
    color: var(--text-main);
    background: var(--bg-input);
    outline: none;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: right;
    direction: rtl;
}
.wysiwyg-editor p {
    margin-bottom: 10px;
}
.wysiwyg-editor ul, .wysiwyg-editor ol {
    padding-right: 20px;
    margin-bottom: 10px;
}

/* ==========================================================================
   BLOCK SELECTOR PIXEL-PERFECT GRAPHICS
   ========================================================================== */
.block-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}
.block-picker-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    box-sizing: border-box;
}
.block-picker-item:hover {
    border-color: var(--primary) !important;
    background: rgba(99, 102, 241, 0.04) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.12) !important;
}
.block-picker-item:active {
    transform: scale(0.96) translateY(-2px);
}
.block-picker-icon {
    font-size: 1.65rem;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.block-picker-item:hover .block-picker-icon {
    transform: scale(1.15);
    color: var(--primary);
}
.block-picker-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ==========================================================================
   SUPER NICE HIGH-FIDELITY CMS SCROLLER & CONTROL STYLING
   ========================================================================== */

/* Custom styled scrollbars inside elements */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: var(--radius);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border: 2.5px solid var(--bg-main);
    border-radius: 50px;
    transition: var(--transition);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Beautiful custom-styled comboboxes / select inputs */
select.form-control, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 14px center !important;
    background-size: 14px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 18px !important;
    padding-left: 42px !important; /* space for chevron on the left because layout is RTL */
    height: 46px;
    cursor: pointer;
}
:root[data-theme="light"] select.form-control, 
:root[data-theme="light"] select,
body.light-theme select.form-control, 
body.light-theme select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
}

select.form-control option {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    padding: 12px !important;
}

/* Custom styling for standard input focus states */
.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2) !important;
}

/* Styled lists (Bullet points and numeric lists) and beautiful Checkboxes */
ul.clean-list, ul.clean-list li {
    padding: 0;
    margin: 0;
    list-style-type: none !important;
    list-style: none !important;
}
ul.clean-list li::before {
    content: none !important;
    display: none !important;
}
ul.clean-list li {
    padding-right: 0;
    padding-left: 0;
}

ul:not(.nav-menu, .sidebar-menu, .wysiwyg-toolbar, .editor-toolbar, .header-nav-list, .footer-nav-list-vert, .footer-nav-list-horiz, .submenu-list, .dropdown-menu, .cms-dynamic-menu, .fallback-nav, .header-nav-list-preview, .clean-list) {
    padding-right: 24px;
    margin-bottom: 20px;
    list-style-type: none;
}
ul:not(.nav-menu, .sidebar-menu, .wysiwyg-toolbar, .editor-toolbar, .header-nav-list, .footer-nav-list-vert, .footer-nav-list-horiz, .submenu-list, .dropdown-menu, .cms-dynamic-menu, .fallback-nav, .header-nav-list-preview, .clean-list) li {
    position: relative;
    margin-bottom: 8px;
    padding-right: 20px;
}
ul:not(.nav-menu, .sidebar-menu, .wysiwyg-toolbar, .editor-toolbar, .header-nav-list, .footer-nav-list-vert, .footer-nav-list-horiz, .submenu-list, .dropdown-menu, .cms-dynamic-menu, .fallback-nav, .header-nav-list-preview, .clean-list) li::before {
    content: "✦";
    color: var(--primary);
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.9rem;
}

input[type="checkbox"], input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius, 0px) !important;
    background-color: var(--bg-input);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    vertical-align: middle;
    transition: var(--transition);
    outline: none;
    position: relative;
    margin-left: 8px;
}
input[type="radio"] {
    border-radius: 50% !important;
}
input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 13px;
    color: #ffffff;
    font-weight: 800;
}
input[type="radio"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
input[type="radio"]:checked::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
}
input[type="checkbox"]:hover, input[type="radio"]:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Beautiful custom toast notification style overlay */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-alert-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.custom-alert-box {
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius, 0px);
    padding: 32px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.custom-alert-overlay.active .custom-alert-box {
    transform: scale(1);
}
.custom-alert-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 18px auto;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.custom-alert-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
}
.custom-alert-msg {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.7;
    margin-bottom: 26px;
}
.custom-alert-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius, 0px);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}
.custom-alert-btn:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

/* block style customizations: grids, hover animations and wrappers */
.block-render-wrapper {
    transition: var(--transition);
}
.block-render-wrapper > div,
.block-render-wrapper > article,
.block-render-wrapper > section {
    border-radius: inherit !important;
    overflow: hidden !important;
}

.block-item-body > div,
.block-item-body > article,
.block-item-body > section {
    border-radius: inherit !important;
    overflow: hidden !important;
}
.hover-anim-lift:hover {
    transform: translateY(-8px) !important;
}
.hover-anim-zoom:hover {
    transform: scale(1.03) !important;
}
.hover-anim-fade:hover {
    opacity: 0.75 !important;
}

/* responsive displays matching tailwind breakpoints */
@media (max-width: 991px) {
    .hide-on-mobile {
        display: none !important;
    }
    /* force container grids to single-column on mobile screen */
    .container-grid, [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .pricing-block > div {
        grid-template-columns: 1fr !important;
    }
    .features-grid {
        grid-template-columns: 1fr !important;
    }
}
@media (min-width: 992px) {
    .hide-on-desktop {
        display: none !important;
    }
}

/* Accordion Component */
.xeex-accordion {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    margin-bottom: 12px;
}
.xeex-accordion-header {
    padding: 14px 20px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
}
.xeex-accordion.open .xeex-accordion-header {
    border-bottom-color: var(--border);
    color: var(--primary);
}
.xeex-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.xeex-accordion.open .xeex-accordion-body {
    max-height: 1000px;
    padding: 15px 20px;
    transition: max-height 0.3s ease-in-out;
}

/* Tabs Component */
.xeex-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 15px;
    overflow-x: auto;
}
.xeex-tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}
.xeex-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.xeex-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.xeex-tab-pane.active {
    display: block;
}

/* Icon Box Component */
.xeex-iconbox {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.xeex-iconbox-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Stat Counter */
.xeex-counter {
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    padding: 24px;
    text-align: center;
}
.xeex-counter-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    font-family: monospace;
    direction: ltr;
}

/* Audio Player */
.xeex-audioplayer {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: var(--radius);
}
.xeex-audio-cover {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.xeex-audio-info {
    flex-grow:1;
}
.xeex-audio-info strong {
    display: block;
    font-size: 0.95rem;
}
.xeex-audio-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.xeex-audio-ctrls {
    display: flex;
    align-items: center;
}

/* Carousel / Slideshow */
.xeex-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.xeex-carousel-inner {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}
.xeex-carousel-item {
    min-width: 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: #fff;
    background-size: cover;
    background-position: center;
}
.xeex-carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9,9,11,0.6);
    z-index: 1;
}
.xeex-carousel-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    text-align: center;
}
.xeex-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
}
.xeex-carousel-arrow.prev { right: 15px; }
.xeex-carousel-arrow.next { left: 15px; }

/* social icons list */
.xeex-socials {
    display: flex;
    gap: 12px;
}
.xeex-social-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    transition: var(--transition);
}
.social-icon-telegram { background-color: #0088cc; }
.social-icon-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icon-whatsapp { background-color: #25d366; }
.social-icon-github { background-color: #24292e; }
.social-icon-linkedin { background-color: #0077b5; }

/* Container Column Drag & Drop visual highlights */
.col-drop-zone {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 12px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
}
.col-drop-zone.column-drag-over {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2) inset;
}

/* Nested Block Elements inside Column Boxes */
.nested-block-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    padding: 12px;
    position: relative;
    cursor: grab;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}
.nested-block-item:hover, .nested-block-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.nested-block-item.dragging {
    opacity: 0.35;
    border-style: dotted;
}
.nested-block-item.drag-over {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.04);
    transform: translateY(2px);
}

/* Prevent inside element pointer-events during active canvas dragging for rock-solid drop zone tracking */
.xeex-canvas-dragging .block-item * {
    pointer-events: none !important;
}
.xeex-canvas-dragging .col-drop-zone,
.xeex-canvas-dragging .block-item,
.xeex-canvas-dragging .nested-block-item {
    pointer-events: auto !important;
}

/* Nested Block Header & Controls toolbar spacing and size */
.nested-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.nested-block-controls {
    display: flex;
    gap: 4px;
}
.nested-block-controls button {
    padding: 2px 6px;
    font-size: 10px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nested-block-controls button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-surface);
}
.nested-block-controls button.btn-danger-sm:hover,
.nested-block-controls button:last-child:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(220, 38, 38, 0.1);
}
.nested-block-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* Canvas Drop Indicator helper */
.canvas-drag-over {
    border: 2px dashed var(--primary);
    background: rgba(99, 102, 241, 0.02);
}

/* ==========================================================================
   MOBILE ADAPTATIONS & ULTRA RESPONSIVE STYLING (xeexCMS)
   ========================================================================== */

/* 1. Prevent lists and tables with many columns from collapsing/squishing on mobile viewports */
@media (max-width: 991px) {
    .table-responsive .table {
        min-width: 1080px !important;
    }
    .table-responsive .table.table-compact,
    .table-responsive .table.xeex-responsive-stacked-table {
        min-width: 100% !important;
    }
    .table-responsive:has(.xeex-responsive-stacked-table) {
        overflow: visible !important;
        overflow-x: visible !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    /* Elegant Desktop-First & Touch-Aware Stacked Cards Layout for Tables on Mobile */
    .xeex-responsive-stacked-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
    }
    .xeex-responsive-stacked-table thead {
        display: none !important; /* Hide structural headers */
    }
    .xeex-responsive-stacked-table tbody {
        display: block !important;
        width: 100% !important;
    }
    .xeex-responsive-stacked-table tr {
        display: block !important;
        background: var(--bg-surface) !important;
        border: 1px solid var(--border) !important;
        border-radius: var(--radius-lg, 8px) !important;
        margin-bottom: 12px !important;
        padding: 12px 14px 10px 14px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
        position: relative !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .xeex-responsive-stacked-table tr:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16) !important;
        border-color: var(--primary) !important;
    }
    :root[data-theme="light"] .xeex-responsive-stacked-table tr,
    body.light-theme .xeex-responsive-stacked-table tr {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    }
    :root[data-theme="light"] .xeex-responsive-stacked-table tr:hover,
    body.light-theme .xeex-responsive-stacked-table tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    }
    
    .xeex-responsive-stacked-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 6px 0 !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.03) !important;
        text-align: right !important; /* RTL support */
        font-size: 0.82rem !important;
        color: var(--text-main) !important;
        background: transparent !important;
        min-height: auto !important;
    }
    :root[data-theme="light"] .xeex-responsive-stacked-table td,
    body.light-theme .xeex-responsive-stacked-table td {
        border-bottom-color: rgba(0, 0, 0, 0.03) !important;
    }
    .xeex-responsive-stacked-table td:last-child {
        border-bottom: none !important;
    }

    /* Clean container wrapping cell values to avoid squishing and spacing leaks on mobile */
    .xeex-responsive-stacked-table .cell-content-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important; /* Stack snuggly on the left in RTL */
        text-align: left !important;
        gap: 5px !important;
        max-width: 65% !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure child flex-badge containers flow and wrap beautifully */
    .xeex-responsive-stacked-table .cell-content-wrapper > div,
    .xeex-responsive-stacked-table .cell-content-wrapper .flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important; /* snugs badges to the left margin */
        gap: 4px !important;
        width: 100% !important;
        max-width: none !important;
    }

    /* Small, modern badges for space optimization inside responsive stacked cards */
    .xeex-responsive-stacked-table .block-badge,
    .xeex-responsive-stacked-table span.block-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
        margin: 1px 0 !important;
        white-space: nowrap !important;
        border-radius: 4px !important;
    }

    /* Override inline hardcoded max-width inside the stacked table to allow badges to expand horizontally */
    .xeex-responsive-stacked-table td div[style*="max-width"] {
        max-width: none !important;
        justify-content: flex-end !important;
    }

    /* Sub-meta details design */
    .xeex-responsive-stacked-table td.cell-meta {
        font-size: 0.78rem !important;
        color: var(--text-muted) !important;
    }
    .xeex-responsive-stacked-table td.cell-meta::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        color: var(--text-muted) !important;
        margin-left: 10px !important;
        text-align: right !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
    }

    /* Checkbox aligned beautifully on the top right */
    .xeex-responsive-stacked-table td.cell-checkbox {
        display: inline-flex !important;
        position: absolute !important;
        top: 14px !important;
        right: 14px !important;
        width: auto !important;
        border-bottom: none !important;
        padding: 0 !important;
        z-index: 10 !important;
    }
    .xeex-responsive-stacked-table td.cell-checkbox::before {
        display: none !important;
    }

    /* Header image / thumbnail scaled beautifully to top-left */
    .xeex-responsive-stacked-table td.cell-image {
        display: inline-flex !important;
        position: absolute !important;
        top: 14px !important;
        left: 14px !important;
        width: 38px !important;
        height: 38px !important;
        border-bottom: none !important;
        padding: 0 !important;
        z-index: 10 !important;
    }
    .xeex-responsive-stacked-table td.cell-image::before {
        display: none !important;
    }
    .xeex-responsive-stacked-table td.cell-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 6px !important;
        border: 1px solid var(--border) !important;
    }

    /* Title / Heading takes center-stage, margins adjusted safely to prevent overlapping */
    .xeex-responsive-stacked-table td.cell-title {
        display: block !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        color: var(--text-main) !important;
        border-bottom: none !important;
        padding: 4px 0 12px 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        text-align: right !important;
        line-height: 1.4 !important;
        width: 100% !important;
    }
    .xeex-responsive-stacked-table tr:has(.cell-checkbox) td.cell-title {
        padding-right: 28px !important; /* Safety padding for absolute checkbox in top-right */
    }
    .xeex-responsive-stacked-table tr:has(.cell-image) td.cell-title {
        padding-left: 48px !important; /* Safety padding for absolute image in top-left */
    }
    .xeex-responsive-stacked-table td.cell-title::before {
        display: none !important;
    }
    .xeex-responsive-stacked-table td.cell-title a {
        color: var(--text-main) !important;
        text-decoration: none !important;
    }
    .xeex-responsive-stacked-table td.cell-title a:hover {
        color: var(--primary) !important;
    }

    /* Status badge card representation */
    .xeex-responsive-stacked-table td.cell-status {
        display: flex !important;
        justify-content: space-between !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.03) !important;
    }
    :root[data-theme="light"] .xeex-responsive-stacked-table td.cell-status,
    body.light-theme .xeex-responsive-stacked-table td.cell-status {
        border-bottom-color: rgba(0, 0, 0, 0.03) !important;
    }
    .xeex-responsive-stacked-table td.cell-status::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        color: var(--text-muted) !important;
        font-size: 0.76rem !important;
        margin-left: 10px !important;
    }
    .xeex-responsive-stacked-table td.cell-status .badge,
    .xeex-responsive-stacked-table td.cell-status [class*="badge"],
    .xeex-responsive-stacked-table td.cell-status span {
        font-size: 0.72rem !important;
        font-weight: 800 !important;
        padding: 3px 8px !important;
        border-radius: 4px !important;
    }

    /* Actions ribbon separator at bottom */
    .xeex-responsive-stacked-table td.cell-actions {
        display: flex !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        width: 100% !important;
        border-bottom: none !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.05) !important;
        margin-top: 8px !important;
        padding: 10px 0 0 0 !important;
    }
    :root[data-theme="light"] .xeex-responsive-stacked-table td.cell-actions,
    body.light-theme .xeex-responsive-stacked-table td.cell-actions {
        border-top-color: rgba(0, 0, 0, 0.05) !important;
    }
    .xeex-responsive-stacked-table td.cell-actions::before {
        display: none !important;
    }
    .xeex-responsive-stacked-table td.cell-actions > div,
    .xeex-responsive-stacked-table td.cell-actions .flex {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .xeex-responsive-stacked-table td.cell-actions .btn,
    .xeex-responsive-stacked-table td.cell-actions button,
    .xeex-responsive-stacked-table td.cell-actions a.btn {
        padding: 8px 12px !important;
        font-size: 0.78rem !important;
        height: 38px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        font-weight: 700 !important;
    }
    /* Primary / Edit button expands to fill the card width */
    .xeex-responsive-stacked-table td.cell-actions .btn:not(.btn-danger):not([class*="danger"]):not(.btn-outline),
    .xeex-responsive-stacked-table td.cell-actions .btn-outline {
        flex: 1 !important;
    }
    /* Danger/Trash retains solid 42px icon width */
    .xeex-responsive-stacked-table td.cell-actions .btn-danger,
    .xeex-responsive-stacked-table td.cell-actions [class*="danger"] {
        flex: 0 0 42px !important;
        width: 42px !important;
        padding: 0 !important;
    }
}

/* 2. Responsive styling for the advanced filtering & sorting bar */
@media (max-width: 991px) {
    .filter-bar-container {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .filter-bar-container .form-group {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin-bottom: 8px !important;
    }
    .filter-bar-container .form-group select,
    .filter-bar-container .form-group input {
        width: 100% !important;
    }
    .filter-bar-container > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }
    .filter-bar-container > div:last-child .btn,
    .filter-bar-container > div:last-child .btn-outline {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

/* 3. Responsive styling for the floating sticky bulk action bar */
@media (max-width: 991px) {
    .sticky-bulk-bar-adaptive {
        left: 10px !important;
        right: 10px !important;
        max-width: calc(100% - 20px) !important;
        padding: 14px 18px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        border-radius: var(--radius) !important;
    }
    .sticky-bulk-bar-adaptive > div {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    .sticky-bulk-bar-adaptive > div:first-child {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .sticky-bulk-bar-adaptive > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .sticky-bulk-bar-adaptive > div:last-child button {
        width: 100% !important;
        justify-content: center !important;
    }
    /* Advanced adaptive classes to prevent overflow and align elements dynamically on mobile devices */
    .sticky-bulk-bar-adaptive > div:last-child > div[style*="inline-flex"],
    .sticky-bulk-bar-adaptive > div:last-child > div[style*="inline-flex"] {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        height: auto !important;
        padding: 6px 12px !important;
        box-sizing: border-box !important;
    }
    .sticky-bulk-bar-adaptive > div:last-child > div[style*="inline-flex"] select,
    .sticky-bulk-bar-adaptive > div:last-child > div[style*="inline-flex"] input {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .sticky-bulk-bar-adaptive > div:last-child > div[style*="inline-flex"] button {
        width: auto !important;
        flex-shrink: 0 !important;
        padding: 0 16px !important;
    }
    .sticky-bulk-bar-adaptive > div:last-child > div[style*="border-right"] {
        display: none !important;
    }
}


/* ================= UNIFIED MOBILE SIDEBAR SYSTEM ================= */
@media (max-width: 991px) {
    /* Completely hide the legacy top dropdown menu on mobile inside admin dashboard */
    .admin-dashboard-body .nav-menu {
        display: none !important;
    }
    .admin-dashboard-body .nav-menu.open {
        display: none !important;
    }

    /* Hide the old gears icon sidebar trigger */
    .sidebar-toggle-btn {
        display: none !important;
    }

    /* Align and display the single hamburger button properly on mobile */
    .admin-mobile-controls .mobile-menu-toggle {
        display: inline-flex !important;
    }

    /* Ensure the novel sidebar-mobile-header-tools are displayed */
    .sidebar-mobile-header-tools {
        display: block !important;
    }

    /* Gorgeous hover/focus interactions for tools inside sidebar */
    .mobile-tool-link {
        border: 1.5px solid transparent;
    }
    .mobile-tool-link:hover {
        background: rgba(20, 184, 166, 0.08) !important;
        color: var(--primary) !important;
        border-color: rgba(20, 184, 166, 0.15);
    }
}

/* Ultimate Theme-Aware Hero Section */
.hero-section {
    position: relative;
    padding: 100px 30px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-surface) 100%);
    text-align: center;
}

/* If hero has background image, we enforce dark text shielding to make white text pop */
.hero-section.has-bg {
    color: #ffffff !important;
}

.hero-section.has-bg .hero-title {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-section.has-bg .hero-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* If no background image, it inherits theme text colors cleanly */
.hero-section:not(.has-bg) {
    color: var(--text-main);
}

.hero-section:not(.has-bg) .hero-title {
    color: var(--text-main) !important;
}

.hero-section:not(.has-bg) .hero-subtitle {
    color: var(--text-muted) !important;
}

.hero-section:not(.has-bg) .hero-overlay {
    display: none !important; /* Hide overlay if there is no image */
}

/* Fix for category and service administration tree list bullets */
ul.portfolio-cat-tree-level li::before,
ul.service-cat-tree-level li::before {
    content: none !important;
    display: none !important;
}
ul.portfolio-cat-tree-level,
ul.service-cat-tree-level {
    padding-right: 0px !important;
    margin-bottom: 0px !important;
}

/* 
   =========================================
   MOBILE-FIRST & COMPREHENSIVE RESPONSIVIZER OVERRIDES 
   =========================================
*/

/* Card and Column paddings on smaller mobile viewports */
@media (max-width: 991px) {
    .container {
        padding: 0 12px !important;
    }
    .main-content {
        padding: 12px !important;
    }
    .card {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    /* Stack layout of card-title when there are buttons or indicators next to it */
    .card-title {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding-bottom: 10px !important;
        margin-bottom: 15px !important;
    }
    .card-title > * {
        width: auto !important;
    }
    .card-title > span, .card-title > div:not(.Site-logo-container) {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        font-size: 0.95rem !important;
        line-height: 1.45 !important;
        word-break: break-word !important;
    }
    .card-title > .btn, .card-title > button, .card-title > a {
        width: 100% !important;
        text-align: center;
        justify-content: center;
        display: inline-flex !important;
        align-items: center;
    }
    /* Prevent badge/indicator squash */
    .pulse-indicator, .block-badge, #scratch-sync-badge {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        width: auto !important;
        align-self: flex-start !important;
    }
    
    /* Force simple single columns on ALL inline-styled grids on mobile viewports, EXCLUDING calendars and item-pickers */
    [style*="grid-template-columns"]:not(.picker-days-grid):not(.picker-weekdays):not(#xeex-icons-list-wrapper):not(.wms-emoji-grid):not(.wms-tools-grid):not(.no-mobile-stack) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    div[style*="grid-template-columns"]:not(.picker-days-grid):not(.picker-weekdays):not(#xeex-icons-list-wrapper):not(.wms-emoji-grid):not(.wms-tools-grid):not(.no-mobile-stack) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    section[style*="grid-template-columns"]:not(.picker-days-grid):not(.picker-weekdays):not(#xeex-icons-list-wrapper):not(.wms-emoji-grid):not(.wms-tools-grid):not(.no-mobile-stack) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .brand-grid, .card-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .grid-form-responsive {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* Universal Mobile Table Fail-safe rules */
    table:not(.picker-days-grid):not(.picker-weekdays) {
        display: block !important;
        overflow-x: auto !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .table-responsive table {
        display: table !important;
        overflow-x: visible !important;
        max-width: none !important;
    }
}

/* Specific fix for Maintenance card title/header shown in Screenshot 1 */
@media (max-width: 991px) {
    .setting-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .setting-header > div {
        width: 100% !important;
        justify-content: space-between !important;
    }
    /* Alert / warning box alignments */
    .instructions-box {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 12px 16px !important;
    }
}

/* Specific fix for Scratchpad Memo & Traffic analytics card footers & elements */
@media (max-width: 991px) {
    /* For Scratchpad memo footers seen in Screenshot 4 */
    .card div[style*="display:flex; justify-content:space-between; align-items:center"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .card div[style*="display:flex; justify-content:space-between; align-items:center"] button,
    .card div[style*="display:flex; justify-content:space-between; align-items:center"] span {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
    /* Chart Viewport auto-width rendering inside SVG containers */
    .chart-viewport {
        overflow-x: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .chart-viewport svg {
        min-width: 480px !important; /* Forces scroll bar instead of making graph nodes overlap! */
    }
}

/* Specific fix for Articles list, Block editor visual columns, and general menus */
@media (max-width: 991px) {
    /* Navbar element overrides to prevent header wrap overflow (Screenshot 6) */
    .navbar-inner {
        gap: 8px !important;
        padding: 0 8px !important;
    }
    .brand {
        gap: 8px !important;
    }
    .brand-title {
        font-size: 1rem !important;
    }
    /* Hide the long / PATH on mobile */
    .navbar-active-section {
        display: none !important;
    }
    .navbar-back-btn-container {
        margin-left: 5px !important;
    }
    .navbar-back-btn-container .btn {
        padding: 4px 8px !important;
        height: 28px !important;
        font-size: 10px !important;
    }

    /* Block Editor controls stack on mobile (Screenshot 6) */
    .block-item-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding-bottom: 10px !important;
    }
    .block-item-header .block-controls {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
}

/* Button & Select Box formatting on small screens */
@media (max-width: 576px) {
    .btn, button, input[type="submit"], input[type="button"] {
        white-space: normal !important;
        word-break: break-word !important;
        text-align: center !important;
        justify-content: center !important;
    }
    /* Let long action buttons like the save ones expand beautifully */
    .editor-tabs-nav button, .editor-tabs-nav div {
        width: 100% !important;
    }
    .editor-status-switcher {
        width: 100% !important;
        justify-content: center !important;
    }
    .editor-status-switcher button {
        flex: 1 !important;
    }
}

/* ==========================================================================
   COLLAPSIBLE MOBILE FILTERS & PREMIUM THEMATIC TOUCH PAGINATION (xeexCMS)
   ========================================================================== */

/* 1. Collapsible Filter Toggle header (grows only on mobile viewports) */
.mobile-filter-header-toggle {
    display: none; /* Hidden on desktop so the horizontal inline filters display natively */
}

@media (max-width: 991px) {
    .mobile-filter-header-toggle {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 12px 16px !important;
        background: var(--bg-surface) !important;
        border: 1px solid var(--border) !important;
        border-radius: var(--radius-lg, 8px) !important;
        cursor: pointer !important;
        user-select: none !important;
        transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
    }
    .mobile-filter-header-toggle:hover {
        background: rgba(255, 255, 255, 0.02) !important;
        border-color: var(--primary) !important;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08) !important;
    }
    :root[data-theme="light"] .mobile-filter-header-toggle:hover,
    body.light-theme .mobile-filter-header-toggle:hover {
        background: rgba(0, 0, 0, 0.01) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    }
    .mobile-filter-title {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        font-weight: 800 !important;
        font-size: 0.82rem !important;
        color: var(--text-main) !important;
    }
    .active-filter-badge {
        font-size: 0.7rem !important;
        padding: 2px 8px !important;
        background: rgba(20, 184, 166, 0.12) !important;
        color: var(--secondary) !important;
        border: 1px solid rgba(20, 184, 166, 0.25) !important;
        border-radius: 4px !important;
        font-weight: 800 !important;
        margin-right: 8px !important;
    }
    .mobile-filter-chevron {
        font-size: 0.78rem !important;
        color: var(--text-muted) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-collapsible-filter-form {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 15px 0 20px 0 !important;
    }
    
    .mobile-collapsible-filter-body {
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        padding: 0 16px !important;
        margin-top: 0 !important;
        border: 1px solid transparent !important;
        border-top: none !important;
        border-radius: 0 0 var(--radius-lg, 8px) var(--radius-lg, 8px) !important;
        box-sizing: border-box !important;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                    opacity 0.25s ease-out, 
                    padding 0.35s ease,
                    margin 0.35s ease !important;
    }
    
    /* Collapsible Expansion State Rules */
    .mobile-collapsible-filter-form.is-expanded .mobile-filter-header-toggle {
        border-radius: var(--radius-lg, 8px) var(--radius-lg, 8px) 0 0 !important;
        border-bottom-color: transparent !important;
        background: var(--bg-surface) !important;
        box-shadow: none !important;
    }
    .mobile-collapsible-filter-form.is-expanded .mobile-filter-chevron {
        transform: rotate(180deg) !important;
        color: var(--primary) !important;
    }
    .mobile-collapsible-filter-form.is-expanded .mobile-collapsible-filter-body {
        max-height: 2000px !important;
        opacity: 1 !important;
        padding: 20px 16px !important;
        margin-top: -1px !important;
        background: var(--bg-surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    }
}

/* 2. Premium Theme-Aware Touch Pagination System overrides */
.xeex-pagination-container {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg, 8px) !important;
    padding: 16px 20px !important;
    box-shadow: var(--shadow) !important;
}

.xeex-pagination-info {
    font-weight: 700 !important;
    color: var(--text-muted) !important;
}

.xeex-pagination-info strong {
    color: var(--text-main) !important;
}

.xeex-page-link, .xeex-page-current {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 8px !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-input) !important;
    color: var(--text-muted) !important;
    border-radius: var(--radius-sm, 4px) !important;
    text-decoration: none !important;
    font-size: 0.82rem !important;
    font-weight: bold !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
}

.xeex-page-link:hover {
    border-color: var(--primary) !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2) !important;
}

.xeex-page-current {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    font-weight: 800 !important;
}

@media (max-width: 576px) {
    .xeex-pagination-container {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 16px 12px !important;
        gap: 15px !important;
    }
    .xeex-pagination-nav {
        justify-content: center !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .xeex-page-link, .xeex-page-current {
        min-width: 38px !important;
        height: 38px !important;
        font-size: 0.85rem !important;
    }
}


/* FontAwesome exclusion typography rules clean-up - default behavior handles this naturally */


/* ==========================================================================
   PREMIUM XEEX QUICK EDIT MODAL STYLING
   ========================================================================== */
.xeex-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(9, 9, 11, 0.85) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
    padding: 16px !important;
}

.xeex-modal-overlay.open {
    display: flex !important;
    animation: xeexFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

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

.xeex-modal-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 580px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    animation: xeexScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
}

@keyframes xeexScaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.xeex-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 20px !important;
    border-bottom: 1px solid var(--border) !important;
    background: rgba(255, 255, 255, 0.01) !important;
}

.xeex-modal-header h3 {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    margin: 0 !important;
}

.xeex-modal-close-btn {
    background: transparent !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    line-height: 1 !important;
}

.xeex-modal-close-btn:hover {
    color: var(--text-main) !important;
}

.xeex-modal-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 24px 20px !important;
}

@media (max-width: 576px) {
    .xeex-modal-grid {
        grid-template-columns: 1fr !important;
    }
    .xeex-modal-grid .form-group {
        grid-column: span 1 !important;
    }
}

.xeex-modal-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    border-top: 1px solid var(--border) !important;
    background: rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.xeex-modal-actions .btn {
    padding: 10px 22px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

@media (max-width: 480px) {
    .xeex-modal-actions {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 16px !important;
    }
    .xeex-modal-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* ==========================================================================
   XEEX COMPREHENSIVE MOBILE AND DESKTOP UI POLISH
   ========================================================================== */

@media (max-width: 991px) {
    /* 1. Global Card Header Flex Stacking on Mobile to prevent title/buttons overlapping */
    .card > div[style*="display: flex"][style*="justify-content: space-between"],
    .card > div[style*="display:flex"][style*="justify-content:space-between"],
    div[style*="display: flex"][style*="justify-content: space-between"]:has(> .btn-primary) {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        text-align: center !important;
    }
    
    .card > div[style*="display: flex"][style*="justify-content: space-between"] > *,
    .card > div[style*="display:flex"][style*="justify-content:space-between"] > * {
        text-align: center !important;
        justify-content: center !important;
    }
    
    /* Center the main buttons in headers on mobile and make them full width inside their flexbox */
    .card > div[style*="display: flex"][style*="justify-content: space-between"] .btn,
    .card > div[style*="display:flex"][style*="justify-content:space-between"] .btn {
        width: 100% !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    /* 2. Overlap & Overflow and Squish Prevention Inside Responsive Tables on Mobile */
    .xeex-responsive-stacked-table th,
    .xeex-responsive-stacked-table td {
        width: auto !important; /* Reset hardcoded inline widths on mobile tags/status tables */
    }

    /* Prevent icons and image containers from squishing */
    .xeex-responsive-stacked-table img,
    .xeex-responsive-stacked-table svg,
    .xeex-responsive-stacked-table .fa-solid,
    .xeex-responsive-stacked-table .fa-regular {
        flex-shrink: 0 !important;
    }

    /* Enable gorgeous wrapping inside the primary title columns */
    .xeex-responsive-stacked-table .cell-title .flex,
    .xeex-responsive-stacked-table .cell-title [class*="flex"] {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: flex-start !important; /* Keeps image on right and content title on left in RTL */
    }

    /* Beautiful wrapping fallback inside custom content cells */
    .xeex-responsive-stacked-table .cell-content-wrapper {
        max-width: 100% !important; /* Let content expand fully inside the cell */
    }

    /* Adjust flex children of cell actions columns to flow nicely and wrap if needed */
    .xeex-responsive-stacked-table td.cell-actions > div {
        flex-wrap: wrap !important;
        row-gap: 8px !important;
    }

    /* If a button is inside a form inside cell-actions list */
    .xeex-responsive-stacked-table td.cell-actions form {
        display: inline-block !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
    }
    .xeex-responsive-stacked-table td.cell-actions form .btn {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    /* 3. Category Tree Mobile Sizing & Stack Up to prevent extreme nesting layouts from overflowing */
    .category-node-card {
        padding: 12px 14px !important;
    }

    /* Let nested nodes stack more gently on small screens */
    .category-node-card[data-depth="1"] { margin-right: 12px !important; }
    .category-node-card[data-depth="2"] { margin-right: 20px !important; }
    .category-node-card[data-depth="3"] { margin-right: 28px !important; }
    .category-node-card[data-depth="4"] { margin-right: 36px !important; }

    /* Transform the category info & buttons into a gorgeous responsive vertical flow */
    .category-node-card > div[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    /* Full width content info row */
    .category-node-card > div[style*="display: flex"] > div:first-child {
        width: 100% !important;
    }

    /* Full width stats + action buttons row with dashed separation line under the title */
    .category-node-card > div[style*="display: flex"] > div:last-child {
        width: 100% !important;
        justify-content: space-between !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.08) !important;
        padding-top: 8px !important;
        margin-top: 4px !important;
    }
    :root[data-theme="light"] .category-node-card > div[style*="display: flex"] > div:last-child,
    body.light-theme .category-node-card > div[style*="display: flex"] > div:last-child {
        border-top-color: rgba(0, 0, 0, 0.06) !important;
    }
}

/* 4. Modal Popups Safe Scrolling on Mobile & Desktop to prevent fields cutoff */
.xeex-modal-card {
    max-height: calc(100vh - 32px) !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
}


