/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-hover: #334155;
    --sidebar-active: var(--primary-color);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    overflow-x: hidden;
}

/* Hide main content until logged in */
body.not-logged-in #sidebar,
body.not-logged-in #mainContent {
    display: none !important;
}

body.not-logged-in {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================
   Left Sidebar Navigation
   =================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.btn-close-sidebar {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu .nav {
    padding: 0;
}

.sidebar-menu .nav-item {
    margin-bottom: 2px;
}

.sidebar-menu .nav-link {
    color: var(--sidebar-text);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.sidebar-menu .nav-link i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-menu .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-menu .nav-link.active {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

.sidebar-menu .nav-link.collapsed i.bi-chevron-down {
    transform: rotate(-90deg);
    transition: var(--transition);
}

.sidebar-menu .nav-link:not(.collapsed) i.bi-chevron-down {
    transform: rotate(0deg);
}

/* Submenu Styles */
.submenu {
    background: rgba(0, 0, 0, 0.2);
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu li {
    margin: 0;
}

.submenu a {
    color: var(--sidebar-text);
    padding: 10px 20px 10px 50px;
    display: block;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.submenu a:hover {
    background: var(--sidebar-hover);
    color: #fff;
    padding-left: 55px;
}

/* ===================================
   Main Content Area
   =================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.top-header {
    background: #fff;
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    padding: 5px 10px;
    margin-right: 15px;
    display: none;
}

.header-title {
    flex: 1;
}

.header-title h5 {
    color: var(--dark-color);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.content-wrapper {
    padding: 0;
}

/* ===================================
   Dashboard Cards & Stats
   =================================== */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 15px;
}

.stat-primary .stat-icon {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.stat-success .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stat-info .stat-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.stat-info h6 {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-info h3 {
    color: var(--dark-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* ===================================
   Quick Action Buttons
   =================================== */
.section-header {
    display: flex;
    align-items: center;
    color: var(--dark-color);
}

.section-header h5 {
    font-weight: 600;
    margin: 0;
}

.quick-action-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.quick-action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.quick-action-btn i {
    font-size: 2rem;
}

.quick-action-btn span {
    font-size: 1rem;
    font-weight: 600;
}

/* ===================================
   Cards & Tables
   =================================== */
.card {
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0 !important;
}

.card-header h6 {
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 20px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-color);
    color: var(--dark-color);
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
}

/* ===================================
   Modal Styles
   =================================== */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 10px 10px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 15px 20px;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .btn-toggle-sidebar {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .btn-close-sidebar {
        display: block;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .quick-action-btn {
        padding: 20px 15px;
    }
    
    .top-header {
        padding: 0 15px;
    }
    
    .content-wrapper {
        padding: 0;
    }
}

@media (max-width: 576px) {
    .header-title h5 {
        font-size: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .card-header, .card-body {
        padding: 15px;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.badge {
    padding: 5px 10px;
    font-weight: 500;
}

.badge-paid {
    background-color: var(--success-color);
}

.badge-due {
    background-color: var(--danger-color);
}

.badge-partial {
    background-color: var(--warning-color);
}

/* Invoice Table Input Fields */
table .ctn-input {
    min-width: 60px !important;
    width: 100% !important;
}

table .qty-input {
    min-width: 90px !important;
    width: 100% !important;
}

table .price-input {
    min-width: 100px !important;
    width: 100% !important;
}

table .total-input {
    min-width: 110px !important;
    width: 100% !important;
}

table .item-search {
    min-width: 200px !important;
    width: 100% !important;
}

table .form-control-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

/* Ensure number inputs show full value */
input[type="number"] {
    text-align: right;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Client Cards Hover Effect */
.hover-shadow-lg {
    transition: all 0.3s ease;
}

.hover-shadow-lg:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

.card:hover {
    border-color: var(--primary-color);
}

/* Recent Invoices Scrollable Table */
#recentInvoicesTab {
    max-height: 600px;
    overflow-y: auto;
}

#recentInvoicesTab::-webkit-scrollbar {
    width: 8px;
}

#recentInvoicesTab::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#recentInvoicesTab::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#recentInvoicesTab::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Make table header sticky when scrolling */
#recentInvoicesTab table thead {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===================================
   Auto-Save & Multi-Tab Invoice System
   =================================== */

/* Invoice Tabs Container */
#invoiceTabsContainer {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px;
}

.invoice-tabs-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.invoice-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex-grow: 1;
    overflow-x: auto;
    padding: 5px 0;
}

.invoice-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.invoice-tab:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.invoice-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    font-weight: 600;
}

.invoice-tab .tab-title {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.invoice-tab.active .tab-title {
    color: white;
}

.invoice-tab .save-indicator {
    display: inline-block;
    margin-left: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.invoice-tab .tab-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
    transition: all 0.2s ease;
    line-height: 1;
}

.invoice-tab.active .tab-close {
    color: white;
}

.invoice-tab .tab-close:hover {
    color: #dc3545;
    transform: scale(1.2);
}

.invoice-tabs-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

/* Draft Recovery Alert */
.draft-item {
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.draft-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .invoice-tabs-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .invoice-tabs {
        overflow-x: auto;
    }
    
    .invoice-tabs-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .invoice-tabs-actions button {
        flex: 1;
    }
}

/* Dashboard Draft Cards */
.draft-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.draft-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

.draft-card .card-body {
    position: relative;
}

.draft-card h6 {
    font-weight: 600;
}

.draft-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Dashboard Drafts Section Animation */
#dashboardDraftsSection {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Admin Panel Styles
   =================================== */
.admin-panel-container {
    padding: 20px;
}

.admin-panel-container .nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    gap: 5px;
}

.admin-panel-container .nav-tabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-panel-container .nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: #f9fafb;
}

.admin-panel-container .nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

.admin-panel-container .nav-tabs .nav-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.admin-panel-container .card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.admin-panel-container .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 15px 20px;
}

.admin-panel-container .card-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-panel-container .card-header i {
    margin-right: 10px;
}

.admin-panel-container .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.admin-panel-container .form-control,
.admin-panel-container .form-select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.admin-panel-container .form-control:focus,
.admin-panel-container .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.admin-panel-container .form-check-input {
    width: 50px;
    height: 26px;
    border-radius: 13px;
    cursor: pointer;
}

.admin-panel-container .form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.admin-panel-container .form-check-label {
    margin-left: 10px;
    cursor: pointer;
}

.admin-panel-container .form-check-label strong {
    display: block;
    color: #111827;
    margin-bottom: 2px;
}

.admin-panel-container .alert {
    border-radius: 8px;
    border: none;
}

.admin-panel-container .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-panel-container .btn i {
    margin-right: 8px;
}

.admin-panel-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-panel-container .tab-content {
    padding-top: 20px;
}

.admin-panel-container small.text-muted {
    font-size: 0.85rem;
    display: block;
    margin-top: 4px;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-header,
    .quick-action-btn,
    .btn,
    .modal-footer,
    #invoiceTabsContainer,
    #draftRecoveryAlert,
    #dashboardDraftsSection {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===================================
   User Management Styles
   =================================== */
.user-management-container {
    padding: 20px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.avatar-circle-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-management-container .table td {
    vertical-align: middle;
}

.permissions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.user-info {
    margin-right: 15px;
}

.user-info .dropdown-toggle {
    color: #374151;
    padding: 8px 15px;
}

.user-info .dropdown-toggle:hover {
    background-color: #f3f4f6;
    border-radius: 6px;
}

.user-info .badge {
    font-size: 0.7rem;
    margin-left: 5px;
}

/* ==========================================
   LOGIN PANEL STYLES - MODERN FULL PAGE
========================================== */
.login-panel {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 90%;
    background: white;
}

/* Full page login container */
body.not-logged-in .modal {
    display: block !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.not-logged-in .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    max-width: none;
}

body.not-logged-in .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 30px 40px;
    text-align: center;
    color: white;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-header > * {
    position: relative;
    z-index: 1;
}

.login-logo {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.login-icon {
    font-size: 5rem;
    color: white;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-header h3 {
    margin: 20px 0 10px;
    font-weight: 700;
    color: white;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-header p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-size: 1rem;
}

body.not-logged-in .modal-body {
    padding: 40px 30px;
}

.login-panel .form-control-lg {
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    font-size: 1rem;
}

.login-panel .form-control-lg:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.login-panel .input-group .btn {
    border: 2px solid #e0e0e0;
    border-left: none;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s;
}

.login-panel .input-group .btn:hover {
    background: #f8f9fa;
    color: #667eea;
}

.login-panel .btn-primary {
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

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

.login-footer {
    background: linear-gradient(to top, #f8f9fa, white);
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.login-panel .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.login-panel .form-label i {
    margin-right: 8px;
    color: #667eea;
}

.login-panel .form-check-label {
    color: #6c757d;
}

.login-panel .btn-outline-warning {
    border-radius: 10px;
    transition: all 0.3s;
}

.login-panel .btn-outline-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}


/* Logo Upload Container */
.logo-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.logo-upload-container:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.02);
}

.logo-upload-container .current-logo {
    display: inline-block;
}

.logo-upload-container .current-logo img {
    display: block;
    margin: 0 auto 10px;
}

/* ==========================================
   QUICK PROFILE PANEL STYLES
========================================== */
.quick-profile-panel {
    position: fixed;
    top: 70px;
    right: -400px;
    width: 350px;
    max-height: calc(100vh - 90px);
    background: white;
    border-radius: 15px 0 0 15px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.quick-profile-panel.show {
    right: 0;
}

.profile-panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.btn-close-panel {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-close-panel:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.profile-panel-body {
    padding: 20px;
    text-align: center;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.3);
}

.profile-info-section {
    margin-bottom: 25px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.profile-username {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.profile-stats {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.stat-item:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.stat-item i {
    font-size: 1.5rem;
}

.stat-item small {
    display: block;
    font-size: 0.75rem;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.profile-contact {
    text-align: left;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #495057;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.profile-actions {
    margin-top: 20px;
}

.profile-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.profile-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 0 15px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quick-profile-panel {
        width: 100%;
        right: -100%;
        border-radius: 0;
        top: 60px;
        max-height: calc(100vh - 60px);
    }
    
    .quick-profile-panel.show {
        right: 0;
    }
}

/* ===================================
   Reports & Charts Styles
   =================================== */

.reports-container {
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.stats-card {
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.stats-card h6 {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.reports-container .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reports-container .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.reports-container .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0 !important;
}

.reports-container .card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.reports-container .card-header h5 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.reports-container .card-body {
    padding: 20px;
}

.reports-container canvas {
    max-height: 400px;
}

.reports-container .table {
    margin-bottom: 0;
}

.reports-container .table thead th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 12px;
}

.reports-container .table tbody tr {
    transition: background-color 0.2s ease;
}

.reports-container .table tbody tr:hover {
    background-color: #f8f9fa;
}

.reports-container .table tbody td {
    padding: 12px;
    vertical-align: middle;
}

/* Chart Container Responsive */
@media (max-width: 768px) {
    .reports-container {
        padding: 10px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
    
    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
    
    .reports-container .card-body {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .reports-container .btn,
    .reports-container .card-header button {
        display: none !important;
    }
    
    .reports-container .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===================================
   Daily Sales Report Styles
   =================================== */

.daily-sales-container {
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.summary-card {
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.summary-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.summary-card h6 {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.user-sales-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.user-sales-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sales-amount h4 {
    font-size: 1.75rem;
    font-weight: 700;
}

.empty-state {
    padding: 40px 20px;
}

.empty-state i {
    opacity: 0.5;
}

.daily-sales-container .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.daily-sales-container .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0 !important;
}

.daily-sales-container .card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.daily-sales-container .card-header h5 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.daily-sales-container .table thead th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 12px;
}

.daily-sales-container .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .daily-sales-container {
        padding: 10px;
    }
    
    .summary-card {
        margin-bottom: 15px;
    }
    
    .summary-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .summary-card h2 {
        font-size: 2rem;
    }
    
    .user-sales-card {
        margin-bottom: 15px;
    }
}

/* ===================================
   Mobile & Tablet Friendly Forms
   =================================== */

/* Tablet Optimization (768px - 1024px) */
@media (max-width: 1024px) {
    /* Invoice Form Container */
    .invoice-form-container {
        padding: 15px !important;
    }
    
    /* Form Controls - Larger Touch Targets */
    .form-control,
    .form-select,
    .btn {
        min-height: 44px !important;
        font-size: 16px !important;
        padding: 10px 12px !important;
    }
    
    /* Input Groups */
    .input-group .form-control {
        min-height: 44px !important;
    }
    
    /* Buttons - Larger Touch Area */
    .btn {
        padding: 12px 20px !important;
        font-size: 15px !important;
        min-height: 48px !important;
    }
    
    .btn-sm {
        padding: 8px 16px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }
    
    /* Table Cells - Better Spacing */
    .invoice-items-table td input,
    .invoice-items-table td select {
        min-height: 44px !important;
        font-size: 15px !important;
    }
    
    /* Modal Dialogs */
    .modal-dialog {
        margin: 10px !important;
        max-width: calc(100% - 20px) !important;
    }
    
    .modal-content {
        border-radius: 8px !important;
    }
}

/* Mobile Optimization (Max 768px) */
@media (max-width: 768px) {
    /* Main Content - Full Width on Mobile */
    .main-content {
        padding: 10px !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Invoice Form Container */
    .invoice-form-container {
        padding: 10px !important;
        margin: 0 !important;
    }
    
    /* Cards - Reduce Padding */
    .card {
        margin-bottom: 15px !important;
        border-radius: 8px !important;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    /* Form Labels - Larger Text */
    .form-label {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 6px !important;
        color: #1f2937 !important;
    }
    
    /* Form Controls - Extra Large Touch Targets */
    .form-control,
    .form-select {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 14px !important;
        border-radius: 6px !important;
        border: 1.5px solid #d1d5db !important;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-color) !important;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
    }
    
    /* Input Groups */
    .input-group {
        margin-bottom: 15px !important;
    }
    
    .input-group-text {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 14px !important;
    }
    
    /* Buttons - Full Width and Large */
    .btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        min-height: 52px !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    /* Button Icons */
    .btn i {
        font-size: 18px !important;
    }
    
    /* Button Groups - Stack Vertically */
    .btn-group {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .btn-group .btn {
        border-radius: 8px !important;
        margin-bottom: 8px !important;
    }
    
    /* Action Buttons Container */
    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    /* Invoice Items Table - Responsive */
    .invoice-items-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 15px !important;
    }
    
    .invoice-items-table table {
        min-width: 100% !important;
    }
    
    .invoice-items-table th,
    .invoice-items-table td {
        padding: 12px 8px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .invoice-items-table td input,
    .invoice-items-table td select {
        min-height: 44px !important;
        font-size: 15px !important;
        padding: 10px 8px !important;
        min-width: 100px !important;
    }
    
    /* Remove Row Button */
    .invoice-items-table .btn-danger {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 10px !important;
    }
    
    /* Add Item Button */
    .btn-add-item {
        width: 100% !important;
        margin-top: 10px !important;
        min-height: 48px !important;
    }
    
    /* Payment Section */
    .payment-summary {
        padding: 15px !important;
        margin-top: 15px !important;
        background: #f9fafb !important;
        border-radius: 8px !important;
    }
    
    .payment-summary .row {
        margin-bottom: 10px !important;
    }
    
    .payment-summary h5,
    .payment-summary h4 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .payment-summary .total-amount {
        font-size: 22px !important;
        font-weight: 700 !important;
        color: var(--primary-color) !important;
    }
    
    /* Date Pickers */
    input[type="date"],
    input[type="datetime-local"] {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 14px !important;
    }
    
    /* Select Dropdowns */
    select.form-select {
        background-size: 16px !important;
        padding-right: 40px !important;
    }
    
    /* Modal Full Screen on Mobile */
    .modal {
        padding: 0 !important;
    }
    
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        height: 100vh !important;
    }
    
    .modal-content {
        border-radius: 0 !important;
        height: 100vh !important;
        overflow-y: auto !important;
    }
    
    .modal-header {
        padding: 15px !important;
        position: sticky !important;
        top: 0 !important;
        background: white !important;
        z-index: 1050 !important;
        border-bottom: 2px solid #e5e7eb !important;
    }
    
    .modal-title {
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    
    .modal-body {
        padding: 15px !important;
    }
    
    .modal-footer {
        padding: 15px !important;
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        border-top: 2px solid #e5e7eb !important;
        flex-direction: column !important;
    }
    
    .modal-footer .btn {
        width: 100% !important;
        margin: 5px 0 !important;
    }
    
    /* Grid System - Stack on Mobile */
    .row.g-3 > .col-md-6,
    .row.g-3 > .col-md-4,
    .row.g-3 > .col-md-3,
    .row > .col-md-6,
    .row > .col-md-4,
    .row > .col-md-3 {
        margin-bottom: 15px !important;
    }
    
    /* Client/Supplier Select */
    #clientSelect,
    #supplierSelect {
        min-height: 48px !important;
        font-size: 16px !important;
    }
    
    /* Payment Type Buttons */
    .payment-type-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .payment-type-buttons .btn {
        width: 100% !important;
        min-height: 50px !important;
    }
    
    /* Toast Notifications - Better Positioning */
    .toast-container {
        bottom: 20px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    .toast {
        font-size: 15px !important;
        min-height: 60px !important;
    }
}

/* Extra Small Mobile (Max 576px) */
@media (max-width: 576px) {
    /* Even Larger Touch Targets */
    .form-control,
    .form-select,
    .btn {
        min-height: 52px !important;
        font-size: 17px !important;
    }
    
    /* Table - Better Scrolling */
    .table-responsive {
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Reduce Font Sizes Slightly */
    .card-title {
        font-size: 18px !important;
    }
    
    h5 {
        font-size: 16px !important;
    }
    
    /* Invoice Items - Compact View */
    .invoice-items-table th,
    .invoice-items-table td {
        font-size: 13px !important;
        padding: 10px 6px !important;
    }
    
    /* Action Buttons - Stack */
    .invoice-actions {
        flex-direction: column !important;
    }
    
    .invoice-actions .btn {
        width: 100% !important;
        margin-bottom: 8px !important;
    }
}

/* Landscape Tablets (768px - 1024px in landscape) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .form-control,
    .form-select {
        min-height: 42px !important;
        font-size: 15px !important;
    }
    
    .btn {
        min-height: 46px !important;
        padding: 10px 18px !important;
    }
    
    .modal-dialog {
        max-width: 90% !important;
        margin: 20px auto !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* All clickable elements larger */
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px !important;
    }
    
    /* Better tap highlights */
    * {
        -webkit-tap-highlight-color: rgba(79, 70, 229, 0.2);
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ===================================
   Notifications Panel Styles
   =================================== */

.notifications-panel {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.notification-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.notification-item.unread {
    background: #f0f9ff;
    border-left-color: var(--primary-color);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.notification-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
}

.notification-icon.bg-success {
    background: linear-gradient(135deg, var(--success-color), #34d399);
}

.notification-icon.bg-danger {
    background: linear-gradient(135deg, var(--danger-color), #f87171);
}

.notification-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
}

.notification-icon.bg-info {
    background: linear-gradient(135deg, var(--info-color), #60a5fa);
}

.notification-icon.bg-secondary {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
}

.notification-header strong {
    color: var(--dark-color);
    font-size: 1rem;
    font-weight: 600;
}

.notification-time {
    color: #6b7280;
    font-size: 0.85rem;
    white-space: nowrap;
}

.notification-message {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.notification-actions .btn {
    min-height: 36px;
    width: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    background: white;
    border-radius: 12px;
    padding: 60px 20px;
}

/* Mobile Responsive for Notifications */
@media (max-width: 768px) {
    .notifications-panel {
        padding: 10px;
    }
    
    .notification-item {
        padding: 15px;
        gap: 12px;
    }
    
    .notification-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .notification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .notification-time {
        font-size: 0.75rem;
    }
    
    .notification-message {
        font-size: 0.9rem;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Print Styles - Keep Original */
@media print {
    .sidebar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* ===================================
   Language Switcher & RTL Support
   =================================== */

.language-switcher {
    display: flex;
    gap: 5px;
    margin-right: 10px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.lang-btn:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .sidebar {
    left: auto;
    right: 0;
}

body.rtl .main-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

body.rtl .sidebar-menu .bi-chevron-down {
    margin-right: auto;
    margin-left: 0;
}

body.rtl .notification-badge {
    right: auto;
    left: -5px;
}

body.rtl .btn-toggle-sidebar {
    margin-right: 0;
    margin-left: auto;
}

body.rtl .header-actions {
    margin-right: auto;
    margin-left: 0;
}

body.rtl .language-switcher {
    margin-right: 0;
    margin-left: 10px;
}

body.rtl .modal-header .btn-close {
    margin: 0 auto 0 0;
}

body.rtl .input-group-text {
    border-radius: 0 0.375rem 0.375rem 0;
}

body.rtl .form-control {
    text-align: right;
}

body.rtl .toast-container {
    right: auto;
    left: 20px;
}

body.rtl .sidebar {
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

body.rtl .notification-item {
    border-right: 4px solid transparent;
    border-left: none;
}

body.rtl .notification-item.unread {
    border-right-color: var(--primary-color);
}

/* Mobile RTL */
@media (max-width: 1024px) {
    body.rtl .sidebar {
        right: -280px;
    }
    
    body.rtl .sidebar.active {
        right: 0;
    }
    
    body.rtl .main-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .language-switcher {
        gap: 3px;
        padding: 3px;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 32px;
    }
}
