/* 管理员特定样式 */
.admin-main {
    padding: 2rem 5%;
}

.admin-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.8rem 1.5rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
}

.search-box .icon {
    position: absolute;
    left: 1rem;
    color: #777;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, 
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    font-weight: 500;
    color: #333;
    background-color: #f9f9f9;
}

.admin-table tr:hover {
    background-color: #f5f5f5;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #555;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.action-btn:hover {
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #e6f7e6;
    color: #2e7d32;
}

.status-badge.inactive {
    background-color: #ffebee;
    color: #c62828;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-body {
    padding: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input{
    width: auto;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary {
    background-color: #eee;
    color: #333;
}

.btn-secondary:hover {
    background-color: #ddd;
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
}

.notification.success {
    background-color: #4caf50;
    color: white;
}

.notification.error {
    background-color: #f44336;
    color: white;
}

@media (max-width: 768px) {
    .admin-controls {
        flex-direction: column;
    }
    
    .search-box input {
        min-width: 100%;
    }
    
    .admin-table th, 
    .admin-table td {
        padding: 0.8rem 0.5rem;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* 品类选择样式 */
.category-level {
    margin-bottom: 15px;
    padding-left: 20px;
    border-left: 2px solid #eee;
}

.category-item {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 8px;
}

.category-item input[type="checkbox"] {
    margin-right: 5px;
}

/* 上传按钮样式 */
.btn-upload {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
    font-size: 0.9em;
}

.btn-upload:hover {
    background-color: #e9ecef;
}