/* Admin Panel Styles */
.admin-panel {
    padding: 2rem 0;
    background: var(--light);
    min-height: 100vh;
}

.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: white;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-tab.active {
    background: var(--primary);
    color: white;
    border-bottom: 3px solid var(--accent);
}

.admin-tab:hover:not(.active) {
    background: #f8f9fa;
    border-bottom: 3px solid var(--gray);
}

.tab-content {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.form-container {
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.8rem;
}

.file-upload-section {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 1.5rem;
    background: #f8f9fa;
}

.upload-group {
    margin-bottom: 1.5rem;
}

.upload-group:last-child {
    margin-bottom: 0;
}

.upload-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.file-preview {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.preview-item img, .preview-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-item .file-icon {
    font-size: 2rem;
    color: var(--gray);
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.product-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.product-list-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-list-info h4 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-list-meta {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.product-list-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.edit-btn {
    background: var(--success);
    color: white;
}

.edit-btn:hover {
    background: #3ab0d9;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.order-id {
    font-weight: 600;
    color: var(--primary);
}

.order-date {
    color: var(--gray);
}

.order-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d1edff;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-details {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

.order-customer, .order-items, .order-total {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.order-customer h5, .order-items h5, .order-total h5 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Responsive Design for Admin */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
    }

    .admin-tab {
        width: 100%;
        text-align: center;
    }

    .product-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .product-list-actions {
        align-self: flex-end;
    }

    .order-details {
        grid-template-columns: 1fr;
    }
    
    .tab-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .admin-panel {
        padding: 1rem 0;
    }
    
    .file-upload-section {
        padding: 1rem;
    }
    
    .search-bar {
        flex-direction: column;
    }
}