/* Willing Ways Cafeteria - Shared CSS for Performance Optimization */

/* CSS Variables for consistent theming and easy maintenance */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --sidebar-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --danger-gradient: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

/* Base layout styles */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    min-height: 100vh;
    background: var(--sidebar-gradient);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    padding: 12px 20px;
    margin: 5px 15px;
    border-radius: 8px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

/* Card improvements */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Dashboard stats cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card.orders::before { background: var(--primary-gradient); }
.stat-card.sales::before { background: var(--success-gradient); }
.stat-card.customers::before { background: var(--info-gradient); }
.stat-card.menu::before { background: var(--warning-gradient); }

/* Icon styling */
.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Button improvements */
.btn {
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

/* Order items styling */
.order-item {
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.order-item:hover {
    transform: translateY(-2px);
}

/* Badge improvements */
.badge {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .stat-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
}

/* Loading animation for better UX */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Form improvements */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Table improvements */
.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* Cache optimization: Critical CSS loaded inline for above-fold content */
/* Non-critical animations loaded after page load */