﻿/* Root Variables */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --header-height: 64px;
    --primary-color: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #6366f1);
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --sidebar-bg: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

[data-theme="dark"] body {
    background: #0f172a;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

[data-theme="dark"] .app-wrapper {
    background: #0f172a;
}

/* Sidebar */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

    .sidebar-wrapper.collapsed {
        width: var(--sidebar-collapsed-width);
    }

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: var(--header-height);
    position: relative;
    flex-shrink: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 10px;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-text {
    margin-left: 12px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-wrapper.collapsed .brand-text {
    display: none;
}

.btn-toggle-sidebar {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
    z-index: 2;
}

    .btn-toggle-sidebar:hover {
        transform: translateY(-50%) scale(1.1);
    }

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

/* Nav Menu Styles */
.nav-menu {
    padding: 0 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-link-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    position: relative;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

    .nav-link-item:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        transform: translateX(4px);
    }

    .nav-link-item.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
        color: #fff;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    }

        .nav-link-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 24px;
            background: linear-gradient(to bottom, #3b82f6, #6366f1);
            border-radius: 0 4px 4px 0;
        }

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
}

/* Collapsed sidebar nav */
.sidebar-wrapper.collapsed .nav-section-title,
.sidebar-wrapper.collapsed .nav-text {
    display: none;
}

.sidebar-wrapper.collapsed .nav-link-item {
    justify-content: center;
    padding: 12px;
}

.sidebar-wrapper.collapsed .nav-icon {
    margin-right: 0;
    font-size: 18px;
}

.sidebar-wrapper.collapsed .nav-link-item:hover {
    transform: translateX(0);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-wrapper.collapsed .user-details {
    display: none;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

    .main-content.expanded {
        margin-left: var(--sidebar-collapsed-width);
    }

/* Top Navbar */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .top-navbar {
    background: rgba(30, 41, 59, 0.9);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

    .btn-menu-toggle:hover {
        color: var(--primary-color);
    }

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    margin-right: 8px;
}

    .search-wrapper .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-secondary);
        font-size: 14px;
    }

    .search-wrapper .search-input {
        padding: 8px 12px 8px 38px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--card-bg);
        color: var(--text-primary);
        font-size: 14px;
        width: 220px;
        transition: all 0.2s ease;
    }

        .search-wrapper .search-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            width: 280px;
        }

[data-theme="dark"] .search-wrapper .search-input {
    background: #1e293b;
    border-color: #334155;
}

    [data-theme="dark"] .search-wrapper .search-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

