/* Main Styles */
:root {
    --primary-color: #F68B1E; /* Jumia Orange */
    --secondary-color: #2D3748; /* Dark Blue */
    --light-color: #F8F9FA;
    --dark-color: #343A40;
    --border-color: #DEE2E6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

.wrapper {
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background-color: var(--secondary-color);
    color: white;
    min-height: 100vh;
    width: 250px;
    position: sticky;
    top: 0;
    padding: 0;
    box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    padding: 0 1rem;
}

/* Content Area Styles */
.content-area {
    flex: 1;
    padding: 0;
    transition: all 0.3s;
    width: calc(100% - 250px);
}

.content-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    min-height: calc(100vh - 70px);
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.products .icon {
    background-color: rgba(246, 139, 30, 0.2);
    color: var(--primary-color);
}

.stat-card.sales .icon {
    background-color: rgba(25, 135, 84, 0.2);
    color: #198754;
}

.stat-card.returns .icon {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.stat-card.customers .icon {
    background-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-actions {
    white-space: nowrap;
}

/* Export Button Styles */
.export-buttons {
    margin-bottom: 0.5rem;
}

.export-buttons .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.export-buttons .btn i {
    margin-right: 0.25rem;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(246, 139, 30, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #e57c10;
    border-color: #e57c10;
}

/* Chart Styles */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
    max-height: 350px;
    overflow: hidden;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    padding: 20px;
}

.login-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-banner {
    background-color: var(--primary-color);
    padding: 3rem 1.5rem;
    color: white;
    text-align: center;
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
}

/* AJAX Search Styles */
.ajax-search-wrapper {
    position: relative;
}

.ajax-search-input {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: white;
}

.ajax-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(246, 139, 30, 0.25);
    outline: none;
}

.ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}

.ajax-search-results.show {
    display: block;
}

.ajax-search-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ajax-search-item:hover {
    background-color: var(--light-color);
}

.ajax-search-item.selected {
    background-color: rgba(246, 139, 30, 0.1);
}

.ajax-search-item .item-details {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
}

.ajax-search-loading {
    padding: 0.5rem 1rem;
    text-align: center;
    color: #6c757d;
}

.ajax-search-no-results {
    padding: 0.5rem 1rem;
    text-align: center;
    color: #6c757d;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 270px;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .content-area {
        width: 100%;
        margin-top: 60px;
    }
    
    .content-wrapper {
        min-height: calc(100vh - 70px);
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
    
    body.sidebar-open::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar {
        z-index: 1001;
    }
}

@media (max-width: 576px) {
    .card-title {
        font-size: 1.25rem;
    }
    
    .stat-card .icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .login-banner {
        display: none;
    }
    
    .mobile-header {
        padding: 0.75rem;
    }
    
    .sidebar {
        width: 250px;
    }
}
