:root {
    --primary: #00CED1;
    --primary-dark: #00a6a8;
    --dark: #111;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --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: #f4f7f9;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--dark);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
}

.main-content {
    padding: 2rem 0;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card {
    text-align: center;
}

.stat-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--gray);
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary);
}

.chart-container {
    height: 200px;
    margin-top: 15px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

select, button {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

select {
    background-color: white;
    border: 1px solid var(--gray-light);
}

button {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
}

button:hover {
    background-color: var(--primary-dark);
}

button.secondary {
    background-color: var(--gray);
}

button.secondary:hover {
    background-color: #5a6268;
}

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

button.danger:hover {
    background-color: #bd2130;
}

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background-color: var(--gray-light);
    font-weight: 600;
    cursor: pointer;
}

th:hover {
    background-color: #dae0e5;
}

tr:hover {
    background-color: #f8f9fa;
}

.product-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination button {
    min-width: 40px;
}

.pagination button.active {
    background-color: var(--primary-dark);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #adb5bd;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    th, td {
        padding: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .product-list tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        border: 1px solid var(--gray-light);
        border-radius: var(--border-radius);
    }
    
    .product-list thead {
        display: none;
    }
    
    .product-list td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 10px 15px;
    }
    
    .product-list td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
    }
    
    .product-list .action-buttons {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Confirmation dialog */
.confirmation-dialog {
    text-align: center;
}

.confirmation-dialog p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: var(--success);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1100;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background-color: var(--danger);
}