/* Nav Items */
.nav-link {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .nav-link:hover {
        background: var(--border-color);
        color: var(--text-primary);
    }

[data-theme="dark"] .nav-link:hover {
    background: #334155;
}

.badge-notification {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--danger-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

/* Dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 8px;
    min-width: 240px;
    background: var(--card-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border: 1px solid #334155;
}

.dropdown-header {
    padding: 8px 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

    .dropdown-item:hover {
        background: var(--border-color);
        color: var(--text-primary);
    }

[data-theme="dark"] .dropdown-item:hover {
    background: #334155;
}

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

.notification-dropdown {
    width: 340px;
}

    .notification-dropdown .dropdown-item {
        padding: 10px 12px;
    }

/* Page Content */
.page-content {
    flex: 1;
    padding: 24px;
    background: #f8fafc;
}

[data-theme="dark"] .page-content {
    background: #0f172a;
}

.content-wrapper {
    max-width: 1440px;
    margin: 0 auto;
}

/* Footer */
.app-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

[data-theme="dark"] .app-footer {
    background: #1e293b;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

    .sidebar-overlay.active {
        display: block;
    }

/* Responsive */
@media (max-width: 992px) {
    .sidebar-wrapper {
        transform: translateX(-100%);
        transition: transform var(--transition-speed) ease;
        width: var(--sidebar-width);
    }

        .sidebar-wrapper.open {
            transform: translateX(0);
        }

            .sidebar-wrapper.open .nav-section-title,
            .sidebar-wrapper.open .nav-text {
                display: block !important;
            }

            .sidebar-wrapper.open .nav-link-item {
                justify-content: flex-start !important;
                padding: 10px 12px !important;
            }

            .sidebar-wrapper.open .nav-icon {
                margin-right: 12px !important;
                font-size: 16px !important;
            }

    .btn-menu-toggle {
        display: flex !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .search-wrapper .search-input {
        width: 140px;
    }

        .search-wrapper .search-input:focus {
            width: 180px;
        }
}

@media (max-width: 576px) {
    .top-navbar {
        padding: 0 12px;
    }

    .page-title {
        font-size: 16px;
    }

    .page-content {
        padding: 16px;
    }

    .search-wrapper .search-input {
        display: none;
    }

        .search-wrapper .search-input:focus {
            display: block;
            width: 160px;
            position: absolute;
            right: 0;
            top: 100%;
            margin-top: 8px;
            box-shadow: var(--shadow-lg);
        }

    .notification-dropdown {
        width: 300px;
        right: -60px !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content > .content-wrapper {
    animation: fadeIn 0.3s ease;
}


/* Top Navbar - Updated with Gradient */
/*.top-navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--header-height);
    background: linear-gradient(135deg, #1a472a 0%, #2d7d46 50%, #1a472a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}*/

/* Dark Mode Navbar */
/*[data-theme="dark"] .top-navbar {
    background: linear-gradient(135deg, #0d1f15 0%, #1a472a 50%, #0d1f15 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}*/


/*
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--header-height);
    background: linear-gradient(135deg, #059669 0%, #3b82f6 50%, #059669 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .top-navbar {
    background: linear-gradient(135deg, #065f46 0%, #1e3a5f 50%, #065f46 100%);
}*/



/* ========================================================= */
/* TOP NAVBAR - PRIMARY + INFO THEME                        */
/* ========================================================= */

.top-navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--header-height);
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 50%, #2563eb 100%);
    /*background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 50%, #2563eb 100%);*/
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .top-navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #0e7490 50%, #1e3a5f 100%);
}

/* Navbar Left - Page Title */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Menu Toggle Button */
.btn-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .btn-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.25);
        color: #ffffff;
    }

/* Search Bar */
.search-wrapper {
    position: relative;
    margin-right: 8px;
}

    .search-wrapper .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.6);
        font-size: 14px;
    }

    .search-wrapper .search-input {
        padding: 8px 12px 8px 38px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        font-size: 14px;
        width: 220px;
        transition: all 0.2s ease;
    }

        .search-wrapper .search-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .search-wrapper .search-input:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
            width: 280px;
        }

/* Dark Mode Search */
[data-theme="dark"] .search-wrapper .search-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

    [data-theme="dark"] .search-wrapper .search-input:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    }

/* Nav Items (Icons) */
.nav-link {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
        transform: translateY(-1px);
    }

    .nav-link:active {
        transform: scale(0.95);
    }

/* Badge Notification */
.badge-notification {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

/* Profile Avatar */
.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 8px;
    min-width: 240px;
    background: #ffffff;
    color: #1e293b;
}

[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
}

.dropdown-header {
    padding: 8px 12px;
    font-weight: 600;
    color: #1e293b;
}

[data-theme="dark"] .dropdown-header {
    color: #f1f5f9;
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: 6px;
    color: #1e293b;
    transition: all 0.2s ease;
}

    .dropdown-item:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

[data-theme="dark"] .dropdown-item {
    color: #f1f5f9;
}

    [data-theme="dark"] .dropdown-item:hover {
        background: #334155;
        color: #ffffff;
    }

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

/* Notification Dropdown */
.notification-dropdown {
    width: 340px;
}

    .notification-dropdown .dropdown-item {
        padding: 10px 12px;
    }

