* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #1a2332;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #27ae60;
    letter-spacing: 2px;
}

.menu-divider {
    font-size: 11px;
    color: #7f8c8d;
    padding: 15px 10px 8px 10px;
    letter-spacing: 1px;
    font-weight: bold;
    border-bottom: 1px solid #2c3e50;
    margin-bottom: 10px;
}

.menu-item {
    padding: 10px 15px;
    margin: 3px 0;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.menu-item:hover {
    background: rgba(39, 174, 96, 0.2);
}

.menu-item.active {
    background: #27ae60;
}

.menu-item.active:hover {
    background: #27ae60;
}

.sidebar hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #2c3e50;
}

.back-link {
    display: block;
    text-align: center;
    color: #f1c40f;
    text-decoration: none;
    padding: 10px;
    border: 1px dashed rgba(241, 196, 15, 0.3);
    border-radius: 6px;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(241, 196, 15, 0.1);
    border-color: #f1c40f;
}

/* Content */
.content {
    margin-left: 240px;
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header h2 {
    color: #1a2332;
    font-size: 22px;
}

.sub-header {
    margin-top: 5px;
    font-size: 14px;
    color: #7f8c8d;
}

.badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.btn-add {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-add:hover {
    background: #219a52;
}

/* Table */
.table-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

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

thead {
    background: #27ae60;
}

th {
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover {
    background: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

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

.product-name {
    font-weight: 600;
    color: #1a2332;
}

.product-price {
    color: #27ae60;
    font-weight: bold;
}

.category-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #27ae60;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Form */
.form-container {
    margin-top: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-header {
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-header h3 {
    font-size: 18px;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.btn-close:hover {
    color: #ffcccc;
}

.form-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #1a2332;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1);
}

#previewContainer {
    text-align: center;
}

#imagePreview {
    border-radius: 4px;
    border: 2px solid #eee;
}

.form-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.btn-save {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-save:hover {
    background: #219a52;
}

.btn-clear {
    background: #f39c12;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-clear:hover {
    background: #d68910;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
}

.empty-state h3 {
    color: #1a2332;
    font-size: 22px;
    margin-bottom: 10px;
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        padding: 15px;
    }
    
    .content {
        margin-left: 200px;
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header h2 {
        font-size: 18px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .product-img {
        width: 40px;
        height: 40px;
    }
    
    .form-footer {
        flex-direction: column;
    }
    
    .form-footer button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .sidebar {
        display: none;
    }
    
    .content {
        margin-left: 0;
        padding: 10px;
    }
}