:root {
    --primary-gradient: linear-gradient(135deg, #FF5722 0%, #FF7043 100%);
    --secondary-gradient: linear-gradient(135deg, #FF7043 0%, #FFC107 100%);
    --accent-gradient: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    --primary-color: #FF5722;
    --primary-light: #FF7043;
    --primary-dark: #E64A19;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #FFF8F5;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
    min-height: 100vh;
}

.bg-login-image {
    background: var(--primary-gradient);
}

.card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.08);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #E64A19 0%, #FF5722 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

.sidebar {
    min-height: 100vh;
    background: var(--primary-gradient);
    color: white;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0.25rem 1rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link i {
    width: 24px;
}

.card-stat {
    border-left: 4px solid;
    transition: transform 0.3s;
    background: white;
}

.card-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(255, 87, 34, 0.15);
}

.card-stat.primary {
    border-left-color: #FF5722;
}

.card-stat.success {
    border-left-color: #4CAF50;
}

.card-stat.warning {
    border-left-color: #FFC107;
}

.card-stat.info {
    border-left-color: #FF7043;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 87, 34, 0.05);
}

.badge {
    padding: 0.5em 0.75em;
}

.status-pending {
    background: #FFC107;
}

.status-paid {
    background: #FF7043;
}

.status-processing {
    background: #FF5722;
}

.status-shipped {
    background: #2196F3;
}

.status-delivered {
    background: #4CAF50;
}

.status-cancelled {
    background: #D32F2F;
}

.input-group-text {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.form-control:focus {
    border-color: #FF5722;
    box-shadow: 0 0 0 0.25rem rgba(255, 87, 34, 0.25);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
}

.btn-gradient-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.btn-gradient-success {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    border: none;
}

.btn-gradient-danger {
    background: linear-gradient(135deg, #FF5252 0%, #E53935 100%);
    color: white;
    border: none;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1050;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

/* Sidebar Responsive */
.sidebar {
    transition: transform 0.3s ease-in-out;
    position: relative;
    z-index: 1040;
}

/* Desktop - default behavior */
@media (min-width: 992px) {
    .d-flex {
        display: flex !important;
    }
    
    .sidebar {
        width: 250px !important;
        flex-shrink: 0;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px !important;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1040;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .flex-grow-1 {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .navbar {
        padding-left: 4rem !important;
    }
    
    .p-4 {
        padding: 1.5rem !important;
    }
    
    /* Card stats responsive */
    .row .col-xl-3,
    .row .col-lg-4,
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Table responsive wrapper */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust table font size */
    .table {
        font-size: 0.875rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .p-4 {
        padding: 1rem !important;
    }
    
    /* Stack cards vertically */
    .card-stat {
        margin-bottom: 1rem;
    }
    
    /* Adjust typography */
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    /* Navbar adjustments */
    .navbar-text {
        font-size: 0.875rem;
        display: none;
    }
    
    .navbar .d-flex {
        margin-left: auto;
    }
    
    /* Button groups */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
        border-radius: 0.375rem !important;
    }
    
    /* Table adjustments */
    .table {
        font-size: 0.75rem;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        padding: 0.5rem;
    }
    
    .table tbody td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border: none;
        position: relative;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: var(--primary-color);
    }
    
    /* Form controls */
    .form-control,
    .form-select {
        font-size: 1rem;
    }
    
    /* Sidebar adjustments */
    .sidebar {
        width: 85vw !important;
        max-width: 300px;
    }
    
    .sidebar .p-4 {
        padding: 1rem !important;
    }
    
    .sidebar .nav-link {
        padding: 0.625rem 1rem;
        margin: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .sidebar .nav-link i {
        width: 20px;
        font-size: 1rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Export buttons */
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Date inputs */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        border-radius: 0.375rem !important;
        margin-bottom: 0.5rem;
    }
    
    .input-group .btn {
        border-radius: 0.375rem !important;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .mobile-menu-toggle,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .flex-grow-1 {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Overlay for sidebar on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1030;
}

.sidebar-overlay.show {
    display: block;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .table tbody tr {
        cursor: pointer;
    }
}