/* Responsive */
@media (max-width: 992px) {
    .btn-menu-toggle {
        display: flex !important;
    }

    .search-wrapper .search-input {
        width: 140px;
    }

        .search-wrapper .search-input:focus {
            width: 180px;
        }
}

@media (max-width: 576px) {
    .top-navbar {
        padding: 0 12px;
    }

    .page-title {
        font-size: 16px;
    }

    .search-wrapper .search-input {
        display: none;
    }

        .search-wrapper .search-input:focus {
            display: block;
            width: 160px;
            position: absolute;
            right: 0;
            top: 100%;
            margin-top: 8px;
            background: #2563eb;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

    .notification-dropdown {
        width: 300px;
        right: -60px !important;
    }
}

/* ========================================================= */
/* PRINT INVOICE STYLES    START HERE                        */
/* ========================================================= */

@media print {
    /* Hide all non-print elements */
    .top-navbar,
    .sidebar-wrapper,
    .app-footer,
    .btn-group,
    .btn,
    .form-control,
    .form-select,
    .input-group,
    .card-header .badge,
    .action-buttons,
    .alert,
    .no-print {
        display: none !important;
    }

    /* Show print-only elements */
    .print-only {
        display: block !important;
    }

    /* Page setup */
    body {
        background: white !important;
        margin: 0 !important;
        padding: 20px !important;
        color: #000 !important;
        font-family: 'Arial', sans-serif !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .page-content {
        padding: 0 !important;
        background: white !important;
    }

    .container-fluid {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Print Invoice Container */
    .print-invoice-container {
        background: white !important;
        padding: 30px !important;
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
    }

    /* Invoice Header */
    .invoice-header {
        text-align: center;
        border-bottom: 3px double #333;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

        .invoice-header .company-name {
            font-size: 28px;
            font-weight: 700;
            color: #1a472a;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .invoice-header .company-address {
            font-size: 14px;
            color: #555;
            margin-top: 5px;
        }

        .invoice-header .company-note {
            font-size: 13px;
            color: #d32f2f;
            font-weight: 600;
            margin-top: 8px;
            border-top: 1px dashed #ccc;
            padding-top: 8px;
            font-family: 'Arial', sans-serif;
            unicode-bidi: embed;
            direction: rtl;
        }

    /* Customer & Invoice Info */
    .info-section {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        padding: 10px 0;
        border-bottom: 2px solid #333;
    }

    .customer-info {
        flex: 1;
    }

    .invoice-info {
        flex: 1;
        text-align: right;
    }

    .info-label {
        font-weight: 600;
        color: #555;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .info-value {
        font-weight: 500;
        font-size: 14px;
        color: #000;
        margin-bottom: 4px;
    }

        .info-value strong {
            font-weight: 700;
        }

    /* Items Table */
    .items-table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
    }

        .items-table th {
            background: #1a472a !important;
            color: white !important;
            font-weight: 600;
            font-size: 13px;
            padding: 10px 12px;
            text-align: left;
            border: 1px solid #1a472a;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .items-table td {
            padding: 8px 12px;
            border: 1px solid #ddd;
            font-size: 13px;
            color: #000;
        }

        .items-table tbody tr:nth-child(even) {
            background: #f9f9f9;
        }

        .items-table tbody tr:hover {
            background: #f1f1f1;
        }

        .items-table .text-end {
            text-align: right;
        }

        .items-table .fw-bold {
            font-weight: 700;
        }

    /* Invoice Totals */
    .totals-section {
        margin-top: 10px;
        border-top: 2px solid #333;
        padding-top: 15px;
        display: flex;
        justify-content: flex-end;
    }

    .totals-table {
        width: 300px;
        border-collapse: collapse;
    }

        .totals-table td {
            padding: 5px 12px;
            font-size: 14px;
        }

        .totals-table .total-label {
            font-weight: 600;
            text-align: right;
            color: #555;
        }

        .totals-table .total-value {
            font-weight: 700;
            text-align: right;
            font-size: 16px;
        }

        .totals-table .grand-total td {
            font-size: 18px;
            font-weight: 700;
            border-top: 2px solid #333;
            padding-top: 10px;
            color: #1a472a;
        }

    /* Footer */
    .invoice-footer {
        margin-top: 30px;
        padding-top: 15px;
        border-top: 2px solid #333;
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: #666;
    }

        .invoice-footer .signature {
            font-weight: 600;
            color: #333;
            margin-top: 30px;
            text-align: center;
            border-top: 1px solid #ccc;
            padding-top: 10px;
            width: 200px;
        }

        .invoice-footer .terms {
            font-size: 11px;
            color: #888;
            text-align: center;
            width: 100%;
            margin-top: 10px;
        }

            .invoice-footer .terms span {
                display: block;
                direction: rtl;
                unicode-bidi: embed;
                font-family: 'Arial', sans-serif;
                font-size: 12px;
                color: #666;
            }

    /* Utility */
    .mb-1 {
        margin-bottom: 4px;
    }

    .mb-2 {
        margin-bottom: 8px;
    }

    .mb-3 {
        margin-bottom: 12px;
    }

    .mt-1 {
        margin-top: 4px;
    }

    .mt-2 {
        margin-top: 8px;
    }

    .mt-3 {
        margin-top: 12px;
    }

    .text-muted {
        color: #666 !important;
    }

    .print-only {
        display: none;
    }
}

/* Screen Styles for Print Preview */
.print-invoice-container {
    display: none;
}

.print-preview-active .print-invoice-container {
    display: block;
}

.print-preview-active .invoice-form-content {
    display: none;
}
/* PRINT INVOICE STYLES    END HERE */

/* ========================================================= */
/* SHOP SELECTOR                                            */
/* ========================================================= */

.shop-selector-wrapper {
    margin-right: 8px;
}

.shop-selector {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

    .shop-selector:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .shop-selector:focus {
        outline: none;
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    }

    .shop-selector option {
        background: #1e293b;
        color: #ffffff;
    }

[data-theme="dark"] .shop-selector {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

    [data-theme="dark"] .shop-selector option {
        background: #0f172a;
    }

/* ========================================================= */
/* PROFILE DROPDOWN                                         */
/* ========================================================= */

.profile-dropdown {
    min-width: 240px;
}

    .profile-dropdown .dropdown-header {
        padding: 12px 16px;
    }

    .profile-dropdown .profile-header-info h6 {
        color: var(--text-primary);
    }

    .profile-dropdown .profile-header-info .shop-info {
        color: var(--text-secondary);
        font-size: 12px;
    }

    .profile-dropdown .dropdown-item {
        padding: 8px 16px;
        cursor: pointer;
    }

        .profile-dropdown .dropdown-item:hover {
            background: var(--border-color);
        }

        .profile-dropdown .dropdown-item i {
            width: 20px;
        }

.shop-info {
    display: flex;
    align-items: center;
    font-size: 12px;
}

/* ========================================================= */
/* SIDEBAR USER INFO                                        */
/* ========================================================= */

.sidebar-footer .user-info {
    padding: 8px 0;
}

.sidebar-footer .user-shop {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    margin-top: 2px;
}

    .sidebar-footer .user-shop i {
        font-size: 10px;
    }

/* ========================================================= */
/* MODAL STYLES                                             */
/* ========================================================= */

.modal-content {
    background: var(--card-bg);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.modal .form-control {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

    .modal .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

[data-theme="dark"] .modal .form-control {
    background: #1e293b;
    border-color: #334155;
}

    [data-theme="dark"] .modal .form-control:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

/* ========================================================= */
/* RESPONSIVE SHOP SELECTOR                                 */
/* ========================================================= */

@media (max-width: 768px) {
    .shop-selector-wrapper {
        display: none;
    }
}