@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700;800&family=Cairo:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400..800;1,9..40,400..800&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --primary-accent: #3b82f6;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Multilingual Typography Settings */
html[lang="ar"], [lang="ar"] body, [lang="ar"] select, [lang="ar"] input, [lang="ar"] button, [lang="ar"] textarea {
    font-family: 'Alexandria', 'Cairo', system-ui, -apple-system, sans-serif !important;
}
html[lang="en"], [lang="en"] body, [lang="en"] select, [lang="en"] input, [lang="en"] button, [lang="en"] textarea {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}
html[lang="fr"], [lang="fr"] body, [lang="fr"] select, [lang="fr"] input, [lang="fr"] button, [lang="fr"] textarea {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
}
html[lang="es"], [lang="es"] body, [lang="es"] select, [lang="es"] input, [lang="es"] button, [lang="es"] textarea {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important;
}

body {
    color: #334155;
}


.app-wrapper {
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--sidebar-bg) !important;
    transition: all 0.3s ease;
    z-index: 1040;
}

@media (min-width: 992px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
    
    /* Hide scrollbar for cleaner look but keep functionality */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
}

.sidebar .nav-link {
    border-radius: 8px;
    margin-bottom: 4px;
    padding: 0.65rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.sidebar .nav-link.active {
    background-color: var(--primary-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.text-gradient {
    background: linear-gradient(to right, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Main Content Area */
.main-content {
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* DataTables & Custom Tables */
.table-responsive {
    border-radius: 10px;
}

.table {
    vertical-align: middle;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    display: block;
}

/* Collapsed Sidebar on Mobile (LTR & RTL) */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 270px !important;
        z-index: 1060 !important;
        overflow-y: auto !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        transition: left 0.3s ease-in-out, right 0.3s ease-in-out, transform 0.3s ease-in-out !important;
    }

    /* LTR Positioning */
    html[dir="ltr"] .sidebar, [dir="ltr"] .sidebar {
        left: -270px !important;
        right: auto !important;
    }
    html[dir="ltr"] .sidebar.show, [dir="ltr"] .sidebar.show {
        left: 0 !important;
        right: auto !important;
    }

    /* RTL Positioning (Arabic) */
    html[dir="rtl"] .sidebar, [dir="rtl"] .sidebar {
        right: -270px !important;
        left: auto !important;
    }
    html[dir="rtl"] .sidebar.show, [dir="rtl"] .sidebar.show {
        right: 0 !important;
        left: auto !important;
    }
}

/* Global Form Placeholder Faded Styling */
::placeholder {
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    font-weight: 400 !important;
}

::-webkit-input-placeholder {
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    font-weight: 400 !important;
}

:-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    font-weight: 400 !important;
}

::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    font-weight: 400 !important;
}

/* Universal Global Rule: Force All Phone/Mobile Inputs to LTR & Left Aligned in ALL languages */
input[type="tel"],
input[name="mobile"],
#mobile,
select[name="country_code"] {
    direction: ltr !important;
    text-align: left !important;
}

/* Ensure Bootstrap Input Groups for Mobile Numbers Flow Left-to-Right in RTL mode */
.input-group[dir="ltr"] {
    direction: ltr !important;
}

[dir="rtl"] input[type="tel"],
[dir="rtl"] input[name="mobile"],
[dir="rtl"] #mobile,
[dir="rtl"] select[name="country_code"] {
    direction: ltr !important;
    text-align: left !important;
}

