
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Navbar Enhancements */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,.08);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0,0,0,.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    text-align: center;
    padding: 1.5rem;
    height: 100%;
}

.dashboard-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.in-stock {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.low-stock {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
}

.out-of-stock {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Tables */
.table {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-sm td, .table-sm th {
    padding: 0.5rem;
}

/* Forms */
.form-control, .form-select {
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Status Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.8rem;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 1rem + 2px);
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 1rem);
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
}

/* Search Box */
#searchBox {
    max-width: 400px;
    margin-bottom: 1.5rem;
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 5px;
    padding: 1rem 1.5rem;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Loading Spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-card h2 {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}